Document Classes\documentclass{moderncv}

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

\documentclass{moderncv}

Post by peaches2165 »

Hi,

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

My template is

Code: Select all

\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

Code: Select all

\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.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
alainremillard
Posts: 45
Joined: Fri Mar 16, 2012 8:22 pm

\documentclass{moderncv}

Post by alainremillard »

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 Infominimal 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/ ... ver-letter

If it doesn't help you, please post a compilable example, we'll see what we can do.

regards
alain rémillard
peaches2165
Posts: 25
Joined: Wed Oct 22, 2008 5:03 pm

\documentclass{moderncv}

Post by peaches2165 »

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:

Code: Select all

This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
entering extended mode
(./filename.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, loaded.
(./moderncv.cls
Document Class: moderncv 2013/04/29 v1.5.1 modern curriculum vitae and letter d
ocument 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)


Code: Select all

\documentclass[11pt,a4paper,sans]{moderncv}       
\moderncvstyle{casual}                             
\moderncvcolor{blue}                          
%\renewcommand{\familydefault}{\sfdefault}         
%\nopagenumbers{}                                  
% adjust the page margins
\usepackage[scale=0.75]{geometry}


\firstname{John}
\familyname{Smith}
\title{Professor}
\address{University}{Department of \\
\\city, state, zip}
% for classic style
\ifforweb\else
\phone{}
\email{smith@}
%\include{package}{}
\begin{document} 

\makecvtitle
%\nopagenumbers{}                            
 % uncomment to suppress automatic page numbering for CVs longer than one page


%-------------------------------------------------------------------------------
%            content
%------------------------------------------------------------------------------
%\newlength{\descindent}
%\setlength{\descindent}{2em} % Default indent for description lists. 
Change using \settowidth if needed
%\newcommand{\descitem}[1]{\par\raggedright\hangindent=\descinden
%t\hangafter=1\makebox[\descindent]{\emph{#1}\hfill}\ignorespaces}

\newcommand{\descitem}[1]{\par\raggedright\hangindent=\eqboxwidth{descindent}
\hangafter=1\eqparbox{descindent}{\raggedright\hspace{2ex}\textrm{\textbullet}
\hspace{.5ex} 
\emph{#1}\rule{2ex}{0pt}}\ignorespaces}

\newcommand{\talk}[3]{\cvitem[0.05em]{#1}{#2, \emph{#3.}} }
%\newcommand{\talk}[4][\relax]{\cvitem[0.05em]{#2~\rlap{#1}
%\phantom{Dec}}{#3, \emph{#4.}} }

\raggedbottom%}}}1


%{{{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}

Code: Select all

%\begin{document}
%\begin{center}
% {\bf CURRICULUM VITAE OF John Smith}
%\end{center}

Short Statement
Blah 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

\documentclass{moderncv}

Post by StarValkyrie »

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

\documentclass{moderncv}

Post by alainremillard »

I took the liberty to modify your code, here is a compilable example.

Code: Select all

\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.

Code: Select all

\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
Finaly, there is other commands, the list is not complete

Code: Select all

\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/ ... v/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

Re: \documentclass{moderncv}

Post by peaches2165 »

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,
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

\documentclass{moderncv}

Post by Johannes_B »

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

\documentclass{moderncv}

Post by alainremillard »

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

Re: \documentclass{moderncv}

Post by peaches2165 »

Thank you so much for your help with this. I have finally finished updating the CV.
Post Reply