Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using to make my CV with the moderncv package for the first time. I'm working with TeXnicCenter and MiKTeX 2.9 on Window 7. I've downloaded the new moderncv from CTAN ... but got into problems. I don't know how to fix them.

\documentclass[12pt,a4paper,naustrian]{moderncv}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{color}
\usepackage{babel}
\usepackage[scale=0.75]{geometry}
\moderncvtheme[grey]{classic}
\firstname{My} \familyname{Name} 
\title{CV} 
\address{Street}{somewhere\protect\[0.1em] country\protect\[0.2em]} 
%\mobile{+1231231231323} %\email{}
\begin{document}
\maketitle
 %\section{Section} %\cvitem{something}{something} %\cvitem{something}{something} Testtext. 
\end{document} 

Edit

Thanks for your responses. I have just compiled your example, but not working yet. Here you can find some lines from .log file :

! LaTeX Error: Missing \begin{document}.

l.2 < !-- saved from url=(0078)http://mirrors.med.harvard.edu/ctan/macros/lat...

You're in trouble here. Try typing to proceed. If that doesn't work, type X to quit.

Overfull \hbox (28.55835pt too wide) in paragraph at lines 2--4 []\OT1/cmr/m/n/10.95

Overfull \hbox (22.23462pt too wide) in paragraph at lines 2--4 \OT1/cmr/m/n/10.95 from []

Overfull \hbox (447.5515pt too wide) in paragraph at lines 2--4 \OT1/cmr/m/n/10.95 url=(0078)http://mirrors.med.harvard.edu/ctan/macros/latex/c ontrib/etoolbox/etoolbox.sty [] }

Thanks for your responses. I have just compiled your example, but not working yet. Here you can find some lines from .log file :

{This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=pdflatex 2013.4.16)  16 APR 2013 14:34
entering extended mode
**LaTeX2.tex
(C:\Users\iman\Desktop\moderncv\LaTeX2.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, 
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese, 
romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
senglishmax, welsh, loaded.
(C:\Users\iman\Desktop\moderncv\moderncv.cls
Document Class: moderncv 2013/02/09 v1.3.0 modern curriculum vitae and letter d
ocument class
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size11.clo"
File: size11.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\etoolbox\etoolbox.sty"

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.2 <
     !-- saved from url=(0078)http://mirrors.med.harvard.edu/ctan/macros/lat...

You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.


Overfull \hbox (28.55835pt too wide) in paragraph at lines 2--4
[]\OT1/cmr/m/n/10.95 <!--
Overfull \hbox (25.91501pt too wide) in paragraph at lines 2--4
\OT1/cmr/m/n/10.95 saved
 []


Overfull \hbox (22.23462pt too wide) in paragraph at lines 2--4
\OT1/cmr/m/n/10.95 from
 []


Overfull \hbox (447.5515pt too wide) in paragraph at lines 2--4
\OT1/cmr/m/n/10.95 url=(0078)http://mirrors.med.harvard.edu/ctan/macros/latex/c
ontrib/etoolbox/etoolbox.sty
 []
 } 
share|improve this question
1  
Welcome to TeX.sx! "I got into problems" is not informative at all. Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Jubobs Apr 16 '13 at 11:52
    
You can update your own answer instead of added the code as a comment. –  Svend Tveskæg Apr 16 '13 at 14:12
    
How exactly do you compile the example? If you're using pdflatex as the log in your answer seems to show, something is wrong with your (La)TeX installation. Try compiling this: \documentclass{article}\begin{document}Hello world!\end{document} –  Xavier Apr 16 '13 at 17:04
2  
Also, make sure you downloaded your TeX files correctly. The log l.2 < !-- saved from url=(0078)http://mirrors.med.harvard.edu/ctan/macros/lat... seems like you are feeding HTML to TeX (saved the code from a web page displaying it maybe?). –  Xavier Apr 16 '13 at 17:09
1  
From the posted log file it looks like a problem with your copy of etoolbox.sty –  Andrew Swann Apr 17 '13 at 10:07

2 Answers 2

You don't need to \protect line breaks in the address, but make sure you don't end the group early with }:

Sample output

\documentclass[12pt,a4paper,naustrian]{moderncv}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{color}
\usepackage{babel}
\usepackage[scale=0.75]{geometry}
\moderncvtheme[grey]{classic}
\firstname{My} \familyname{Name} 
\title{CV} 
\address{Street\\somewhere\\[0.1em] country\\[0.2em]} %
\mobile{+1231231231323} 
\email{} 

\begin{document} 
\maketitle 

\section{Section} 

\cvitem{something}{something} 
\cvitem{something}{something} 

Test text. 
\end{document} 
share|improve this answer

You can put code into your question and use the {} button, it looks far lore readable than in comments.

You have

e\protect\[0.1em] country\protect\[0.2em]}

\[ starts display math mode (which never finds a matching \]) You intended

e\protect\\[0.1em] country\protect\\[0.2em]}

To force a line break

\documentclass[12pt,a4paper,naustrian]{moderncv}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{color}
\usepackage{babel}
\usepackage[scale=0.75]{geometry}
\moderncvtheme[grey]{classic}
\firstname{My} \familyname{Name} 
\title{CV} 
\address{Street}{somewhere\protect\\[0.1em] country\protect\\[0.2em]} %\mobile{+1231231231323} %\email{}
\begin{document} \maketitle %\section{Section} %\cvitem{something}{something} %\cvitem{something}{something} Testtext. 
\end{document} 
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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