2

I would like to stylish the name and surname like the casual moderncv theme: name and surname of different colors. I tried Switch firstname and familyname colors in moderncv, but doesn't work for me. 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}

I tried to change \makecvtitle with \makecvhead because the command to be patched seems to be \makecvhead actually, but neither. Whats wrong? Did the moderncv style definition changed in some other point?

2

I use this code:

% !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}

and the result it is:

My CV with surname in red

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy