5

I'm using the moderncv package (classic style) and I would like to reduce the vertical space between the \closing of the letter and the signatur at the end.

enter image description here

The vertical space between Sincerely and John Lennon is too big.

Here my minimal working example:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% "ModernCV" CV and Cover Letter
% LaTeX Template
% Version 1.3 (29/10/16)

% Original author:
% Xavier Danaux (xdanaux@gmail.com) with modifications by:
% Vel (vel@latextemplates.com)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[11pt,a4paper,roman]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman

\moderncvstyle{classic} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

\usepackage{ngerman}
\usepackage[utf8]{inputenc} % Damit Umlaute verwendet werden können
\usepackage{ifsym}
\usepackage{lipsum}

\usepackage[scale=0.75]{geometry} % Reduce document margins
\setlength{\hintscolumnwidth}{3.9cm} % Uncomment to change the width of the dates column
%\setlength{\makecvtitlenamewidth}{10cm} % For the 'classic' style, uncomment to adjust the width of the space allocated to your name
\nopagenumbers{}                                  % uncomment to suppress automatic page numbering for CVs longer than one page

%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\firstname{John}  % Your first name
\familyname{Lennon} % Your last name

% All information in this block is optional, comment out any lines you don't need
\title{CV}
\address{\textifsymbol{18}  Champ Elisee}{12345, Dubai}
\mobile{+1234566789}
\email{email@email.com}

%----------------------------------------------------------------------------------------

\begin{document}

%----------------------------------------------------------------------------------------
%   COVER LETTER
%----------------------------------------------------------------------------------------

\clearpage

\recipient{Department of Mechatronics \rlap{and Robotics}}{Prof.\\YXCE 45\\987667 Baltimore} % Letter recipient
\date{Dubai, \today} % Letter date
\opening{} % Opening greeting
\closing{Sincerely,} % Closing phrase

\makelettertitle % Print letter title

\textbf{Letter of presentation}

\lipsum

\makeletterclosing % Print letter signature

\newpage

\end{document}

Using \vspace doesn't help and a solution like this one

\closing{Sincerely, \\ \textbf{John Lennon}}

works but produces my signature twice...so I have another problem...

Any idea? Thanks.

6

Well, the relevant code you have to change in your preamble is the following (needed to add \makeatletter and \makeatother for the usage of @):

\renewcommand*{\makeletterclosing}{
  \@closing\\[3em]% <===========================================
  {\bfseries\@firstname~\@lastname}%
  \ifthenelse{\isundefined{\@enclosure}}{}{%
    \\%
    \vfil%
    {\color{color2}\itshape\enclname: \@enclosure}}%
    \vfil}

The code \\[3em] defines the added space between your closing phrase and signature.

Change it to \\ or change the value in [] to a value you like.

See the complete code

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% "ModernCV" CV and Cover Letter
% LaTeX Template
% Version 1.3 (29/10/16)

% Original author:
% Xavier Danaux (xdanaux@gmail.com) with modifications by:
% Vel (vel@latextemplates.com)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[11pt,a4paper,roman]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman

\moderncvstyle{classic} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

\usepackage{ngerman}
\usepackage[utf8]{inputenc} % Damit Umlaute verwendet werden können
\usepackage{ifsym}
\usepackage{lipsum}

\usepackage[scale=0.75]{geometry} % Reduce document margins
\setlength{\hintscolumnwidth}{3.9cm} % Uncomment to change the width of the dates column
%\setlength{\makecvtitlenamewidth}{10cm} % For the 'classic' style, uncomment to adjust the width of the space allocated to your name
\nopagenumbers{}                                  % uncomment to suppress automatic page numbering for CVs longer than one page

\makeatletter
\renewcommand*{\makeletterclosing}{
  \@closing\\% <===================================================
  {\bfseries\@firstname~\@lastname}%
  \ifthenelse{\isundefined{\@enclosure}}{}{%
    \\%
    \vfil%
    {\color{color2}\itshape\enclname: \@enclosure}}%
    \vfil}
\makeatother


%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\firstname{John}  % Your first name
\familyname{Lennon} % Your last name

% All information in this block is optional, comment out any lines you don't need
\title{CV}
\address{\textifsymbol{18}  Champ Elisee}{12345, Dubai}
\mobile{+1234566789}
\email{email@email.com}

%----------------------------------------------------------------------------------------

\begin{document}

%----------------------------------------------------------------------------------------
%   COVER LETTER
%----------------------------------------------------------------------------------------

\clearpage

\recipient{Department of Mechatronics \rlap{and Robotics}}{Prof.\\YXCE 45\\987667 Baltimore} % Letter recipient
\date{Dubai, \today} % Letter date
\opening{} % Opening greeting
\closing{Sincerely,} % Closing phrase

\makelettertitle % Print letter title

\textbf{Letter of presentation}

\lipsum

\makeletterclosing % Print letter signature

\newpage

\end{document}

and its result:

enter image description here

3
  • It works!!! Many thanks... I found the code in the file: moderncvstyleclassic.sty
    – Dave
    Jan 31 '19 at 12:55
  • Can you please point me to right source where I can download the version 2.0.0? I tried this one: ctan.org/pkg/moderncv?lang=de but the example files inside doesn't have any reference to 2.0.0
    – Dave
    Jan 31 '19 at 15:43
  • 1
    @dave That is the current version, as you can see on the first page comming up after clicking on your given link. Or you have a look into file moderncv.cls at the beginning ...
    – Mensch
    Jan 31 '19 at 15:52

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.