5

I am writing a cover letter using moderncv. The problem is when executing the latex file I get two pages with only my name in the second page. I would like to cut the space between sincerely and my name. How to do this ?

\makeletterclosing

will produce for example

Sincerely
   | 
   |
   |---------------------> How to cut the space or make it small
   |                       so that my name can be in the first page?          
   |
My name
  • 1
    \makeletterclosing is redefined according to the style provided in \moderncvstyle. I didn't check the other styles, but with classic, it suffices to use \usepackage{xpatch} and then patch \xpatchcmd{\makeletterclosing}{[3em]}{[1em]}{}{}. The default space is 3em, I made it 1em. – Paulo Cereda Aug 18 '14 at 18:04
11

From my comment to a proper answer. :)

\makeletterclosing is redefined according to the style provided in \mderncvstyle. I didn't check the other styles, but with classic, it suffices to patch the command and add the desired space.

Let's say we want to have 1em. We can patch \makeletterclosing with xpatch (my favourite package):

\usepackage{xpatch}
\xpatchcmd{\makeletterclosing}{[3em]}{[1em]}{}{}

Or we can rely on etoolbox, which is already loaded by moderncv:

\patchcmd{\makeletterclosing}{[3em]}{[1em]}{}{}

Then we are have:

\documentclass{moderncv}
\moderncvstyle{classic}

%\usepackage{xpatch}
%\xpatchcmd{\makeletterclosing}{[3em]}{[1em]}{}{}

\patchcmd{\makeletterclosing}{[3em]}{[1em]}{}{}

\firstname{Donald}
\familyname{Duck}

\usepackage{kantlipsum}

\begin{document}

\recipient{Uncle Scrooge}{}
\opening{Dear Uncle,}
\closing{Yours sincerely,}

\makelettertitle

\kant[1]

\makeletterclosing

\end{document}

The output:

Quack

Yay! :)

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.