Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
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

2 Answers 2

up vote 5 down vote accepted

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}
share|improve this answer
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

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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