[Tex/LaTex] Changing margins in moderncv

marginsmoderncv

I've been working with the moderncv package and have hit the limit of my LaTeX skills. I've been trying to shrink the top and bottom margins enough to accomodate about two extra lines, but have had no luck.

\documentclass[11pt,a4paper]{moderncv}

% moderncv themes
\moderncvtheme[blue]{casual}                 % optional argument are 'blue' (default), 'orange', 'red', 'green', 'grey' and 'roman' (for roman fonts, instead of sans serif fonts)

\usepackage[utf8]{inputenc}                   % replace by the encoding you are using

\usepackage[scale=0.8]{geometry}
\recomputelengths                             % required when changes are made to page layout lengths

% personal data
\firstname{first}
\familyname{last}
%\quote{}               % optional, remove the line if not wanted
\address{123 First St}{Somewhere, CA 90210}    % optional, remove the line if not wanted
\mobile{555.555.5555}                    % optional, remove the line if not wanted
\email{me@me.com}                      % optional, remove the line if not wanted
\extrainfo{info} % optional, remove the line if not wanted

\begin{document}
\maketitle

\section{Summary}
\cvline{}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum vehicula, justo adipiscing consectetur blandit, leo justo consequat purus, quis consectetur lectus velit in elit. Mauris iaculis dolor at justo commodo porttitor. Aliquam ipsum sem, hendrerit eu laoreet nec, ornare eu lorem. Aenean et mauris magna, at cursus magna. Morbi nisi orci, hendrerit id feugiat in, ornare sed nulla. Suspendisse metus mauris, pharetra sit amet scelerisque nec, tincidunt et magna. Etiam mollis massa et urna laoreet feugiat. Donec vestibulum massa quis massa euismod bibendum. Nam accumsan ullamcorper nulla a sodales. Mauris lorem massa, consectetur at luctus sit amet, tempor ac eros. Sed molestie, quam eu gravida luctus, urna lacus laoreet eros, vitae euismod orci velit eget enim. Integer aliquam pharetra erat ut blandit.}

\section{Technical Skills}
\cvline{A great skill}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum vehicula, justo adipiscing consectetur blandit, leo justo consequat purus, quis consectetur lectus velit in elit. Mauris iaculis dolor at justo commodo porttitor. Aliquam ipsum sem, hendrerit eu laoreet nec, ornare eu lorem. Aenean et mauris magna, at cursus magna. Morbi nisi orci, hendrerit id feugiat in, ornare sed nulla. Suspendisse metus mauris, pharetra sit amet scelerisque nec, tincidunt et magna. Etiam mollis massa et urna laoreet feugiat. Donec vestibulum massa quis massa euismod bibendum. Nam accumsan ullamcorper nulla a sodales. Mauris lorem massa, consectetur at luctus sit amet, tempor ac eros. Sed molestie, quam eu gravida luctus, urna lacus laoreet eros, vitae euismod orci velit eget enim. Integer aliquam pharetra erat ut blandit.]}

\section{Experience}
\cventry{2000--present}{Space occupier}{freelance}{San Francisco}{}{%
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum vehicula, justo adipiscing consectetur blandit, leo justo consequat purus, quis consectetur lectus velit in elit. Mauris iaculis dolor at justo commodo porttitor. Aliquam ipsum sem, hendrerit eu laoreet nec, ornare eu lorem. Aenean et mauris magna, at cursus magna. Morbi nisi orci, hendrerit id feugiat in, ornare sed nulla. Suspendisse metus mauris, pharetra sit amet scelerisque nec, tincidunt et magna. Etiam mollis massa et urna laoreet feugiat. Donec vestibulum massa quis massa euismod bibendum. Nam accumsan ullamcorper nulla a sodales. Mauris lorem massa, consectetur at luctus sit amet, tempor ac eros. Sed molestie, quam eu gravida luctus, urna lacus laoreet eros, vitae euismod orci velit eget enim. Integer aliquam pharetra erat ut blandit.}

\closesection{}                   % needed to renewcommands
\renewcommand{\listitemsymbol}{-} % change the symbol for lists

\end{document}

I have tried half a dozen things, including \addtolength with \topmargin, which seems to move the footer up when I subtract length.

Best Answer

If you only want to fit the text on one page than I recommend the simple pragmatic approach of adjusting the spaces manually using some \vspace* with a negative value, normally a factor of \baselineskip.

The following fits the last two lines on the page which are just too much to fit otherwise:

\documentclass[11pt,a4paper]{moderncv}

% moderncv themes
\moderncvtheme[blue]{casual}                 % optional argument are 'blue' (default), 'orange', 'red', 'green', 'grey' and 'roman' (for roman fonts, instead of sans serif fonts)

\usepackage[utf8]{inputenc}                   % replace by the encoding you are using

\usepackage[scale=0.8]{geometry}
\recomputelengths                             % required when changes are made to page layout lengths

% personal data
\firstname{first}
\familyname{last}
%\quote{}               % optional, remove the line if not wanted
\address{123 First St}{Somewhere, CA 90210}    % optional, remove the line if not wanted
\mobile{555.555.5555}                    % optional, remove the line if not wanted
\email{me@me.com}                      % optional, remove the line if not wanted
\extrainfo{info} % optional, remove the line if not wanted

\usepackage{lipsum}
\begin{document}
\vspace*{-2\baselineskip}
\maketitle
\vspace{-1.5\baselineskip}
\section{Summary}
\cvline{}{\lipsum[1-2]}

\section{Technical Skills}
\cvline{A great skill}{\lipsum[3]}

\section{Experience}
\cventry{2000--present}{Space occupier}{freelance}{San Francisco}{}{%
\lipsum[5]
two more lines two more lines two more lines two more lines two more lines two more
two more lines two more lines two more lines two more lines two more lines two more
}

\closesection{}                   % needed to renewcommands
\renewcommand{\listitemsymbol}{-} % change the symbol for lists

\end{document}