## LaTeX forum ⇒ Document Classes ⇒ \documentclass{moderncv}

Information and discussion about specific document classes and how to create your own document classes.
peaches2165
Posts: 25
Joined: Wed Oct 22, 2008 5:03 pm

### \documentclass{moderncv}

Hi,

I am trying to run \documentclass{moderncv}
I am having some trouble with {moderncv}

My template is

\documentclass[11pt,letterpaper,oneside,sans]{moderncv}%{{{1\let\fax\undefined%To avoid marvosym error\begin{document}\usepackage{marvosym}\usepackage[normalem]{ulem}\usepackage{amsfonts,amsmath,eqparbox,multicol,enumerate,calc,paralist}\usepackage[initials,nobysame]{amsrefs}% Load after hyperref\hbadness=10000 % and some other commands ... \usepackage[margin=1.5cm]{geometry}\AtBeginDocument{\setlength{\maketitlenamewidth}{6cm}}  \AtBeginDocument{\setlength{\maketitlenamewidth}{6cm}}

I know next to nothing about the {moderncv} package and I am getting the error

\RequirePackage{moderncvstyle#1}}

How does one fix this?

Any help will be appreciated.

Thanks,
Peaches
Last edited by cgnieder on Sun Jun 22, 2014 1:15 pm, edited 1 time in total.

Tags:

alainremillard
Posts: 45
Joined: Fri Mar 16, 2012 8:22 pm
Just to start with a few pointers, first use the "code" button when including some code. It will be a lot easier to read. And please include an compilable minimal working example instead of bit of code.

Second, all \includepackage{} should be before the \begin{document}.

You can find a moderncv template at http://www.latextemplates.com/template/moderncv-cv-and-cover-letter

regards
alain rémillard

peaches2165
Posts: 25
Joined: Wed Oct 22, 2008 5:03 pm
Hi,

I am still having trouble with my file. I have listed my code below and hope I did it properly this time. I'm not sure if I am missing any additional files. I am using Ubuntu 10.04. Any help will be greatly appreciated.
This is my first time using {moderncv}.

This is the error message I receive:

This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)entering extended mode(./filename.texLaTeX2e <2009/09/24>Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, nohyphenation, loaded.(./moderncv.clsDocument Class: moderncv 2013/04/29 v1.5.1 modern curriculum vitae and letter document class(/usr/share/texmf-texlive/tex/latex/base/size11.clo) ! LaTeX Error: Missing \begin{document}. See the LaTeX manual or LaTeX Companion for explanation.Type  H <return>  for immediate help.  ...                                               l.73 p       ackages relying on it) defining the macro too)


%\begin{document}%\begin{center}% {\bf CURRICULUM VITAE OF John Smith}%\end{center} Short StatementBlah blah blah  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{EDUCATION:}\cventry{1973}{High school studies}\\\cventry{July 1980}{MS}{University}\\\cventry{August 1985}{Doctor of Philosophy}{Unin}   \section{ LANGUAGES SPOKEN FLUENTLY:}\cventry{ English, French} \section{HONOURS AND AWARDS:} \cventry{Fullbright Fellowship}  \section{POSITIONS:} \cventry{1980--81: Teaching Assistant  University of }\\\cventry{1981--85: Teaching Assistant at the University of }\\\cventry{1985--86: Professor in the University }\\
Last edited by cgnieder on Sun Jun 22, 2014 1:18 pm, edited 2 times in total.

StarValkyrie
Posts: 89
Joined: Fri Jan 24, 2014 12:42 am
In the preamble section, above the "content" section, cut the lines for \begin{document} and \makecvtitle and paste them after the content section, then try to compile again.
Last edited by cgnieder on Sun Jun 22, 2014 1:19 pm, edited 1 time in total.

alainremillard
Posts: 45
Joined: Fri Mar 16, 2012 8:22 pm
I took the liberty to modify your code, here is a compilable example.

\documentclass[11pt,a4paper,sans]{moderncv}       \moderncvstyle{casual}                             \moderncvcolor{blue}                           % adjust the page margins\usepackage[scale=0.75]{geometry}  \firstname{John}\familyname{Smith}\title{Professor}\address{University}{Department of city, state, zip}\phone{}\email{smith@}  %{{{1 Colors, title, etc.\definecolor{titlecolor}{gray}{0.05}\definecolor{addresscolor}{gray}{0.05}\definecolor{sectionrectanglecolor}{gray}{0.85}\definecolor{sectiontitlecolor}{gray}{0.0}\definecolor{subsectioncolor}{gray}{0.0}   \begin{document}  \makecvtitle \section{EDUCATION:}\cventry{1973}{High school studies}{}{}{}{}\cventry{July 1980}{MS}{University}{}{}{}\cventry{August 1985}{Doctor of Philosophy}{Unin}{}{}{}   \section{ LANGUAGES SPOKEN FLUENTLY:}\cvlanguage{ English, French}{}{} \section{HONOURS AND AWARDS:} \cventry{}{Fullbright Fellowship}{}{}{}{}  \section{POSITIONS:} \cventry{1980--81}{Teaching Assistant}{University of }{}{}{}\cventry{1981--85}{Teaching Assistant}{University of }{}{}{}\cventry{1985--86}{Professor}{University }{}{}{} \end{document}

Sadly there is no documentation for the package moderncv, but here a few things I notice about your code

First the newline \\ had to be remove in the address.
Second, \cventry take 6 arguemnts. Arguments 3 to 6 can be left empty, but the braces are needed.
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}

Finaly, there is other commands, the list is not complete
\cvitem{supervisors}{Supervisors}\cvitemwithcomment{Language 1}{Skill level}{Comment}\cvlanguage{french}{written and spoken}{}

Have a look at template.tex from
http://www.ctan.org/tex-archive/macros/latex/contrib/moderncv/examples
This is a complete example that show a lot of options.

I hope it help

Alain Rémillard

peaches2165
Posts: 25
Joined: Wed Oct 22, 2008 5:03 pm
Hi,

Thanks for the help! I've been working on the CV again. I'm able to compile but with some errors printing at the beginning. I'll wait until I have everything coded before I ask about this.

I now have two coding questions.

First the address is printing at the bottom of each page as a footnote. I don't know where to look to fix this.

Also I have over 100 pubs that need converted and unfortunately they are not coded in bibtex format. They are currently coded by begin{enumerate} with \items written by hand. Is there a quick way to convert this and do I keep using the \cventry to convert.

Thanks,

Johannes_B
Site Moderator
Posts: 4160
Joined: Thu Nov 01, 2012 4:08 pm
I never used moderncv myself, and i really would like to help, but thinking about a problem without really knowing it is hard.

Please try to prepare a minimal working example, meaning code that just represents a minimal amount of code to reproduce the problem.

Concerning your publications: Often you can download the bibliographic information from the publishers homepage. Those can be saved in a proper database (textfile with the ending bib) and processed using biblatex and biber.
But if the entries are ok in the way they are put down now, i don't see a reason to change it.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

alainremillard
Posts: 45
Joined: Fri Mar 16, 2012 8:22 pm
peaches2165 wrote:First the address is printing at the bottom of each page as a footnote. I don't know where to look to fix this.

To change this you have to change the \moderncvstyle{} at the beginning. Your is set to casual, there is also classic, banking and oldstyle. Those where found on ctan, but I don't know if there is other.

Regards
Alain Rémillard

peaches2165
Posts: 25
Joined: Wed Oct 22, 2008 5:03 pm
Thank you so much for your help with this. I have finally finished updating the CV.