I have just downloaded the academic researcher moderncv but cannot compile it due to the following error

ERROR: Undefined control sequence.

--- TeX said ---
l.16 \@initializecommand
                        {\moderncvstyleheadoptions}{} 

The document comes from https://fr.sharelatex.com/templates/cv-or-resume/academic-researcher-cv, I compile this one wihout a change.

I'm not quite familiar with TeX, maybe it's just a missing package. Thank you.

  • Welcome to TeX.SX! From where have you got this “academic researcher moderncv”. 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}. Also, I consider using templates a bad idea in any case. – Henri Menke Feb 3 '16 at 9:22
  • I totally agree with you on the fact that it's not a good idea to use template. In my case it's not important, a teacher asked me one before making me a letter of recommendation, so it's not that important. But my original CV is fully edited by me ! Is moderncv a package ? – Nicolas Scotto Di Perto Feb 3 '16 at 9:30
  • Yes, moderncv is a package, but it is poorly documented. Thus there a numerous templates, all depending on different versions of moderncv. – Henri Menke Feb 3 '16 at 9:41
  • @NicolasScottoDiPerto: The template seems very bloated and refers to many changes to the original style. When I try to run it, it does not work either. Maybe you can try another template? – HATEthePLOT Feb 3 '16 at 10:16
up vote 1 down vote accepted

I edited the main.tex of the package. It seems to be very messed up and uses undeclared commands. I commented out the respecting lines and made some corrections, especially to the documentclass argument that was given double (?!). Replace the code in your main.tex with this code. It should work with an up to date latex version.

    %% start of file `main.tex'.
%% Copyright 2014 Francois Mouton (moutonf@gmail.com).
%
% This template is adapted from the work performed by Xavier Danaux (xdanaux@gmail.com).
% This template further extends the functionality by integrating the moderntimeline package.
% This template also includes custom Biblatex style to print bibliography items with the moderntimeline package.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.


\documentclass[11pt,a4paper,sans]{moderncv}        % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')

% moderncv themes
\moderncvstyle{classic}                             % Only the 'classic' style is fully functional with the modifications made. The other options, 'casual' (default), 'oldstyle' and 'banking' has minor typesetting problems with the current modifications.
\moderncvcolor{blue}                               % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
%\renewcommand{\familydefault}{\sfdefault}         % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name

% character encoding
\usepackage[utf8]{inputenc}                       % if you are not using xelatex ou lualatex, replace by the encoding you are using

% adjust the page margins
\usepackage[scale=0.75]{geometry}
%\setlength{\hintscolumnwidth}{3cm}                % if you want to change the width of the column of the timeline
%\setlength{\makecvtitlenamewidth}{10cm}           % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. Be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks.

%-------------------Inlcuding pdfpages package-------------------------------------------------------------

\usepackage{pdfpages/pdfpages}

%-------------------Including moderntimeline package-------------------------------------------------------

\usepackage{moderntimeline/moderntimeline}

\tlmaxdates{2004}{2014}                             % Set the scale of the timeline. \tlmaxdates{startDate}{endDate}

%-------------------Including xpatch package---------------------------------------------------------------

\usepackage{xpatch/xpatch}

%-------------------Including Biblatex package-------------------------------------------------------------

\usepackage[url=false,
    backend=biber,                                  % This can be set to either biber or bibtex. If references are missing just change back and forth between biber and bibtex..
    style=authoryear,
    doi=false,  
    isbn=false,
    backref=false,
    dashed=false,                                   % Do not add a dash out authors for subsequent articles with the same authors.
    maxnames=99,                                    % Amount of authors to include before abbreviating.
    sorting=ydnt]{biblatex}                         % Sorting in reverse order

\addbibresource{cvreferences.bib}                   % Include your bibtex file here. Format: fileName.bib

\input{biblatex_modifications/standard_modification.tex}        % Modifying the default standard.tex style of Biblatex. This modification is performed to include the moderntimeline package.

%-------------------Defining a CV Reference column style and a CV reference entry block-------------------

% Adapted from the solution provided in: http://tex.stackexchange.com/questions/34881/references-section-in-a-cv
% usage: \cvreference{name}{address line 1}{address line 2}{address line 3}{address line 4}{e-mail address}{phone number}{mobile phone number}
% Everything but the name is optional
% If \addresssymbol, \emailsymbol or \phonesymbol are specified, they will be used.
% (Per default, \addresssymbol isn't specified, the other two are specified.)
% If you don't like the symbols, remove them from the following code, including the tilde ~ (e.g. \phonesymbol~).

\newcommand{\cvreferencecolumn}[2]{%
  \cvitem[0.75em]{}{%
    \begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#1\end{minipage}%
    \hfill%
    \begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#2\end{minipage}%
    }%
}

\newcommand{\cvreference}[8]{%
    \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{\href{mailto:#6}{\nolinkurl{#6}}}\newline}%
    \ifthenelse{\equal{#7}{}}{}{\phonesymbol~#7\newline}
    \ifthenelse{\equal{#8}{}}{}{\mobilephonesymbol~#8}}

%-------------------Personal Data for CV title-----------------------------------------------------------
% Example:
\name{John}{Doe}
\title{Resumé title}                               % optional, remove / comment the line if not wanted
\address{street and number}{postcode city}{country}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty
\phone[mobile]{+1~(234)~567~890}                   % optional, remove / comment the line if not wanted
\phone[fixed]{+2~(345)~678~901}                    % optional, remove / comment the line if not wanted
\phone[fax]{+3~(456)~789~012}                      % optional, remove / comment the line if not wanted
\email{john@doe.org}                               % optional, remove / comment the line if not wanted
\homepage{www.johndoe.com}                         % optional, remove / comment the line if not wanted
\extrainfo{additional information}                 % optional, remove / comment the line if not wanted
\photo[64pt][0.4pt]{images/picture}                       % optional, remove / comment the line if not wanted; '64pt' is the height the picture must be resized to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame) and 'picture' is the name of the picture file stored
\quote{Some quote}                                 % optional, remove / comment the line if not wanted

%-------------------------------------------------------------------------------------------------------
%   Content
%-------------------------------------------------------------------------------------------------------
\begin{document}

%-------------------Resume------------------------------------------------------------------------------

\makecvtitle

%-------------------Education Section-------------------------------------------------------------------

\section{Education}

% For a date range: (To indicate 'up to present', set EndYear to 0)
% Format:  \tlcventry{StartYear}{EndYear}{Degree}{Institution}{City}{\textit{Grade}}{Description}  % Arguments 3 (Degree) to 6 (Grade) can be left empty. 
% Example: \tlcventry{2012}{0}{BSc Computer Science}{University of MyCity}{MyCity}{}{Also completed several random courses}

\tlcventry{2012}{0}{BSc Computer Science}{University of MyCity}{MyCity}{}{Also completed several random courses}

% For a single year:
% Format:  \tldatecventry{StartYear}{Degree}{Institution}{City}{\textit{Grade}}{Description}
% Example: \tldatecventry{2008}{Senior Certificate}{High School MyCity}{MyCity}{\textit{80\%}}{Passed with distinction}

\tldatecventry{2008}{Senior Certificate}{High School MyCity}{MyCity}{\textit{80\%}}{Passed with distinction}

%-------------------PhD Thesis Section------------------------------------------------------------------

\section{PhD thesis}

% Format:  \cvitem{Section Name}{Description}
% Example: \cvitem{title}{\emph{The title of my PhD goes here}}
% Example: \cvitem{supervisors}{My supervisors' names go here}
% Example: \cvitem{description}{Short thesis abstract}

\cvitem{title}{\emph{The title of my PhD goes here}}
\cvitem{supervisors}{My supervisors' names go here}
\cvitem{description}{Short thesis abstract}

%-------------------Masters Thesis Section--------------------------------------------------------------

\section{Master thesis}

% Format:  \cvitem{Section Name}{Description}
% Example: \cvitem{title}{\emph{The title of my Masters goes here}}
% Example: \cvitem{supervisors}{My supervisors' names go here}
% Example: \cvitem{description}{Short thesis abstract}

\cvitem{title}{\emph{The title of my Masters goes here}}
\cvitem{supervisors}{My supervisors' names go here}
\cvitem{description}{Short thesis abstract}

%-------------------Achievements Section----------------------------------------------------------------

\section{Achievements}

% Format:  \cvlistitem{Achievement}
% Example: \cvlistitem{Received best student award}
% Example: \cvlistitem{Another achievement. This achievement is particularly long and therefore normally spans over several lines. Did you notice the indentation when the line wraps?}

\cvlistitem{Received best student award}
\cvlistitem{Another achievement. This achievement is particularly long and therefore normally spans over several lines. Did you notice the indentation when the line wraps?}

%-------------------Languages Section-------------------------------------------------------------------

\section{Languages}

% Format:  \cvitemwithcomment{Language}{Skill level}{Comment}
% Example: \cvitemwithcomment{English}{Native}{Mother Tongue}
% Example: \cvitemwithcomment{French}{Fluent}{Daily practice, all work performed in English}

\cvitemwithcomment{English}{Native}{Mother Tongue}
\cvitemwithcomment{French}{Fluent}{Daily practice, all work performed in English}

%-------------------Interests Section-------------------------------------------------------------------

\section{Interests}

% Format:  \cvitem{Hobby}{Description}
% Example: \cvitem{Gaming}{Computer Games}
% Example: \cvitem{Sport}{Golf, Tennis}

\cvitem{Gaming}{Computer Games}
\cvitem{Sport}{Golf, Tennis}

%-------------------Experience Section------------------------------------------------------------------

\section{Experience}

%-------------------Vocational Experience---------------------------------------------------------------

\subsection{Vocational}

% Format: \tlcventry{StartYear}{EndYear}{Job title}{Employer}{City}{Country (optional)}{General description no longer than 1--2 lines.\newline{}%
% Example:
% \tlcventry{2008}{2011}{System Administrator}{Simple Solutions}{MyCity}{}{Did system administrative work.\newline{}%
% Main Duties:%
%  \begin{itemize}%
%      \item Administrate the servers;
%      \item Administrate employee computers 
%          \begin{itemize}%
%              \item All employee's computers had to be up to date;
%          \end{itemize}
%      \item Did some more administrating
%   \end{itemize}}

\tlcventry{2008}{2011}{System Administrator}{Simple Solutions}{MyCity}{}{Did system administrative work.\newline{}%
Main Duties:%
\begin{itemize}%
 \item Administrate the servers;
 \item Administrate employee computers 
  \begin{itemize}%
      \item All employee's computers had to be up to date;
      \end{itemize}
  \item Did some more administrating
\end{itemize}}

%-------------------Skills Matrix Section----------------------------------------------------------------

\section{Skills}

% For items with categories: 
% Format:  \cvdoubleitem{Category}{List of skills}{Category Name}{List of skills}
% Note: It looks better if the category is bold with \textbf{}
% Example:
% \subsection{Development}
% \cvdoubleitem{\textbf{Languages}}{C\#, C\+\+, Java}{\textbf{Databases}}{MSSQL, MySQL}
%
% For a bullet list without categories:
% Format:  \cvlistdoubleitem{Skill 1}{Skill 2}
% Example: 
% \subsection{Development}
% \cvlistdoubleitem{C\#, Java, Ruby}{MSSQL, MySQL}
% \cvlistdoubleitem{Photoshop}{Windows, Linux. In the single column list, this item is particularly long to wrap over several lines.}

\subsection{Development}
\cvdoubleitem{\textbf{Languages}}{C\#, Java, Ruby}{\textbf{Databases}}{MSSQL, MySQL}


%-------------------Publications Section----------------------------------------------------------------
% The cvitem commands needs to be altered to correctly print all publications with the moderntime package.
% The cvitem command is edited to remove all forced punctuation within the command.
% All the typesetting of the text is handled by the modified Biblatex style.

\input{cvitem_modifications/cvitem_modified}        % Removing forced punctuation from cvitem

\nocite{*}                                          % Print all publications.

% Format:  \printbibliography[type=Biblatex type,title={Title of publication}]
% Example: \printbibliography[type=article,title={Journal Publications}]
% Example: \printbibliography[type=inproceedings,title={Conference Publications}]
% Example: \printbibliography[type=thesis,title={Thesis}]

\printbibliography[type=article,title={Journal Publications}]
\printbibliography[type=inproceedings,title={Conference Publications}]
\printbibliography[type=thesis,title={Thesis}]

\input{cvitem_modifications/cvitem_moderncvclassic} % Reverting changes to cvitem.

%-------------------References Section------------------------------------------------------------------

\section{References}

% Format:  \cvreferencecolumn{\cvreference{Name Surname}{Position}{Department}{Company}{City}{Email}{Home Phone}{Cell Phone}}{\cvreference{Name Surname}{Position}{Department}{Company}{City}{Email}{Home Phone}{Cell Phone}}
% Example: 
% \subsection{Simple Solutions}
% \cvreferencecolumn{\cvreference{John Doe}{Developer}{HR}{Simple Solutions}{MyCity}{john@email.com}{+12 (34) 567 8901}{+23 (45) 678 9012}}{\cvreference{Jane Doe}{Accountant}{HR}{Simple Solutions}{MyCity}{jane@email.com}{+34 (56) 789 0123}{+45 (67) 890 1234}}
% \subsection{Monster Inc}
% \cvreferencecolumn{\cvreference{Alice Doe}{Manager}{HR}{Monster Inc}{ThatCity}{alice@email.com}{+12 (34) 567 8901}{+23 (45) 678 9012}}{}

%\subsection{Simple Solutions}
%\cvreferencecolumn{\cvreference{John Doe}{Developer}{HR}{Simple Solutions}{MyCity}{john@email.com}{+12 (34) 567 8901}{+23 (45) 678 9012}}{\cvreference{Jane Doe}{Accountant}{HR}{Simple Solutions}{MyCity}{jane@email.com}{+34 (56) 789 0123}{+45 (67) 890 1234}} \subsection{Monster Inc}
%\cvreferencecolumn{\cvreference{Alice Doe}{Manager}{HR}{Monster Inc}{ThatCity}{alice@email.com}{+12 (34) 567 8901}{+23 (45) 678 9012}}{}

\clearpage

%-------------------Appendix----------------------------------------------------------------------------
% This section is added to append any additional documents to the cv.
% The appended documents are added to the table of contents for easier navigation of the document.
% Usage: (section)
% \phantomsection
% \addcontentsline{toc}{section}{title}
% 
% Format: (subsection)
% \phantomsection\addcontentsline{toc}{subsection}{title}
% \includepdf[pages=-]{appendix/filename.pdf}
%
% Example:
% \phantomsection
% \addcontentsline{toc}{section}{Certificates}
%
% \phantomsection
% \addcontentsline{toc}{subsection}{Landscape}
% \includepdf[pages=-]{appendix/CertificateLandscape.pdf}
%
% \phantomsection
% \addcontentsline{toc}{subsection}{Portrait}
% \includepdf[pages=-]{appendix/CertificatePortrait.pdf}

%\phantomsection
%\addcontentsline{toc}{section}{Certificates}
%
%\phantomsection
%\addcontentsline{toc}{subsection}{Landscape}
%\includepdf[pages=-]{appendix/CertificateLandscape.pdf}
%
%\phantomsection
%\addcontentsline{toc}{subsection}{Portrait}
%\includepdf[pages=-]{appendix/CertificatePortrait.pdf}

%-------------------Cover letter------------------------------------------------------------------------

\input{coverletter.tex}                             % Include cover letter from coverletter.tex

%-------------------Document End------------------------------------------------------------------------

\end{document}

%% end of file `main.tex'.
  • I have this error : ERROR: LaTeX Error: File biblatex.sty' not found.` shall I install bibtex ? – Nicolas Scotto Di Perto Feb 3 '16 at 11:20
  • I found the package to install on my distrib (texlive-bibtexextra), now all works in the document you gave me ! Thank you that is very nice from you. – Nicolas Scotto Di Perto Feb 3 '16 at 11:23

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.