moderncv
我从去年年初就开始学习准备简历,但对细节还不太熟悉。
我在简历中添加了“裁判”部分,使用代码其他用户推荐。它以前运行得很好,但现在看来有些代码已经过时了,代码无法运行。每当我编译代码时,我都会收到以下消息:
! Undefined control sequence. <argument>
\listdoubleitemmaincolumnwidth
所以我猜测问题出在上述论点上,但我可能错了。
以下是一个例子:
\documentclass[11pt,a4paper,sans]{moderncv}
%% ModernCV themes
\moderncvstyle{casual}
\moderncvcolor{blue}
\renewcommand{\familydefault}{\sfdefault}
\nopagenumbers{}
%% Character encoding
\usepackage[utf8]{inputenc}
%% Adjust the page margins
\usepackage[scale=0.75]{geometry}
%% Personal data
\firstname{John}
\familyname{Doe}
\title{Resumé title (optional)}
\address{street and number}{postcode city}
\mobile{+1~(234)~567~890}
\phone{+2~(345)~678~901}
\fax{+3~(456)~789~012}
\email{[email protected]}
\homepage{www.johndoe.com}
\extrainfo{additional information}
\photo[64pt][0.4pt]{picture}
\quote{Some quote (optional)}
%%------------------------------------------------------------------------------
%% Content
%%------------------------------------------------------------------------------
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{ \textit{Grade} }{Description} % arguments 3 to 6 can be left empty
\cvitem{title}{ \emph{Title} }
\cvitemwithcomment{Language 1}{Skill level}{Comment}
\cvdoubleitem{category X}{XXX, YYY, ZZZ}{category Y}{XXX, YYY, ZZZ}
\cvlistitem{Item 1}
\cvlistdoubleitem{Item 2}{Item 3}
%% ...
%% A publications list
\nocite{*}
\bibliographystyle{plain}
\bibliography{publications} % a bibtex file containing the list of publications
\section{Referees}
\newcommand{\cvdoublecolumn}[2]{%
\cvline{}{%
\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#1\end{minipage}%
\hfill%
\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#2\end{minipage}%
}%
}
\newcommand{\cvreference}[7]{%
\textbf{#1}\newline% Name
\ifthenelse{\equal{#2}{}}{}{\addresssymbol~#2\newline}%
\ifthenelse{\equal{#3}{}}{}{#3\newline}%
\ifthenelse{\equal{#4}{}}{}{#4\newline}%
\ifthenelse{\equal{#5}{}}{}{#5\newline}%
\ifthenelse{\equal{#6}{}}{}{\emailsymbol~\texttt{#6}\newline}%
\ifthenelse{\equal{#7}{}}{}{\phonesymbol~#7}}
\cvdoublecolumn{\cvreference{Nicolai Reshetikhin}
{Department of Mathematics}
{University of California}
{Berkeley, CA 94720-3840}
{}
{[email protected]}
{510-643-6234}%
}
{\cvreference{Mikhail Khovanov}
{Department of Mathematics}
{Columbia University}
{990 Broadway}
{New York, NY 10027}
{[email protected]}
{212-854-4186}%
}
\end{document}
答案1
好吧,一个快速而肮脏的解决方案是定义缺失的变量(在今天的过时版本中使用moderncv
)new并设置一个适当的值,例如
\newlength{\listdoubleitemmaincolumnwidth}%
\setlength{\listdoubleitemmaincolumnwidth}{6.5cm}%
(更改6.5cm
为您需要的值...)
完成 MWE:
\documentclass[11pt,a4paper,sans]{moderncv} % version ??
%% ModernCV themes
\moderncvstyle{casual}
\moderncvcolor{blue}
\renewcommand{\familydefault}{\sfdefault}
\nopagenumbers{}
%% Character encoding
\usepackage[utf8]{inputenc}
%% Adjust the page margins
\usepackage[scale=0.75]{geometry}
%% Personal data
\firstname{John}
\familyname{Doe}
\title{Resumé title (optional)}
\address{street and number}{postcode city}
\mobile{+1~(234)~567~890}
\phone{+2~(345)~678~901}
\fax{+3~(456)~789~012}
\email{[email protected]}
\homepage{www.johndoe.com}
\extrainfo{additional information}
\photo[64pt][0.4pt]{example-image}
\quote{Some quote (optional)}
\newlength{\listdoubleitemmaincolumnwidth}%
\setlength{\listdoubleitemmaincolumnwidth}{6.5cm}%
%%------------------------------------------------------------------------------
%% Content
%%------------------------------------------------------------------------------
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{ \textit{Grade} }{Description} % arguments 3 to 6 can be left empty
\cvitem{title}{ \emph{Title} }
\cvitemwithcomment{Language 1}{Skill level}{Comment}
\cvdoubleitem{category X}{XXX, YYY, ZZZ}{category Y}{XXX, YYY, ZZZ}
\cvlistitem{Item 1}
\cvlistdoubleitem{Item 2}{Item 3}
%% ...
%% A publications list
\nocite{*}
\bibliographystyle{plain}
\bibliography{publications} % a bibtex file containing the list of publications
\section{Referees}
\newcommand{\cvdoublecolumn}[2]{% \cvdoubleitem[spacing]{header1}{text1}{header2}{text2} \cvlistdoubleitem[label]{item1}{item2}
\cvline{}{%
\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#1\end{minipage}% \newcounter{cvcolumnscounter}
\hfill%
\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#2\end{minipage}% \newcounter{cvcolumnsautowidthcounter}
}%
}
\newcommand{\cvreference}[7]{%
\textbf{#1}\newline% Name
\ifthenelse{\equal{#2}{}}{}{\addresssymbol~#2\newline}%
\ifthenelse{\equal{#3}{}}{}{#3\newline}%
\ifthenelse{\equal{#4}{}}{}{#4\newline}%
\ifthenelse{\equal{#5}{}}{}{#5\newline}%
\ifthenelse{\equal{#6}{}}{}{\emailsymbol~\texttt{#6}\newline}%
\ifthenelse{\equal{#7}{}}{}{\phonesymbol~#7}}
\cvdoublecolumn{\cvreference{Nicolai Reshetikhin}
{Department of Mathematics}
{University of California}
{Berkeley, CA 94720-3840}
{}
{[email protected]}
{510-643-6234}%
}
{\cvreference{Mikhail Khovanov}
{Department of Mathematics}
{Columbia University}
{990 Broadway}
{New York, NY 10027}
{[email protected]}
{212-854-4186}%
}
\end{document}
结果(当前版本为 2.0.0 moderncv
)