[Tex/LaTex] How to reduce vertical space between closing and signatur

moderncv

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.

Best Answer

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