5

When labels are too small, the \cvdoubleitem macro in moderncv creates way too much space between the first description and the second label:

enter image description here

\documentclass[11pt,a4paper]{moderncv}

\usepackage[utf8]{inputenc}
\moderncvtheme[blue]{classic}

\firstname{}
\familyname{}

\begin{document}
\section{Cool Stuff}
\cvdoubleitem{$15\times$}{Lorem ipsum dolor sit amet, consetetur sadipscing elitr.}{$6\times$}{Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.}
\end{document}

I like to decrease the yellow space by increasing the description columns.

Thank you for any hints how to achieve this!

6

That space is used for the hints column. In the following code I reduced the length used for that minipage to half its original value and distributed the remaining space in the two minipages used for the descriptions:

\documentclass[11pt,a4paper]{moderncv}

\usepackage[utf8]{inputenc}
\moderncvtheme[blue]{classic}

\firstname{}
\familyname{}

\renewcommand*{\cvdoubleitem}[5][.25em]{%
 \cvitem[#1]{#2}{%
   \begin{minipage}[t]{\doubleitemmaincolumnwidth+0.25\hintscolumnwidth}#3\end{minipage}%
   \hspace*{\separatorcolumnwidth}%
   \begin{minipage}[t]{0.5\hintscolumnwidth}\raggedleft\hintstyle{#4}\end{minipage}%
   \hspace*{\separatorcolumnwidth}%
   \begin{minipage}[t]{\doubleitemmaincolumnwidth+0.25\hintscolumnwidth}#5\end{minipage}}}

\begin{document}

\section{Cool Stuff}
\cvdoubleitem{$15\times$}{Lorem ipsum dolor sit amet, consetetur sadipscing elitr.}{$6\times$}{Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.}
\end{document}

For comparison, an image with the default widths:

enter image description here

the same document with the modification suggested:

enter image description here

Notice that now the space reserved for the third mandatory argument is half than it was before.

  • Thanks for your solution, looks really good :-) However, ìt seems we need to wrap the macro's content in \begingroup and \endgroup, because \addtolength would keep adding up on each call of \cvdoubleitem. – Marcus Bitzl Feb 11 '14 at 17:45
  • @MarcusBitzl yes, my bad. Sorry. I've fixed the code now without \addtolength. – Gonzalo Medina Feb 11 '14 at 18:03

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.