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.

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.

share|improve this question
    
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 Apr 15 '13 at 20:01
    
Patrick, I couldn't resist: as a bavarian I can't read "Wizenbeer". German correct is "Weizenbier" (Hmm, lecker!) ;-) –  Kurt Apr 15 '13 at 20:25

1 Answer 1

up vote 3 down vote accepted

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.

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.