答案1
将以下内容添加到您的序言中,以可视化设计信件布局(改变长度)时通常感兴趣的框。
\LoadLetterOption{visualize}
\showfields{head,address,location,refline,foot}
根据手册,这些都是test
可以这样显示的框(+显示一个 10 x 15 厘米的矩形,用于打印校准)。需要采用不同的方式才能看到上图中显示的其余灰色框。
完整的 MWE:
\documentclass[backaddress=plain]{scrlttr2}
\usepackage[main=ngerman]{babel}
\usepackage{blindtext}
% change some lengths ------------------------------------------
\makeatletter
% Text block
\areaset{160mm}{237mm}
\setlength{\oddsidemargin}{\dimexpr 30mm-1in}
\setlength{\evensidemargin}{\dimexpr 20mm-1in}
% Letter Head
\@setplength{firstheadhpos}{30mm}
\@setplength{firstheadvpos}{17mm}
\@setplength{firstheadwidth}{\textwidth}
% Address Window
\@setplength{toaddrhpos}{30mm}
\@setplength{toaddrvpos}{45mm}
\@setplength{toaddrwidth}{75mm}
\@setplength{toaddrheight}{45mm}
\@setplength{toaddrindent}{0mm}
\makeatother
% visualize border of boxes in blue ----------------------------
\LoadLetterOption{visualize}
\showfields{head,address,location,refline,foot}
\setkomafont{field}{\color{blue}}
%---------------------------------------------------------------
\begin{document}
\setkomavar{fromname}{Max Mustermann}
\setkomavar{fromaddress}{Musterstr. 12\\34567 Musterstadt}
\begin{letter}{Dr. Moritz Busch\\Georgengarten\\30167 Hannover}
\opening{Mein lieber Freund,}
\blindtext
\par
\blindtext
\closing{Bis bald,}
\end{letter}
\end{document}