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

4
  • \cvitem uses a tabular and you can't have breaks inside tabular and within a row.
    – user11232
    Commented May 30, 2014 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
    Commented May 30, 2014 at 11:59
  • Even if you use longtable page break can not occur inside a row.
    – user11232
    Commented May 30, 2014 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
    Commented May 30, 2014 at 12:11

1 Answer 1

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}

You must log in to answer this question.

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