latexoverleaftexmaker

ModerCV colors work on Overleaf but not on my new TexMaker


I recently moved to another PC and used the same LaTeX code that exploits moderncv package. However, while the code worked perfectly in the old PC and in Overleaf, in the new one I experience the problem of not showing colored paragraph and name/surname.

I simply tried with the standard configuration of both MiKTeX and TeXmaker, adding the required packages. No error occured (I mean, the code is executed).

Here you find the B/N output obtained in TexMaker (in local) and the correct one obtained in Overleaf.

I also attach here the code example (it's ChatGPT-based but it represents very well the error I get for my CV).

Thanks

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

% Choose the theme
\moderncvstyle{classic} % Options: 'casual', 'classic', 'banking', 'oldstyle'
\moderncvcolor{blue} % Theme color

% Layout options
\usepackage[scale=0.75]{geometry}

% For your CV
\firstname{First Name}
\familyname{Last Name}
\title{Title}
\address{Address}{City}{Country}
\phone[mobile]{+123~456~789}
\email{email@example.com}

\begin{document}
\makecvtitle

\section{Section}
Section text.

\subsection{Subsection}
Subsection text.

\cvitem{Project}{Description of the project}

\end{document}

Solution

  • To quote the moderncv documentation:

    Note. The color theme must be loaded before \moderncvstyle, i.e.

    \documentclass[11pt,a4paper,sans]{moderncv}
    
    % Choose the theme
    \moderncvcolor{blue} % Theme color
    \moderncvstyle{classic} % Options: 'casual', 'classic', 'banking', 'oldstyle'
    
    
    % Layout options
    \usepackage[scale=0.75]{geometry}
    
    % For your CV
    \firstname{First Name}
    \familyname{Last Name}
    \title{Title}
    \address{Address}{City}{Country}
    \phone[mobile]{+123~456~789}
    \email{email@example.com}
    
    \begin{document}
    \makecvtitle
    
    \section{Section}
    Section text.
    
    \subsection{Subsection}
    Subsection text.
    
    \cvitem{Project}{Description of the project}
    
    \end{document}
    

    enter image description here