我正在尝试执行以下操作:控制 \closure 之前和之后的空间
我所寻找的内容如下图所示:
使用以下方法制作平均能量损失:
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage{lipsum}
\usepackage[scale=0.75]{geometry}
\usepackage[english]{babel}
\usepackage{blindtext}
\makeatletter
\renewcommand*{\makelettertitle}{%
\recomputeletterlengths%
\begin{minipage}{.5\textwidth}%
\raggedright
\addressfont\textcolor{color2}{%
\makebox[\textwidth][l]{\makebox[2\textwidth]{\bfseries\upshape\@firstname~\@lastname\hfill\normalfont\textcolor{black}{\@date}}}\@firstdetailselementfalse%
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}%
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
\collectionloop{phones}{%
\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}%
\end{minipage}\\[1em]
\begin{minipage}[t]{.5\textwidth}
\raggedright%
\addressfont%
{@recipientname}\\%
\@recipientaddress%
\end{minipage} \\[2em]
\raggedright%
\@opening\\[1.5em]%
\hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}
\renewcommand*{\makeletterclosing}{
\@closing\\[3cm]%Change to your liking
{\bfseries \@firstname~\@lastname}%
\ifthenelse{\isundefined{\@enclosure}}{}{%
\\[3cm]%Change to your liking
{\color{color2}\itshape\enclname: \@enclosure}}}
\makeatother
\firstname{XXXXXX}
\familyname{XXXXXX}
\title{CV}
\address{XXXXXX,12}{12345,XXXXXX}
\email{[email protected]}
\begin{document}
\recipient{XXXX}{XXXX\\XXXXXXXXXXXX\\1234 XXXXXX\\XXXXXX}
\date{\today}
\opening{blablabla,}
\closing{blablabla}
\enclosure[Im Anhang]{\begin{itemize} \item Lebenslauf \item Zeugnisse \end{itemize}} % List of enclosed documents
\makelettertitle
\blindtext[3]
\makeletterclosing
\clearpage
\end{document}
答案1
采用样式的定义并重新编码。
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage{lipsum}
\usepackage[scale=0.75]{geometry}
\usepackage[english]{babel}
\usepackage{blindtext}
\makeatletter
\renewcommand*{\makelettertitle}{%
\recomputeletterlengths%
\begin{minipage}{.5\textwidth}%
\raggedright
\addressfont\textcolor{color2}{%
\makebox[\textwidth][l]{\makebox[2\textwidth]{\bfseries\upshape\@firstname~\@lastname\hfill\normalfont\textcolor{black}{\@date}}}\@firstdetailselementfalse%
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}%
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
\collectionloop{phones}{%
\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}%
\end{minipage}\\[1em]
\begin{minipage}[t]{.5\textwidth}
\raggedright%
\addressfont%
{@recipientname}\\%
\@recipientaddress%
\end{minipage} \\[2em]
\raggedright%
\@opening\\[1.5em]%
\hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}
\renewcommand*{\makeletterclosing}{
\@closing\\[1em]%Change to your liking
{\bfseries \@firstname~\@lastname}%
\ifthenelse{\isundefined{\@enclosure}}{}{%
\\[1cm]%Change to your liking
{\color{color2}\itshape\enclname: \@enclosure}}}
\makeatother
\firstname{XXXXXX}
\familyname{XXXXXX}
\title{CV}
\address{XXXXXX,12}{12345,XXXXXX}
\email{[email protected]}
\begin{document}
\recipient{XXXX}{XXXX\\XXXXXXXXXXXX\\1234 XXXXXX\\XXXXXX}
\date{\today}
\opening{blablabla,}
\closing{blablabla}
\enclosure[Im Anhang]{CV}
\makelettertitle
\blindtext[3]
\makeletterclosing
\clearpage
\end{document}