# How to modify this command to vertically align a table cell?

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}
\ecvlanguage{English}{\ecvCOne}{\ecvCOne}{\ecvBTwo}{\ecvBTwo}{\ecvCOne}
\ecvlanguagefooter{(*)}
\end{europecv}
\end{document}


Produces the following document:

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?

-
 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

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}