Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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} 
share|improve this question

1 Answer 1

up vote 5 down vote accepted

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}}{}{}
share|improve this answer
    
I recently come across \patchcmd quite often. I guess it's time I take a look at etoolbox's manual... well, I just did. –  Ali Mehrizi Jun 6 '12 at 15:44
    
Actually moderncv loads etoolbox too. –  Ali Mehrizi Jun 6 '12 at 15:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.