
我正在使用letter
文檔類別來寫一封求職信,並且想使用該encl
行。我有以下測試用例:
\documentclass{letter}
\signature{First Last}
\address{Source address}
\begin{document}
\begin{letter}{Destination address}
\opening{To Whom it May Concern:}
This is the body of the letter.
\closing{Sincerely,}
\encl{Important document}
\end{letter}
\end{document}
產生以下結果:
我想調整最後一行的格式,encl: Important document
可能是斜體。如何控制該行(包括encl:
組件)的排版?
答案1
名稱\encl
(您\encl
在輸出中看到的名稱)在 中設定\enclname
。您可以使用類似的內容來變更它的格式
\renewcommand{\enclname}{\itshape encl}
在你的序言中,連同
\encl{\itshape Important document}
在您的文檔程式碼中:
\documentclass{letter}
\signature{First Last}
\address{Source address}
\renewcommand{\enclname}{\itshape encl}
\begin{document}
\begin{letter}{Destination address}
\opening{To Whom it May Concern:}
This is the body of the letter.
\closing{Sincerely,}
\encl{\itshape Important document}
\end{letter}
\end{document}
然而,確實沒有必要letter
班級,因為您可以使用 實現相同的輸出article
,並且它提供了類似的輸出:
\documentclass{article}
\pagestyle{empty}
\setlength{\parindent}{0pt}
\begin{document}
\vspace*{50pt}% Leave some space from the top of the document
\hfill
\begin{tabular}{l @{}}
Source addres \\
\\
\today
\end{tabular}
\bigskip
Destination address
\bigskip
To Whom it May Concern:
\medskip
This is the body of the letter.
\bigskip
\hspace{.5\linewidth}%
\begin{tabular}{ l }
Sincerely, \\
\\[2\bigskipamount]
First Last
\end{tabular}
\bigskip
{\itshape encl: Important document}
\end{document}
透過這種article
方法,您可以自由地更改內容格式。