3

I am using moderncv and would like to implement pagebreaks in \cvitem.

This post (Page breaks within moderncv) is similar, but the cvitem environment appears to be more tricky than the cventry one, which was discussed there.

As in the other link I would like to add a long list:

\cvitem{here is a longer caption that does not fit into one tab}{
    \begin{itemize}
        \item Item 1;
        % Lots of items here
        \item Item n.
    \end{itemize}
}

Because of the title being long, it is not an option to do this:

\cvitem{caption}{item1}
\cvitem{}{item2}
\cvitem{}{item3}

I tried to manually define a \cvitemlong environment (by defining longtables) that would allow for pagebreaks, but didn't find a working solution. Does anyone have an idea how to solve this in an easy way?

Cheers, Mil

  • \cvitem uses a tabular and you can't have breaks inside tabular and within a row. – user11232 May 30 '14 at 11:49
  • yes, this is why I tried to define a comparable command that uses longtables instead - but this didn't work either... :/ – Mil May 30 '14 at 11:59
  • Even if you use longtable page break can not occur inside a row. – user11232 May 30 '14 at 12:00
  • Right, of course! I didn't consider that! So I would have to define each of the items as a row to make it work that way... Still there might be a more suitable way. – Mil May 30 '14 at 12:11
2

A way to do this is to use a \phantom command with the list \cvitem and so have the correct alignement:

\cvitem{caption}{item1}
\cvitem{\phantom{caption}}{item2}
\cvitem{\phantom{caption}}{item3}

Of course you can define a new command to write less character:

\newcommand{\foo}{\phantom{caption}}
\cvitem{caption}{item1}
\cvitem{\foo}{item2}
\cvitem{\foo}{item3}

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.