2

How could I increase the spacing between \firstname and \familyname?

I tried redefining the \makecvtitle command, unfortunately I did not succeed.

I would like to make the vertical space bigger as the basic setting makes the first name and family name too close together:

enter image description here

I am using the classic moderncvstyle.

MWE:

\documentclass[11pt,a4paper,roman]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}

\pagestyle{fancy} \rfoot{\thepage}

\usepackage[utf8]{inputenc}

\usepackage[scale=0.75]{geometry}

\firstname{firstname\hspace{1cm}} \familyname{familyname} \title{Curriculum Vitae} \address{Address} \mobile{+123~000~000~000} \email{email}

\usepackage{subfiles}

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

Thank you

3 Answers3

2

Alternatively, you could use \strut as in

\firstname{\strut firstname\hspace{30mm}} % \hspace{30mm} to force a line break.
\familyname{\strut familyname}

For example, LaTeX and plainTeX provide the command \strut to insert a font size specific strut. In LaTeX it has a height of 70% of the baseline skip (the distance between the baselines of two consecutive lines of text) and a depth of 30% of the baseline skip. It ensures that two vertical stacked boxes which include such a strut have the same distance like two normal consecutive lines. (Reference)

2

Well, you can patch the current version 2.1.0 of moderncv to add a new line between first and last name with for example \\[0.3em] like this:

\makeatletter
\patchcmd{\makecvhead}{% <==============================================
  \namestyle{\@firstname\ \@lastname}%
  }{%
  \namestyle{\@firstname\\[0.3em] \@lastname}% <============ change 0.3em to anything you like
  }{%success
  }{%failure
  }
\makeatother

Then you have no problems with the automatic generated metadatas by class moderncv using your given firstname and lastname without disturbing formating commands ...

With the following complete MWE

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

\moderncvstyle{classic} % head 1 body 1 \moderncvcolor{blue}

\pagestyle{fancy} \rfoot{\thepage}

\usepackage[utf8]{inputenc} \usepackage[scale=0.75]{geometry}

\makeatletter \patchcmd{\makecvhead}{% <============================================== \namestyle{@firstname\ @lastname}% }{% \namestyle{@firstname\[0.3em] @lastname}% <============ change 0.3em to anything you like }{%success }{%failure } \makeatother

\firstname{firstname} \familyname{familyname} \title{Curriculum Vitae} \address{Address} \mobile{+123~000~000~000} \email{email}

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

you get the following pdf:

resulting pdf

Mensch
  • 65,388
0

In the end I solved by using \name instead of \firstname and \lastname and breaking in the second argument like this:

\name{Firstname}{\\[0.5ex]Lastname}

Which produces the desired output:

enter image description here