答案1
确实,它不支持多列布局,但让它在双列模式下工作并不太难。
对于任何文档,您都可以使用该包将页面的部分内容设置为双列模式multicol
。文档的基本设置如下
\documentclass{moderncv}
// -- Load all packages
// -- Provide personal info (name, ...)
\begin{document}
\makecvtitle
\begin{multicols}{2}
// -- Insert CV here
\end{multicols}
\end{document}
然而,这将导致非常不愉快的结果。原因在于如何moderncv
排版所有条目。例如,查看以下 的定义\cvitem
,取自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}}
因此,所有内容都放入tabular
具有预定义列宽的行中。现在,这不能很好地与包配合使用的主要原因multicol
是,它依赖于\textwidth
宏,而宏在进入双列模式时不会改变。因此,我们必须重新定义(至少)这些长度以依赖于\linewidth
。必须这样做里面环境,所以使用multicols
正确的。\linewidth
对于不同的命令,您可能需要调整不同的长度,并且可能需要摆弄才能获得令人满意的结果。
\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}
简历上的所有信息均来自这里。