我正在使用 moderncv 包创建我的简历。不幸的是,我无法像 CTAN 存储库中的一个示例那样添加一封信(PDF 文件,TEX 文件)。
该命令\makelettertitle
似乎导致了问题。没有此命令,LaTeX 文件会编译。使用该命令时,我收到以下错误:
! 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
最小示例:
%% 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{[email protected]}
\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}
编辑:
这个答案解决了问题,但不幸的是,它只解决了部分问题。\makelettertitle 命令以错误的方式显示地址。我提交了一份错误报告这里。我现在的解决方案是离开这个国家…… ;)
答案1
地址中不能有尾随\\
。编码有点奇怪,但似乎可行。
\address{Street}{somewhere\protect\\ country\protect\\\ }