4

I'm experiencing a strange asymmetry in how moderncv's \cvlistdoubleitem command handles line-breaking. This code compiles perfectly.

\documentclass{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\name{John}{Doe}

\begin{document}

\section{References}
\cvlistdoubleitem{Prof. Charles Xavier\\Trinity College, Cambridge}{Prof. John Frink}

\end{document}

However, when I switch the line-breaking to the second part of the \cvlistdoubleitem, it doesn't compile.

\documentclass{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\name{John}{Doe}

\begin{document}

\section{References}
\cvlistdoubleitem{Prof. Charles Xavier}{Prof. John Frink\\Trinity College, Cambridge}

\end{document}

In the latter case, I get the following error message.

! TeX capacity exceeded, sorry [parameter stack size=10000]. \csuse #1-> \ifcsname #1\endcsname \csname #1\expandafter \endcsname \fi l.9 ...of. John Frink\Trinity College, Cambridge}

Why does the problem occur in one case but not the other?

4

You can fix it using \newline instead of \\.

\documentclass{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\name{John}{Doe}

\begin{document}

\section{References}
\cvlistdoubleitem{Prof. Charles Xavier}{Prof. John Frink \newline Trinity College, Cambridge}

\end{document} 

Output:

enter image description here

  • This seems to work, thanks! However, I'd still like to know why. – Andrew Uzzell Nov 25 '13 at 12:44

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.