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:



\extrainfo{Personal Information}


enter image description here

  • 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
    Commented May 8, 2016 at 7:32

1 Answer 1


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

One possibility is to write


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

 ,showframe % <===== to show the used margins and typing area

\name{Klmopq}{\\[1ex]\mbox{VeryLongName}} % <===========================
\setlength{\makecvheadnamewidth}{12cm} % <==============================

%\extrainfo{Personal Information}
\extrainfo{Lots Of Personal Information}


you get the result:

result of given MWE

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .