6

In moderncv I use \cvitem to point my skills. The problem is that if I use long text in a first column it gets breaked. Picture shows what I want to achieve.

enter image description here

first example is how it looks when I use \cvitem{Something looooong}{Second entry}. I can not achieve that second result with \cvitem{Something looooong}{\\Second entry} - if second entry is preceded by \\ (new line), then it gets into first column where "Something looooong" text is. All in all - how to easily achieve this second example, please?

  • Not everybody knows moderncv in its details; would you please add a minimal document that illustrates the question? – egreg Sep 16 '12 at 12:45
10

You can add \hfill followed by \newline to put an empty line, so your entry will look like:

\cvitem{Something looooong}{\hfill \newline Second entry}
  • 1
    Thanks! This is a "hack" that I was looking for! I didn't want to completely redefine \cvitem, instead I just wanted to change only one choosen line. Thank you again! Appreciated. – Teddy Sep 16 '12 at 13:58
3

You can redefine \cvitem to use a b{...} column instead of the defualt p{...}:

\documentclass{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue} 
\usepackage{array}

\firstname{John}
\familyname{Doe}

\renewcommand*{\cvitem}[3][.25em]{%
  \begin{tabular}{@{}b{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}b{\maincolumnwidth}@{}}%
      \raggedleft\hintstyle{#2} &{#3}%
  \end{tabular}%
  \par\addvspace{#1}}

\begin{document}

\makecvtitle
\cvitem{Something looooong}{Second entry}

\end{document}

enter image description here

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.