# How to set different alignment for Name/Title in ModernCV?

I'm trying to write my CV using ModernCV template.

As you see in the picture below, the Name/Title section at the left-top of the first page in this template is bottom-aligned to the personal information at the right-top of the first page.

I was just wondering how is that possible to change the alignment of Name/Title to be top-aligned, or even better middle-aligned with the personal information section!?

Your great help is truly appreciated. Thank you.

-
Welcome to TeX.SX! –  Papiro Oct 1 '13 at 9:27
Actually I'm not new to TeX.SX; I was following the Q/As. However this is my first post. Thanks any way :) –  Omid1989 Oct 1 '13 at 9:37

The name etc. are placed in a \begin{minipage}[b]...\end{minipage} and the information on the right is in a \begin{tabular}[b]..\end{tabular}. You can remove or change the alignment arguments [b] with the patching commands from etoolbox:

\documentclass{moderncv}

\moderncvstyle{classic}

\name{John}{Doe}
\phone{+1~(234)~567~890}
\homepage{xxx.ddd.cc.ee}

\usepackage{etoolbox}
\patchcmd{\makecvtitle}{{minipage}[b]}{{minipage}[t]}{}{}
\patchcmd{\makecvtitle}{{tabular}[b]}{{tabular}}{}{}

\begin{document}
\makecvtitle

\end{document}


More drastic changes would involve copying the \makecvtitle command from moderncvclassicstyle.sty into your document, placing it between \makeatletter...\makeatother and then rewriting the appropriate parts of the code.

-
Thanks a billion. This works greatly. (Sorry that I can't vote up your answer; because I don't have enough reputation power.) –  Omid1989 Oct 1 '13 at 9:41
But just one question: what does [b] & [t] in \patchcmd... command mean !? (I'm newbie to LaTeX) –  Omid1989 Oct 1 '13 at 9:42
The first \patchcmd searches the first argument \makecvtitle for the pattern {minipage}[b] and replaces it with {minipage}[t]. The [b] and [t] are optional arguments to the minipage environment specifying the vertical placement. –  Andrew Swann Oct 1 '13 at 9:47
Thanks a lot for your fast answer. Does [b] & [t] set the alignments to bottom & middle respectively !? –  Omid1989 Oct 1 '13 at 10:00
[b] is align to bottom row, [t] is align top row, empty centers. Beware that the alignment is to the baselines of the rows, and that the name is printed with letters that stretch way above the standard baseline. –  Andrew Swann Oct 1 '13 at 10:17