因此,我正在编写我的简历,但收到了这个烦人的错误信息:
There's no line here to end. \makelettertitle
这是我的 MWE:
\documentclass[12pt,a4paper,sans]{moderncv}
\usepackage{pdfpages}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{textcomp}
\usepackage{lipsum}
\moderncvtheme[blue]{classic}
\setlength{\hintscolumnwidth}{3.5cm}
\usepackage[scale=0.82]{geometry}
\firstname{First name}
\familyname{Last name}
\address{Street}{Postal code City}{Country}
\phone[mobile]{+1234567890}
\email{[email protected]}
\begin{document}
\makecvtitle
\section{Professional career}
\cventry{1}{A}{A}{}{}{}
\cventry{2}{B}{B}{}{}{}
\cventry{3}{C}{C}{}{}{}
\cventry{4}{D}{D}{}{}{}
\section{Academic background}
\cventry{5}{E}{E}{E}{E}{}
\cventry{6}{F}{F}{F}{E}{}
\section{Scholar background}
\cventry{7}{G}{G}{G}{}{}{}
\cventry{8}{H}{H}{H}{}{}{}
\cventry{9}{I}{I}{I}{}{}{}
\section{Languages}
\cvitemwithcomment{Native languages}{\textbf{J}}{}
\cvitemwithcomment{Foreign languages}{\textbf{K}}{\begin{flushleft}business fluent\end{flushleft}}
\newpage
\section{Computer literacy}
\cvitemwithcomment{Scientific Software}{\textbf{L}}{\begin{flushleft}advanced\end{flushleft}}
\cvitemwithcomment{}{\textbf{M}}{\begin{flushleft}basics\end{flushleft}}
\cvitemwithcomment{Office--Software}{\textbf{N}}{\begin{flushleft}advanced\end{flushleft}}
\section{Hobbies}
\cvitem{Sports}{O}
\cvitem{Other}{P}
\clearpage
%----- letter ---------------------------------------------------------
\recipient{Q}{Q}
\date{\begin{flushright}May 23, 2017\end{flushright}}
\opening{Dear Ms. Q}
\closing{In anticipation for a personal conversation,}
\enclosure[Attached]{Attachments}
\makelettertitle
\lipsum[1]
\makeletterclosing
\end{document}
答案1
flushright
从 的参数中删除环境\date
。
要向下移动日期,您可以使用
\usepackage{xpatch}
\makeatletter
\xpatchcmd\makeletterhead
{\@date}{\vskip\baselineskip\hfill\@date}
{}{\PatchFailed}
\makeatother
代码:
\documentclass[12pt,a4paper,sans]{moderncv}
\usepackage{pdfpages}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{textcomp}
\usepackage{lipsum}
\moderncvtheme[blue]{classic}
\setlength{\hintscolumnwidth}{3.5cm}
\usepackage[scale=0.82]{geometry}
\firstname{First name}
\familyname{Last name}
\address{Street}{Postal code City}{Country}
\phone[mobile]{+1234567890}
\email{[email protected]}
\usepackage{xpatch}
\makeatletter
\xpatchcmd\makeletterhead
{\@date}{\vskip\baselineskip\hfill\@date}
{}{\PatchFailed}
\makeatother
\begin{document}
\recipient{Q}{Q}
\date{May 23, 2017}
\opening{Dear Ms. Q}
\closing{In anticipation for a personal conversation,}
\enclosure[Attached]{Attachments}
\makelettertitle
\lipsum[1]
\makeletterclosing
\end{document}