[Tex/LaTex] Change column width (modern CV)

moderncv

Using moderncv, does anyone know how I change the command \cvlanguage{}{B}{} such that the column containing B gets wider? As it is now it linebreaks after 15 characters.

I also don't want the changes to affect any other commands

Best Answer

\cvlanguage is defined as:

\newcommand*{\cvlanguage}[3]{%
  \cvline{#1}{\begin{minipage}[t]{0.625\maincolumnwidth}\textbf{#2}\end{minipage}\hfill\begin{minipage}[t]{0.325\maincolumnwidth}\raggedleft\footnotesize\itshape #3\end{minipage}}}

What you have to do is redefine the command in your document changing the number 0.625 for something bigger (but smaller than one). Don't forget to change the 0.325 to something smaller (ideally the sum should stay the same). For example:

\renewcommand*{\cvlanguage}[3]{%
  \cvline{#1}{\begin{minipage}[t]{0.7\maincolumnwidth}\textbf{#2}\end{minipage}\hfill\begin{minipage}[t]{0.25\maincolumnwidth}\raggedleft\footnotesize\itshape #3\end{minipage}}}

EDIT:

In newer versions, \cvlanguage has been changed to be

\newcommand*{\cvlanguage}[3]{\cvitemwithcomment{#1}{#2}{#3}}

This can be found in the style file moderncvcompatibility.sty.

The definition of \cvitemwithcomment are in the files moderncvbody{i-v}.sty, and is slightly more complicated, as it depends on the settings for that style of cv. It now calculates box sizes for placing the content.

Related Question