
Я использую letter
documentclass для написания сопроводительного письма и хочу использовать строку 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
подходе у вас есть свобода действий по изменению форматирования контента.