I am using the package moderncv to create my CV. Unfortunately I can't manage to include a letter as it is done in one of the examples in the CTAN repository (PDF file, TEX file).
The command \makelettertitle
seems to cause the problem. Without this command the LaTeX file compiles. With the command I get the following error:
! LaTeX Error: There's no line here to end.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.47 \makelettertitle
Minimal example:
%% LyX 2.0.2 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\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{mail@exampl.ecom}
\begin{document}
\maketitle
\section{Section}
\cvitem{something}{something}
\cvitem{something}{something}
\clearpage{}
\recipient{Company Recruitment team}{Company, Inc.\\123 somestreet\\some city}
\date{January 01, 1984}
\opening{Dear Sir or Madam,}
\closing{Yours faithfully,}
\enclosure[Attached]{curriculum vit\ae{}}
\makelettertitle
Testtext.
\makeletterclosing
\end{document}
Edit:
The answer solves the problem, but unfortunately only partly. The \makelettertitle command displays the address in a wrong way. I filed a bug report here. My solution for now is to leave out the country… 😉
Best Answer
You can't have a trailing
\\
in the address. the coding is a bit odd but this seems to work.