# ModernCV classic - family name on separate line

I'm trying to create a resume using the moderncv classic template, but the lay-out of my name is a bit off. Since my last name is fairly long and the personal information box on the right includes a photo as well, my family name gets hyphenated. When I use the option \usepackage[scale=0.75]{geometry} to decrease the margins, my family name gets pushed to the second line in its entirety, but the first name and family name are not properly aligned. The problem also persists when using different fonts or XeLaTeX instead of LuaLatex.

What is the correct way to move my family name to the second line manually and align it properly? I prefer this approach to reducing the font size of the name so that it can fit on a single line (as was answered here, although the accepted answer seems to cause a bunch of warning messages in texstudio). This was another similar problem, but I did not manage to translate the solution to the \familyname option of moderncv.

Here is my minimal working example and the output:

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

\moderncvstyle{classic}
%\usepackage[scale=0.75]{geometry}

\firstname{Klmopq}\familyname{VeryLongName}
\extrainfo{Personal Information}
\photo[64pt][0.4pt]{lion}

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


• Sorry 'bout that, I had lost track of this post. I ended up decreasing the name font size to fit everything on one line (tex.stackexchange.com/a/128054), but I just tried your solution and it does indeed prevent hyphenation of the name. I still feel like the "K" and "V" are not left aligned properly, but at this point I assume it's just inherent to the font. – Zenit May 8 '16 at 7:32

At last there is a little bug in the class moderncv.

One possibility is to write

\name{Klmopq}{\\[1ex]\mbox{VeryLongName}}


With \\[1ex] you get a new line with 1ex distance between the two lines. Change 1ex to values you want. Command \mbox does not allow a hyphenation of the VeryLongname.

With command \setlength{\makecvheadnamewidth}{12cm} you can define the length available for the name(s).

With the following MWE (see important changes marked with <=====):

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

\moderncvstyle{classic}
\usepackage[%
scale=0.75
,showframe % <===== to show the used margins and typing area
]{geometry}

%\firstname{Klmopq}\familyname{VeryLongName}
\name{Klmopq}{\\[1ex]\mbox{VeryLongName}} % <===========================