將字母中的括弧線改為斜體

將字母中的括弧線改為斜體

我正在使用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方法,您可以自由地更改內容格式。

相關內容