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.

This minimal code example:

\documentclass[helvetica,portuguese,narrow]{europecv}
\usepackage[top=1.5cm, bottom=1.5cm, left=1.5cm, right=1.5cm]{geometry}
\usepackage{graphicx}
\begin{document}
    \begin{europecv}
        \ecvlanguageheader{(*)}
        \ecvlanguage{English}{\ecvCOne}{\ecvCOne}{\ecvBTwo}{\ecvBTwo}{\ecvCOne}
        \ecvlanguagefooter{(*)}
    \end{europecv}
\end{document}

Produces the following document: enter image description here

What I want is to vertically align those C1 and B2.

I looked through the europecv package and found that I can add the following to my document to rewrite the command that outputs those table rows:

\makeatletter
    \renewcommand*\ecvCEF[2]{
        \begin{tabular}{@{}>{\footnotesize}p{.2\ecv@langparwidth}@{\hspace{1mm}}>{\footnotesize\centering}p{.74\ecv@langparwidth}@{}}
             #1 & #2\tabularnewline
        \end{tabular}
    }
\makeatother

That is the original code, I just need to find how to properly vertically align those C1 and B2 to the middle of the cell. Any suggestions?

share|improve this question
    
Could you elaborate a bit more on what you mean by "properly aligning" the C1 and B2 items? (They all look nicely aligned to each other...) Do you maybe want to center them vertically relative to the two rows that are immediately next to them? –  Mico Sep 8 '12 at 18:53
    
Yes, that's what I want. Sorry, I didn't make that clear enough... –  Ricardo Amaral Sep 8 '12 at 20:50
add comment

1 Answer

up vote 4 down vote accepted

This is quite straight forward. You found the relevant command and the europcv package already loads array which provides an m column type for vertical alignement. Renewing the command replacing p by m gives vertically centered labels:

\documentclass[helvetica,portuguese,narrow]{europecv}
\usepackage[top=1.5cm, bottom=1.5cm, left=1.5cm, right=1.5cm]{geometry}
\usepackage{graphicx}
\makeatletter
\renewcommand*\ecvCEF[2]{
\begin{tabular}{@{}>{\footnotesize}m{.2\ecv@langparwidth}@{\hspace{1mm}}
   >{\footnotesize\centering}m{.74\ecv@langparwidth}@{}}
#1 & #2\tabularnewline
\end{tabular}
}
\makeatother
\begin{document}
    \begin{europecv}
        \ecvlanguageheader{(*)}
        \ecvlanguage{English}{\ecvCOne}{\ecvCOne}{\ecvBTwo}{\ecvBTwo}{\ecvCOne}
        \ecvlanguagefooter{(*)}
    \end{europecv}
\end{document}

Sample output

share|improve this answer
add comment

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.