3

I am currently updating my CV and using the moderncv package. When I've updated the 'Languages' section, I've encountered a problem:

\documentclass[11pt,a4paper]{moderncv}

\moderncvtheme[grey]{casual}
\usepackage[english,ngerman]{babel}
\usepackage[utf8]{inputenc}                 

\firstname{Firstname}
\familyname{Name}

\setlength{\hintscolumnwidth}{0.3\textwidth} % widen first column within CV 

\begin{document}

    \maketitle
    \section{Languages}
    \cvline{German}{Hallo, mein Name ist Fritz, Ich would like to haben ein Sauerkraut with Schnitzel, bitte. Und dazu ein deutsches Weizenbier. Bitte wo ist der Schlossmuseum? I know a little German, he's sitting over there.}
    \cvline{German Sign Language (DGS)}{Basics}

\end{document}

That results in: Image: result

So my question is: Is it possible to adjust the vertical alignment of the first respectively of the second column in a cvline to middle? I would like that the Basics is in the middle (vertically) of the German Sign Language (DGS). The other case (aligning the left column vertically) is not that important to me.

1
  • Welcome to TEX.sx Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you.
    – jjdb
    Commented Apr 15, 2013 at 20:01

1 Answer 1

3

In the following example I defined a \ccvitem command that behaves as \cvitem, but with vertical alignment of the columns content (instead of p{...} columns, \ccvitem uses m{...} columns available through the array package):

\documentclass[11pt,a4paper]{moderncv}

\moderncvtheme[grey]{casual}
\usepackage[english,ngerman]{babel}
\usepackage[utf8]{inputenc}                 
\usepackage{array}

\firstname{Firstname}
\familyname{Name}

\setlength{\hintscolumnwidth}{0.3\textwidth} % widen second column within CV 

\makeatletter
\newcommand*{\ccvitem}[3][.25em]{%
  \begin{tabular}{@{}m{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}m{\maincolumnwidth}@{}}%
    \raggedleft\hintstyle{#2} &{#3}%
  \end{tabular}%
  \par\addvspace{#1}}
\makeatother

\begin{document}

    \maketitle
    \section{Languages}
    \cvitem{German}{Hallo, mein Name ist Fritz, Ich would like to haben ein Sauerkraut with Schnitzel, bitte. Und dazu ein deutsches Weizenbier. Bitte wo ist der Schlossmuseum? I know a little German, he's sitting over there.}
    \cvitem{German Sign Language (DGS)}{Basics}
    \ccvitem{German}{Hallo, mein Name ist Fritz, Ich would like to haben ein Sauerkraut with Schnitzel, bitte. Und dazu ein deutsches Weizenbier. Bitte wo ist der Schlossmuseum? I know a little German, he's sitting over there.}
    \ccvitem{German Sign Language (DGS)}{Basics}

\end{document}

enter image description here

By the way, you could use \cvitem instead of \cvline that appears to be still around just for compatibility with older versions of moderncv.

You must log in to answer this question.

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