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.



\address{Street}{somewhere\protect\\[0.1em] country\protect\\[0.2em]}




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






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... ;)


You can't have a trailing \\ in the address. the coding is a bit odd but this seems to work.

 \address{Street}{somewhere\protect\\ country\protect\\\ }
  • Wow thanks! Strangly \maketitle can deal with the tailing \`. Is it possible to increase the distance to the next line as done with [0.2em]` in my minimal example? – lumbric Oct 5 '12 at 12:41
  • 1
    yes you can put the optional argument back just leave the \ at the end eg country\protect\\[1em]\ – David Carlisle Oct 5 '12 at 12:55
  • Thanks, that worked! (I didn't understand before why the three slashes solve the problem, now I did.) – lumbric Oct 6 '12 at 13:32
  • @lumbric If you don't like 3 slashes, you can use \\~ ;) – yo' Oct 8 '12 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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