2

I have created a text, but as an example I created this simple text

\documentclass[a4paper,12pt,danish]{moderncv}
\moderncvtheme{classic}
\usepackage{babel}
\usepackage{lipsum}
\pagestyle{empty}
\firstname{}
\familyname{}
\address{a\\b,}{c}
\begin{document}
\recipient{a}{a}
\opening{a}
\closing{a}
\makelettertitle
\lipsum[1-3]
\makeletterclosing
\end{document}

But I am wondering, why does this create a blank page as page 2?

4

If you look at the code for \makeletterclosing in the file moderncvstyleclassic.sty you will see the following:

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

There's a line break after \@closing with a vertical spacing of 3em, this causes the page break.

Add this to your document preamble, all I did is git rid of the forced line break.

\makeatletter
\renewcommand*{\makeletterclosing}{
  \@closing%\\[3em]%
  {\bfseries \@firstname~\@familyname}%
  \ifthenelse{\isundefined{\@enclosure}}{}{%
    \\%
    \vfill%
    {\color{color2}\itshape\enclname: \@enclosure}}}
\makeatother

A blank page doesn't appear if you used just two paragraphs of lipsum, i.e \lipsum[1-2]. So it's all about margins. Obviously, you don't want to delete the line break if you're going to insert a firstname and familyname since they will be in the same line as the closing.

| improve this answer | |
  • Oh, I looked in moderncv.sty, and I could not figure it out ;) – The87Boy Feb 7 '13 at 10:24

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.