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?

0

1 Answer 1

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

1
  • This seems to work, thanks! However, I'd still like to know why. Nov 25, 2013 at 12:44

You must log in to answer this question.

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