在页面顶部开始字母

在页面顶部开始字母

如何才能使字母从页面顶部开始,而不是通常的垂直间距?我发现该letter课程需要非常严格的特定结构。

\documentclass[a4paper,12pt]{letter}

\title{The deterioration of Health and safety}
\author{Heime}
\date{January 2023}

\signature{Heime}

\address{This and That}

\begin{document}

\begin{letter}{Alice}
  \opening{Something}

  \begin{flushright}
    \closing{Yours Sincerely,}
    \signature{Heime}
  \end{flushright}

\end{letter}

\end{document}

答案1

例如:

\documentclass[12pt,fromalign=right,refline=nodate,backaddress=false,addrfield=topaligned,foldmarks=false]{scrlttr2}

\setkomavar{signature}{Heime}
\setkomavar{fromaddress}{This and That}
\setkomavar{date}{January 2023}

\setkomavar{location}{\raggedleft\usekomavar{date}}% put the date into the
                                % location field
\setplength{locvpos}{\topmargin+1in+\headheight+\headsep+1.2\baselineskip}% move the location field

\setplength{firstheadwidth}{\textwidth}% limit the width of the head at the
                                % notepaper to the paper width

\setplength{toaddrhpos}{\oddsidemargin+1in}% possition of the recipient address
\setplength{toaddrvpos}{\topmargin+1in+\headheight+\headsep}

\setplength{refvpos}{\useplength{toaddrvpos}+\useplength{toaddrheight}}% possition of the reference line

\setplength{sigindent}{.5\textwidth}% possition of the signature
\let\raggedsignature=\raggedright

\usepackage{lipsum}

\begin{document}

\begin{letter}{Alice}
  \opening{Something}
  \lipsum[1]
  \closing{Yours Sincerely,}
\end{letter}

\end{document}

在此处输入图片描述

有关使用scrlttr2(或包scrletter,例如与类结合使用scrartcl)的更多信息,请参阅 KOMA-Script 手册中的第 4 章和第 21 章,也可能包括“如何使用 KOMA-Script 创建字母“ (也提供在德国)。

相关内容