我scrlttr2
根据下面给出的源代码写了这封信。
这封信将打印在有窗口的信封上,我需要指定收件人地址栏的确切位置。
我怎样才能做到这一点(让收件人的地址框出现在纸张上的某个位置)?
% koma_env.tex
\documentclass[a4paper,backaddress=off,foldmarks=false,fromalign=right]{scrlttr2}
% \usepackage{lmodern}
\usepackage[utf8]{inputenc}
% \usepackage[T1]{fontenc}
% \usepackage[english]{babel}
% \usepackage{url}
\setkomavar{date}{\flushleft\vspace{-\baselineskip}\today\par}
\setkomavar{fromname}{\{\{Landlord Name\}\}}
\setkomavar{fromaddress}{\{\{Landlord Correspondence Address Line 1\} \\ \{\{Landlord Correspondence Line 2 (if applicable)\}\} \\ \{\{Town/City\}\} \\ \{\{County\}\} \\ \{\{Postcode\}\}}
\begin{document}
\begin{letter}{\{\{Tenant Names\}\} \\ \{\{Property Address Line 1\}\} \\ \{\{Property Address Line 2 (if applicable)\}\}
\\ \{\{Town/City\}\} \\ \{\{County\}\} \\ \{\{Postcode\}\}}
\KOMAoptions{fromphone=false,fromfax=false}
\setkomavar{subject}{Pre Check-Out Inspection at \{\{1st line of Property\}\}}
\opening{Dear \{\{Tenant Names\}\}}
Your tenancy is due to come to an end on \{\{date\}\}. I would like to arrange an inspection at the property before the tenancy ends to identify anything that may lead me to retain some of your deposit if not addressed by the time I retake possession.
Carrying out this inspection prior to the tenancy ending will give you the opportunity to tackle anything raised and ensure I can return the maximum amount of deposit to you when the tenancy ends
I would like to carry out the inspection on \{\{date\}\} at \{\{time\}\}. It would be best if you were present then if anything is identified we can discuss this and be clear on what would be required to rectify it. Please can you contact me as soon as possible to confirm whether or not this is convenient.
If you do not wish to be present I have a set of keys to access the property and will send you the results of the inspection. Please let me know either way at your earliest convenience.
\closing{Kind Regards}
\end{letter}
\end{document}
答案1
您可以更改 KOMA 伪长度toaddrhpos
(距左侧的距离)和toaddrvpos
。地址框的高度和宽度可以通过伪长度toaddrheight
和定义toaddrwidth
。
要在地址框周围添加一个框架,您可以加载visualize.lco
并说\showfields{address}
\LoadLetterOption{visualize}% loads visualize.lco to visualize boxes
\showfields{address}% show the address box
\makeatletter
\@setplength{backaddrheight}{0pt}% because backaddress=off
\@setplength{toaddrhpos}{2.5cm}%distance from left
\@setplength{toaddrvpos}{5cm}%distance from top
\@setplength{toaddrheight}{3.5cm}%height of the addressbox
\@setplength{toaddrwidth}{10cm}% width of the addressbox
\makeatother
更新
自 KOMA-Script 版本 3.26 起,scrlttr2 也提供了(\setplength
没有@
)。使用\setplength
和可以删除:\makeatletter
\makeatother
\LoadLetterOption{visualize}% loads visualize.lco to visualize boxes
\showfields{address}% show the address box
\setplength{backaddrheight}{0pt}% because backaddress=off
\setplength{toaddrhpos}{2.5cm}%distance from left
\setplength{toaddrvpos}{5cm}%distance from top
\setplength{toaddrheight}{3.5cm}%height of the addressbox
\setplength{toaddrwidth}{10cm}% width of the addressbox
补充说明:不要使用变量date
来将日期左对齐。因此,您可以使用选项:
refline=dateleft
答案2
KOMA-Script 有所谓的伪长度来定义便笺纸上的位置。请参阅“21.1. 资深用户的伪长度”一节toaddrhpos
和toaddrvpos
图 21.1KOMA-Script 手册。