moderncv 经典中的不同名字和姓氏颜色

moderncv 经典中的不同名字和姓氏颜色

我想将名字和姓氏设计成休闲的 moderncv 主题:不同颜色的名字和姓氏。我试过了在 moderncv 中切换名字和姓氏的颜色,但对我不起作用。MWE:

\documentclass[11pt,a4paper,sans]{moderncv}       


% moderncv themes
\moderncvstyle{classic}                             % style options are 'casual' (default), 'classic', 'banking', 'oldstyle' and 'fancy'
\moderncvcolor{red}                             

% adjust the page margins
\usepackage[scale=0.75]{geometry}

\usepackage{etoolbox}
\patchcmd{\makecvtitle}{\color{color2!50}\@firstname}{\color{color2}\@firstname}{}{}
\patchcmd{\makecvtitle}{\color{color2}\@lastname}{\color{color2!50}\@lastname}{}{}


% personal data
\name{Mickey}{Mouse}

%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
\begin{document}

\makecvtitle

\end{document}

我尝试\makecvtitle用进行更改\makecvhead,因为要修补的命令似乎\makecvhead实际上是,但都不是。出了什么问题? moderncv 样式定义是否在其他点发生了变化?

答案1

我使用这个代码:

% !TeX spellcheck = en_US
\documentclass[11pt,a4paper,roman,english]{moderncv}        % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')
\moderncvstyle{classic}                             % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{orange}                               % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
%\nopagenumbers{}                                  % uncomment to suppress automatic page numbering for CVs longer than one page
\usepackage[utf8]{inputenc}                        % if you are not using xelatex ou lualatex, replace by the encoding you are using
\usepackage[scale=0.75,a4paper]{geometry}
\usepackage{babel}
\usepackage{lipsum}                                % Used for inserting dummy 'Lorem ipsum' text into the template
\usepackage{color}
%------------------------------------------------------------
%            personal data
%------------------------------------------------------------
\firstname{Giacomo}
\familyname{\color{red}Alessandroni}
%\title{Ph.D. Complexity science, field of research: digital signal processing}

结果是:

我的简历,姓氏用红色写

相关内容