# Name alignment in modern cv

I would like that my given name (first name) in the CV appears aligned to the left, I am using \firstname{Juan Pablo} \familyname{Romero Garza}

thanks

\documentclass[11pt,letterpaper,sans]{moderncv}

\moderncvstyle{classic}
\moderncvcolor{black}

\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
\setlength{\makecvtitlenamewidth}{8cm}

% personal data
\firstname{Juan Pablo}}
\familyname{Romero Garza}
\title{Curriculum Vitae}
\phone[mobile]{+1~(811)~408~6080}
\email{email}
\extrainfo{*Possibility of moving to another city}
\photo[74pt][0.4pt]{picture.png}

\begin{document}
\makecvtitle
\end{document}

• Can you post some code and help us? – user11232 Aug 23 '15 at 1:37
• Try \firstname{\raggedright Juan Pablo} – user11232 Aug 23 '15 at 1:51
• I just edited my question and posted some code, thank you! – user85268 Aug 23 '15 at 2:28
• Thanks. But it may not be enough as I am not able to reproduce your problem. Please complete your code (up to \end{document}) so that we can compile it and get the same output as you posted. – user11232 Aug 23 '15 at 4:26
• Please update your distribution and try again. See How do I update my TeX distribution? – Werner Aug 24 '15 at 4:01

It seems that you are using an older version of moderncv. You used the command \makecvtitlenamewidth that has been renamed with version 2.0.0 of moderncv to \makecvheadnamewidth. I changed it in the following MWE.

Because there is a little bug (and therefore an updating to the current version 2.0.0 can not help) in class moderncv I used an patch to get a better distance between first and last name line (change [1ex] to your needs):

\usepackage{xpatch}
\makeatletter
\namestyle{\@firstname\ \@lastname}%
}{%
\namestyle{\@firstname\\[1ex]\@lastname}% [25pt]
}{}{false}
\makeatother


I hope with a new version of moderncv this workaround is no more neccessary.

With the following complete MWE

\documentclass[11pt,letterpaper,sans]{moderncv} % version 2.0.0

\moderncvstyle{classic}
\moderncvcolor{black}

\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
\setlength{\makecvheadnamewidth}{8cm} % used in older versions of moderncv! makecvtitlenamewidth

\usepackage{xpatch}
\makeatletter
\namestyle{\@firstname\ \@lastname}%
}{%
\namestyle{\@firstname\\[1ex]\@lastname}% [25pt] <==========================
}{}{false}
\makeatother

% personal data
\firstname{Juan Pablo}%}
\familyname{Romero Garza}
\title{Curriculum Vit\ae}

The advantage of patching (instead of writing \familyname{\\[1ex]Romero Garza}) is that the resulting pdf has no errors in the bookmarks of the pdf.