9

I'm using moderncv to typeset my CV. One of the challenges I have with this package is the inconsistent top margins (as shown in the MWE below). If a new page starts with a section, it will have an additional 1 cm of vertical space. A quick-and-dirty solution to this is to add \vspace*{-1cm} whenever this happens, but obviously this is not the best solution. I want \section to not add any extra space when it happens the first thing in a page. How can I do this?

Here's the MWE:

\documentclass[11pt,letterpaper]{moderncv}

\moderncvstyle{classic}
\moderncvcolor{purple}  % No, I don't really use purple for my CV
\firstname{Firsty}
\familyname{Lastie}

\usepackage[margin=1in]{geometry}

\begin{document}

\section{Employment}
\newpage
    \cventry{Jan.~2012 to Present}{Dream job}{World-class employer}{A megacity}{}{}

\newpage
\section{Education}
    \cventry{Sept.~2007 to Aug.~2011}{Ph.D. in \TeX ology}{University of \TeX land}{\TeX land}{}{}

\newpage
\vspace*{-1cm}       % not-so-good solution
\section{Awards and Honors}
\subsection{Awards}
    \cventry{2011}{Best Person Award}{Consortium of Bad People}{}{}{}

\end{document} 

1 Answer 1

6

You want to replace \vspace* with \vspace in moderncvs definition of \section. Add the following to your preamble:

\usepackage{etoolbox}
\patchcmd{\section}{\vspace*{2.5ex}}{\vspace{2.5ex}}{}{}
2
  • I recently come across \patchcmd quite often. I guess it's time I take a look at etoolbox's manual... well, I just did. Commented Jun 6, 2012 at 15:44
  • Actually moderncv loads etoolbox too. Commented Jun 6, 2012 at 15:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .