I just wanted to try out the moderncv class, and when I try to compile any of the examples, I get the following errors:

! Undefined control sequence.
l.16 \@initializecommand

! Undefined control sequence.
l.16 \@initializecommand{\moderncvstyleheadoptions

! Undefined control sequence.
\ds@left ...eadoptions {\moderncvstyleheadoptions 
l.21 \ExecuteOptions{left}

I have moderncv installed, I also tried putting it in the same folder as the project (in fact, I am prompted to the line of code


for the first error, if I click through the errors in the editor (TeXnicCenter). Any ideas?

EDIT: Using MikTex 2.9, Windows 7, moderncv version 2.0.0 (28 Jul 2015)

and for the .tex code, just copied one of the standard examples. After deleting some lines it looks like this:


\firstname {name}    % Your name
\lastname {Last name} % Your last name
\title {Title}              % Your title (optional)
\address{street and number}{post code and city} % Your current address
\mobile {number}    % Your mobile phone number
\phone {number}    % Your phone number
\email {email}          % Your email address
\homepage {link}    % Your website
\extrainfo {information} % Possible extra information e.g. website
\photo[64pt][0.4pt]{picture}  % Your photo (optional)
\quote {quote} % Life motto or something like that (optional)


\cvlanguage{Language 1}{Skill level}{Comment}
\cvcomputer{category 1}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ}
\cvline{hobby 1}{\small Description}

EDIT II: Requested List files

 *File List*
moderncv.cls    2013/04/29 v1.5.1 modern curriculum vitae and letter document class
  size11.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
etoolbox.sty    2015/08/02 v2.2a e-TeX tools for LaTeX (JAW)
  ifthen.sty    2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
 lmodern.sty    2009/10/30 v1.6 Latin Modern Fonts
     url.sty    2013/09/16  ver 3.4  Verb mode for urls, etc.
graphicx.sty    2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
graphics.sty    2014/10/28 v1.0p Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
    calc.sty    2014/10/28 v4.3 Infix arithmetic (KKT,FJ)
  xparse.sty    2016/01/19 v6377 L3 Experimental document command parser
   expl3.sty    2016/01/19 v6377 L3 programming layer (loader) 
expl3-code.tex    2016/01/19 v6377 L3 programming layer 
l3pdfmode.def    2015/11/11 v6250 L3 Experimental driver: PDF mode
microtype.sty    2013/05/23 v2.5a Micro-typographical refinements (RS)
microtype-pdftex.def    2013/05/23 v2.5a Definitions specific to pdftex (RS)
microtype.cfg    2013/05/23 v2.5a microtype main configuration file (RS)
moderncvcollection.sty    2015/07/28 v2.0.0 moderncv collections
moderncvcompatibility.sty    2013/04/29 v1.5.1 modern curriculum vitae and letter compatibility patches
moderncvcolorblue.sty    2015/07/28 v2.0.0 modern curriculum vitae and letter color scheme: blue
moderncvstyleclassic.sty    2015/07/28 v2.0.0 modern curriculum vitae and letter style scheme: classic
moderncviconsmarvosym.sty    2015/07/28 v2.0.0 modern curriculum vitae and letter icons: marvosym
    tikz.sty    2015/08/07 v3.0.1a (rcs-revision 1.151)
     pgf.sty    2015/08/07 v3.0.1a (rcs-revision 1.15)
  pgfrcs.sty    2015/08/07 v3.0.1a (rcs-revision 1.31)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
 pgfcore.sty    2010/04/11 v3.0.1a (rcs-revision 1.7)
  pgfsys.sty    2014/07/09 v3.0.1a (rcs-revision 1.48)
pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
pgfcomp-version-0-65.sty    2007/07/03 v3.0.1a (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v3.0.1a (rcs-revision 1.1)
  pgffor.sty    2013/12/13 v3.0.1a (rcs-revision 1.25)
hyperref.sty    2012/11/06 v6.83m Hypertext links for LaTeX
hobsub-hyperref.sty    2012/04/25 v1.12 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2012/04/25 v1.12 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2012/04/25 v1.12 Construct package bundles (HO)
  ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)
 intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty    2011/11/25 v1.13 Implements pdfTeX's escape features (HO)
bigintcalc.sty    2012/04/08 v1.3 Expandable calculations on big integers (HO)
  bitset.sty    2011/01/30 v1.1 Handle bit-vector datatype (HO)
uniquecounter.sty    2011/01/30 v1.2 Provide unlimited unique counter (HO)
letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
 hopatch.sty    2011/06/24 v1.1 Wrapper for package hooks (HO)
xcolor-patch.sty    2011/01/30 xcolor patch
atveryend.sty    2011/06/30 v1.8 Hooks at the very end of document (HO)
atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)
refcount.sty    2011/10/16 v3.4 Data extraction from label references (HO)
 hycolor.sty    2011/01/30 v1.7 Color options for hyperref/bookmark (HO)
 auxhook.sty    2011/03/04 v1.3 Hooks for auxiliary files (HO)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
  pd1enc.def    2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
   puenc.def    2012/11/06 v6.83m Hyperref: PDF Unicode definition (HO)
 hpdftex.def    2012/11/06 v6.83m Hyperref driver for pdfTeX
rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
   t1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
  mt-cmr.cfg    2013/05/19 v2.2 microtype config. file: Computer Modern Roman (RS)
 nameref.sty    2012/10/27 v2.43 Cross-referencing by name of section
gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)
  • I have no problems compiling your code. I guess your MikTeX is outdated. Please add \listfiles as first line in your code, compile three times and add the resulting list of used packages and version numbers to your question (see the end of the log file for the list). – Kurt Jan 26 '16 at 14:00
  • Well, I installed MikTex fresh today, so it can't really be outdated ... – EluciusFTW Jan 26 '16 at 14:01
  • It can, if you only called the installer, but you need to run afterwards the package manager to make sure all packages are up to date! Please check the version. – Kurt Jan 26 '16 at 14:02
  • other than the missing picture the example given works for me... – Elad Den Jan 26 '16 at 14:03
  • @Kurt: added the log of files you requested – EluciusFTW Jan 26 '16 at 14:04

It seems you have an problem with your TeX distribution installation on your computer or you tried to install two different moderncv versions (1.5.1 and 2.0.0) on your computer. Please check this. Best would be to update your TeX distribution and afterwards check, that all packages (moderncv too) are up to date. How to do that depends on your operating system and used TeX distribution (please search on this page for related questions for updating).

You named the command \@initializecommand{\moderncvstyleheadoptions}{}. This command is only used in version 2.0.0, but you log file tells us, you are using version 1.5.1 of moderncv. So it seems that parts of different versions are used. Because some commands changed from version 1.5.1 to 2.0.0 you got your problems.

Because some commands changed I suggest you to use the following MWE (please check the comments where I changed the code). That should run on your computer, after repairing the version problem.

For example, your command cvline is outdated.


\documentclass[11pt,a4paper]{moderncv} % version 1.5.1

%\moderncvtheme[blue]{classic}  % used in version <= 0.15

\firstname{firstname}     % Your name
\lastname{Lastname}       % Your last name
\title{Title}             % Your title (optional)
\address{street and number}{post code and city}   % Your current address
\mobile{number}           % Your mobile phone number
\phone{number}            % Your phone number
\email{email}             % Your email address
\homepage{link}           % Your website
\extrainfo{information}   % Possible extra information e.g. website
\photo[64pt][0.4pt]{example-image-a}             % Your photo (optional)
\quote{quote}             % Life motto or something like that (optional)

\setlength{\footskip}{52pt} % to avoid warning


\cvlanguage{Language 1}{Skill level}{Comment}
\cvcomputer{category 1}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ}
%\cvline{hobby 1}{\small Description} % cvline used in version <= 0.15
\cvitem{hobby 1}{Description}

I can not test it with version 1.5.1, because I'm using version 2.0.0, but it should compile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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