3

Since the last update of moderncv package I can't compile my CV anymore. It has worked for years before.

There seems to be an option clash. Here's a short version of what I am talking about:

\documentclass{moderncv}

\moderncvstyle[left,norules]{banking}
\moderncvbody{1} % classic

\firstname{Max}
\familyname{Mustermann}
\address{}{}

\begin{document}
\maketitle

\section{My professions}
\cvline{}{}
\end{document}
4
  • Do you get an error message? If yes, what is the exact text of the error?
    – Marijn
    Commented Mar 6, 2021 at 14:05
  • I get ! LaTeX Error: Option clash for package moderncvskillmatrix. @Marijn Commented Mar 6, 2021 at 14:35
  • Yes, that's the error I get. So how can I fix this? It was always working before with the same template.
    – fs27
    Commented Mar 6, 2021 at 17:30
  • What's strange is that I still get a PDF output, but I can't see anything when I compile it.
    – fs27
    Commented Mar 10, 2021 at 15:25

2 Answers 2

2

With the current version 2.1.0 of class moderncv was a new package added to all moderncvbodyx.sty files (with x from i to vi). This new package moderncvskillmatrix calls options like moderncvbodyi to know where it comes from.

Calling \moderncvstyle[left, norules]{banking} calls internal moderncvbodyiii which calls moderncvskillmatrix with option moderncvbodyiii resulting later in the error message ...

Calling \moderncvbody{1} to get the layout of the body from style classic itself calls package moderncvskillmatrix with option moderncvbodyi. Now you have the option clash, same package called with two different options ...

To get what you want, the header of style banking and the body of style classic you can omit calling style banking. Call instead simply \moderncvhead{3} to get the same result.

So with the following MWE (important code changes marked with <=========)

\documentclass{moderncv}

%\moderncvstyle[left, norules]{banking} % 
\moderncvhead{3} % banking <============================================
\moderncvbody{1} % classic

\name{Max}{Mustermann} % <==============================================
\address{test}{address}

\begin{document}
\maketitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}  % arguments 3 to 6 can be left empty
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}

\section{Master thesis}
\cvitem{title}{\emph{Title}} % <========================================
\cvitem{supervisors}{Supervisors}
\cvitem{description}{Short thesis abstract}

\section{Experience}
\subsection{Vocational}
\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}
Detailed achievements:
\begin{itemize}
\item Achievement 1
\item Achievement 2 (with sub-achievements)
  \begin{itemize}
  \item Sub-achievement (a);
  \item Sub-achievement (b), with sub-sub-achievements (don't do this!);
    \begin{itemize}
    \item Sub-sub-achievement i;
    \item Sub-sub-achievement ii;
    \item Sub-sub-achievement iii;
    \end{itemize}
  \item Sub-achievement (c);
  \end{itemize}
\item Achievement 3
\item Achievement 4
\end{itemize}}
\cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2\newline{}}
\subsection{Miscellaneous}
\cventry{year--year}{Job title}{Employer}{City}{}{Description}
\end{document}

you get the wished resulting pdf:

resulting pdf

Please see that I changed depreciated commands of class moderncv to the new ones ...

1

I had the same problem and found a very usefull help here : https://nuanceabounds.org/fix-latex-package-option-clash-error-passoptionstopackage/ which basically made me add \PassOptionsToPackage{moderncvbodyiii,moderncvbodyi}{moderncvskillmatrix} at the very beginning of my tex document. Now it works perfectly :)

1
  • Thank you very much! Now it works.
    – fs27
    Commented Mar 19, 2021 at 9:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .