这是一个非常基础的问题,但我找不到相关文档。我怎样才能将日期左对齐\documentclass{letter}
?
答案1
日期\raggedleft
默认设置为,强制其与文本块齐平。这构成了\opening
命令的一部分,必须重新定义以满足您的需要:
\documentclass{letter}
\signature{First last name}
\address{First last name \\ Street name \\ City \\ Country}
\makeatletter
\renewcommand*{\opening}[1]{\ifx\@empty\fromaddress
\thispagestyle{firstpage}%
{\raggedleft\@date\par}%
\else % home address
\thispagestyle{empty}%
{\raggedleft\begin{tabular}{l@{}}\ignorespaces
\fromaddress \\*[2\parskip]%
\end{tabular}\par
\raggedright\@date\par}%
\fi
\vspace{2\parskip}%
{\raggedright \toname \\ \toaddress \par}%
\vspace{2\parskip}%
#1\par\nobreak}
\makeatother
\begin{document}
\begin{letter}{Something \\ That \\ Is \\ Important}
\opening{Dear Who Cares}
Can you help me move the sender's address to the left? It is too close to the right edge. I would like to make sure that it does not go more to the right than does the text in the body of the letter.
\closing{Sincerely,}
\end{letter}
\end{document}
无论如何,对于常规字母,我不建议使用该类letter
,因为您可以非常轻松地在默认类中设置字母article
。