[Tex/LaTex] Two columns with moderncv

cvmoderncv

I'm preparing my resume with "moderncv" and I want to have this format

A4

I've read that cventry doesn't support multiple pages. Is there any alternative?

Best Answer

It's true that it doesn't support multicolumn layouts as it is, but it's not too difficult to make it work in two-column mode.

As for any document, you can set parts of the page in a two-column mode by using the multicol package. The basic setup of the document will be

\documentclass{moderncv}
// -- Load all packages
// -- Provide personal info (name, ...)
\begin{document}
\makecvtitle
\begin{multicols}{2}
    // -- Insert CV here
\end{multicols}
\end{document}

This will, however, lead to very unpleasent results. The reason is the way how moderncv typesets all entries. For example, look at the following definition of \cvitem, taken from moderncvbodyi.sty:

% Relevant lenghts
\setlength{\hintscolumnwidth}{0.175\textwidth}
\setlength{\separatorcolumnwidth}{0.025\textwidth}
\setlength{\maincolumnwidth}{\textwidth-\leftskip-\rightskip-\separatorcolumnwidth-\hintscolumnwidth}

% Definition
\renewcommand*{\cvitem}[3][.25em]{%
  \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
    \raggedleft\hintstyle{#2} &{#3}%
  \end{tabular}%
  \par\addvspace{#1}}

So, all content is put into a tabular with pre-defined column-widths. Now, the main reason that this doesn't work well with the multicol package is, that it relies on the \textwidth macro, which isn't changed when entering two-column mode. We thus have to redefine (at least) these lengths to rely on the \linewidth instead. This has to be done inside the multicols environment, so the correct \linewidth is used.

For different commands, you might have to tweak different lengths, and you might have to fiddle around to get a pleasing result.

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}

\usepackage[margin=1in]{geometry}
\usepackage[english]{babel}
\usepackage{multicol}
\setlength{\hintscolumnwidth}{2cm}
\setlength{\separatorcolumnwidth}{1em}


\title{Resume}
\firstname{Homer J.}
\familyname{Simpson}
\address{742 Evergreen Terrace}{Springfield}
\extrainfo{* May 12, 1955}
\quote{D'oh --- H.\,J.\,Simpson}

\begin{document}
\makecvtitle
\begin{multicols}{2}
\setlength{\maincolumnwidth}{\linewidth-\leftskip-\rightskip-\separatorcolumnwidth-\hintscolumnwidth}

\section{Employment}
\cventry{1989--present}{Safety Inspector}{Springfield Nuclear Power Plant}{Springfield, USA}{}{Sector 7-G}
\cventry{2002--2002}{Chief of Police}{City of Sprintfield}{Springfield, USA}{}{Secured community support in almost-successful effort to expel organized crime from city.}
\cventry{2001--2001}{Bartender}{Moe's Tavern and Homer's Hunting Club}{Springfield, USA}{}{Launched remodeling project that led to 100\,\% reduction in clientele (including myself).}
\cventry{1992--1993}{Snow-plow driver}{Mr. Plow}{Springfield, USA}{}{Owner, manager and snow-plow driver for the famous local Mr. Plow snow-plowing business.}

\section{Education}
\cvitem{Springfield High School}{High School Diploma}

\section{Awards}
\cvitem{1992}{Montgomery Burns Award for Outstanding Service in the Field of Excellence.}

\end{multicols}
\end{document}

resulting two-column resume

All info on the resume taken from here.