LaTeX forum ⇒ Curricula Vitae / RésumésError in Modern CV? Topic is solved

ModernCV, Friggeri, Plasmati, Classicthesis-CV, and more
MichaelAVCostello
Posts: 3
Joined: Tue Mar 23, 2021 4:19 pm

Error in Modern CV?

Postby MichaelAVCostello » Tue Mar 23, 2021 4:31 pm

I just downloaded the ModernCV .zip file from LaTeXTemplates.com (link below) and when I try to compile it I get an error about not having a \begin{document} because of line 52. When I comment it out, then the file compiles fine. I'm asking because I'm having a similar problem in my own CV and I was trying to make a MWE and I can't even do that correctly. :? I'm using TeXMaker compiling through LauLaTeX. I also tried with TeXWorks, same error. Could I have some problem in my installation? Or maybe my modernCV.sty is out of date somehow? I don't really fully understand how to update it other than going to MikTeX console and running the update button.

! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help....
l.52 \homepage{staff.org.edu/~jsmith}{staff.org.edu/$\sim$jsmith} % The first ...
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
LaTeX Font Info: Trying to load font information for OT1+lmr on input line 5
2.

Suggestions welcome.

https://www.latextemplates.com/template ... ver-letter

-Michael

MichaelAVCostello
Posts: 3
Joined: Tue Mar 23, 2021 4:19 pm

Postby MichaelAVCostello » Wed Mar 24, 2021 5:12 pm

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% "ModernCV" CV and Cover Letter
% LaTeX Template
% Version 1.3 (29/10/16)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Xavier Danaux (xdanaux@gmail.com) with modifications by:
% Vel (vel@latextemplates.com)
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
% Important note:
% This template requires the moderncv.cls and .sty files to be in the same 
% directory as this .tex file. These files provide the resume style and themes 
% used for structuring the document.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%	PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman

\moderncvstyle{casual} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template

\usepackage[scale=0.75]{geometry} % Reduce document margins
%\setlength{\hintscolumnwidth}{3cm} % Uncomment to change the width of the dates column
%\setlength{\makecvtitlenamewidth}{10cm} % For the 'classic' style, uncomment to adjust the width of the space allocated to your name

%----------------------------------------------------------------------------------------
%	NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\firstname{John} % Your first name
\familyname{Smith} % Your last name

% All information in this block is optional, comment out any lines you don't need
\title{Curriculum Vitae}
\address{123 Broadway}{City, State 12345}
\mobile{(000) 111 1111}
\phone{(000) 111 1112}
\fax{(000) 111 1113}
\email{john@smith.com}
\homepage{staff.org.edu/~jsmith}{staff.org.edu/$\sim$jsmith} % The first argument is the url for the clickable link, the second argument is the url displayed in the template - this allows special characters to be displayed such as the tilde in this example
\extrainfo{additional information}
\photo[70pt][0.4pt]{pictures/picture} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)
\quote{"A witty and playful quotation" - John Smith}

%----------------------------------------------------------------------------------------

\begin{document}

%----------------------------------------------------------------------------------------
%	CURRICULUM VITAE
%----------------------------------------------------------------------------------------

\makecvtitle % Print the CV title

%----------------------------------------------------------------------------------------
%	EDUCATION SECTION
%----------------------------------------------------------------------------------------

\section{Education}

\cventry{2011--2012}{Masters of Commerce}{The University of California}{Berkeley}{\textit{GPA -- 8.0}}{First Class Honours}  % Arguments not required can be left empty
\cventry{2007--2010}{Bachelor of Business Studies}{The University of California}{Berkeley}{\textit{GPA -- 7.5}}{Specialized in Commerce}

\section{Masters Thesis}

\cvitem{Title}{\emph{Money Is The Root Of All Evil -- Or Is It?}}
\cvitem{Supervisors}{Professor James Smith \& Associate Professor Jane Smith}
\cvitem{Description}{This thesis explored the idea that money has been the cause of untold anguish and suffering in the world. I found that it has, in fact, not.}

\end{document}

User avatar
Ijon Tichy
Posts: 446
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Wed Mar 24, 2021 5:27 pm

I cannot find command \homepage in the moderncv manual. However, in moderncv.cls it is defined as:
\newcommand*{\homepage}[1]{\def\@homepage{#1}}
So it has only one argument, but you are using two.

\documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman

\moderncvstyle{casual} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template

\usepackage[scale=0.75]{geometry} % Reduce document margins
%\setlength{\hintscolumnwidth}{3cm} % Uncomment to change the width of the dates column
%\setlength{\makecvtitlenamewidth}{10cm} % For the 'classic' style, uncomment to adjust the width of the space allocated to your name

\firstname{John} % Your first name
\familyname{Smith} % Your last name

% All information in this block is optional, comment out any lines you don't need
\title{Curriculum Vitae}
\address{123 Broadway}{City, State 12345}
\mobile{(000) 111 1111}
\phone{(000) 111 1112}
\fax{(000) 111 1113}
\email{john@smith.com}
\homepage{staff.org.edu/\textasciitilde jsmith} % The first argument is the url for the clickable link, the second argument is the url displayed in the template - this allows special characters to be displayed such as the tilde in this example
\extrainfo{additional information}
\photo[70pt][0.4pt]{example-image} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)
\quote{"A witty and playful quotation" - John Smith}

\begin{document}

\makecvtitle % Print the CV title

\section{Education}

\cventry{2011--2012}{Masters of Commerce}{The University of California}{Berkeley}{\textit{GPA -- 8.0}}{First Class Honours}  % Arguments not required can be left empty
\cventry{2007--2010}{Bachelor of Business Studies}{The University of California}{Berkeley}{\textit{GPA -- 7.5}}{Specialized in Commerce}

\section{Masters Thesis}

\cvitem{Title}{\emph{Money Is The Root Of All Evil -- Or Is It?}}
\cvitem{Supervisors}{Professor James Smith \& Associate Professor Jane Smith}
\cvitem{Description}{This thesis explored the idea that money has been the cause of untold anguish and suffering in the world. I found that it has, in fact, not.}

\end{document}

does work. But you have to decide if is is a good idea to use not documented commands.

MichaelAVCostello
Posts: 3
Joined: Tue Mar 23, 2021 4:19 pm

Postby MichaelAVCostello » Thu Mar 25, 2021 12:21 pm

Fantastic, thanks. Now I realize that this error seems to indicate a difference in the number of parameters expected, and I can fix that easily. Thank you.


Return to “Curricula Vitae / Résumés”

Who is online

Users browsing this forum: No registered users and 3 guests