1

I am looking for help. I have the impression that the line spacing is wrong in \title in moderncv if title contains so many information that they are distributed over two lines. Do you have an idea how to fix this, please? Or do you have a better idea for the design, please? Many thanks!

I think the definition of title is just:

\renewcommand*{\title}[1]{\def\@title{#1}}

My mini working example is as follows.

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

\usepackage[left=1.7cm, right=1.7cm, top=1cm, bottom=1cm]{geometry}


\firstname{Max}
\familyname{Mustermann}

\title{Chemist\protect\\[0.2\baselineskip]
Inorganic Chemistry, Organic Chemistry, Software development, Instrumentation, R\&D}

\address{Musterhausen, Musterland}{}{}
\email{max.muster@gmail.com}
\phone{+1 123456789}

\begin{document}

\makecvtitle

\section{Work Experience}
\end{document}

Output as PDF: enter image description here

2
  • The real typesetting is made by another macro --- the \title you cited simply store the argument in \@title. There should be a \maketitle or something in the macro that uses \@title... (no idea about this package, sorry...)
    – Rmano
    Feb 22 at 11:32
  • I tried to investigate further. In moderncv.cls I find \newcommand*{\makecvtitle}{% \makecvhead% \makecvfoot} \newcommand*{\makecvhead}{} \newcommand*{\makecvfoot}{}
    – Gudrun
    Feb 22 at 12:45
1

In your case I would simply use an dirty workaround: add an second \protect\\[0.2\baselineskip] before Software in your title.

Complete workaround:

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

% moderncv themes
\moderncvstyle{classic} %
\moderncvcolor{blue} 

\usepackage[left=1.7cm, right=1.7cm, top=1cm, bottom=1cm]{geometry}

\name{Max}{Mustermann}

\title{Chemist\protect\\[0.2\baselineskip]%
Inorganic Chemistry, Organic Chemistry, \protect\\[0.2\baselineskip]% <================
Software development, Instrumentation, R\&D}

\address{Musterhausen, Musterland}{}{}
\email{max.muster@gmail.com}
\phone{+1 123456789}


\begin{document}

\makecvtitle

\section{Work Experience}
\end{document}

resulting in the following pdf:

resulting pdf

3
  • Thank you very much. Is '[0.2\baselineskip]' the normal spacing between two lines in moderncv or did you choose this distance randomly, please?
    – Gudrun
    Apr 30 at 19:15
  • @Gudrun I choosed the same value you used before :-) The normal spacing between two lines is \baselineskip ...
    – Mensch
    May 17 at 9:35
  • Thank you for your help.
    – Gudrun
    May 28 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.