I've been learning moderncv to prepare my CV since the beginning of last year, yet I am not quite familiar with the details.

I have included in my resume a section "referees" using the code suggested by other users. It worked perfectly in the past but it seems some of the code is currently outdated and the code is not functioning. Whenever I compile the code I receive the following message:

​! Undefined control sequence. <argument>
   \listdoubleitemmaincolumnwidth

So I guess the problem lies in the above argument but I am probably wrong.

Here is an example:

\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{john@doe.org} 
\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}
    {}
    {reshetik@math.berkeley.edu}
    {510-643-6234}%
    }
    {\cvreference{Mikhail Khovanov}
    {Department of Mathematics}
    {Columbia University}
    {990 Broadway}
    {New York, NY 10027}
    {khovanov@columbia.edu}
    {212-854-4186}%
    }


\end{document}

enter image description here

  • 1
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – ChrisS Jan 1 '17 at 10:47
  • If I compile the exact code, I get no error and no output. – egreg Jan 1 '17 at 16:00
  • Sorry I just made some modifications with the code and I included a photo of the output. It should look more clear. – rubacc1234 Jan 2 '17 at 1:13

Well, an quick and dirty solution is to define the missing variable (used in an today outdated version of moderncv) new and set an proper value, for example with

\newlength{\listdoubleitemmaincolumnwidth}%
\setlength{\listdoubleitemmaincolumnwidth}{6.5cm}% 

(Change 6.5cm to a value you need ...)

Complete 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{john@doe.org} 
\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}
  {}
  {reshetik@math.berkeley.edu}
  {510-643-6234}%
}
{\cvreference{Mikhail Khovanov}
  {Department of Mathematics}
  {Columbia University}
  {990 Broadway}
  {New York, NY 10027}
  {khovanov@columbia.edu}
  {212-854-4186}%
}


\end{document}

with the result (with an current version 2.0.0 of moderncv)

enter image description here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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