我想在scrlttr2
信件中使用折叠标记,但是我的打印机边距会将它们截断。因此,我希望标记更长/更宽一些,以便它们能够延伸到文档的更深处。我该如何实现这一点?
这是我的信件的示例代码。
\documentclass[
paper=a4,
pagenumber=false, % Removes page numbers from page 2 onwards
parskip=half, % Separates paragraphs with some whitespace, use parskip=full for more space or comment out to return to default
fromalign=locationright, % Aligns the from address to the right
foldmarks=true, % Prints small fold marks on the left of the page
addrfield=true
]{scrlttr2}
\setkomavar{date}{\today} % Date of the letter
\begin{document}
\begin{letter}{Recipient\\somestreet 15\\12345 postalcode} % Addressee name and address
\opening{To whom it may concern}
This is a letter body.
\closing{yours sincerely}
\end{letter}
\end{document}
答案1
好吧,按照 KOMA-Script 文档(德语版,用 打开texdoc koma-script
)中的第 22.1 章,您可以使用命令\@setplength
更改相关伪长度的值。因为命令中foldmarkhpos
有一个使用,所以您需要使用和。@
\makeatletter
\makeatother
请参阅以下 MWE(更改了标有 的代码<==========
)
\documentclass[%
paper=a4,
pagenumber=false, % Removes page numbers from page 2 onwards
parskip=half, % Separates paragraphs with some whitespace, use parskip=full for more space or comment out to return to default
fromalign=locationright, % Aligns the from address to the right
foldmarks=true, % Prints small fold marks on the left of the page
addrfield=true,
]{scrlttr2}
\setkomavar{date}{\today} % Date of the letter
\makeatletter % <=======================================================
\@setplength{foldmarkhpos}{1cm} % 3,5 mm % \@setplength[Faktor]{Pseudolänge}{Wert}
\makeatother % <========================================================
\begin{document}
\begin{letter}{Recipient\\somestreet 15\\12345 postalcode} % Addressee name and address
\opening{To whom it may concern}
This is a letter body.
\closing{yours sincerely}
\end{letter}
\end{document}
结果:
将值更改1cm
为您需要的值...
如果您使用自己的lco
文件(就像我一样),您可以在那里添加命令(不带\makeatletter
和\makeatother
)。
编辑
同时(自版本3.26.2980,〜自 2019 年起)有“用户空间”命令,\setplength
因此该解决方案减少为:
\setplength{foldmarkhpos}{1cm}
答案2
此外Mensch 的回答,我希望得到实际问题的答案:我怎样才能加宽折叠标记?
这在 22.1.1 节第 498 页中有描述KOMA-Script 手册。您提到的三个折叠标记(顶部、纸张、底部)有三个单独的变量,可以使用以下命令进行设置:
\setplength{tfoldmarklength}{2mm}
\setplength{pfoldmarklength}{4mm}
\setplength{bfoldmarklength}{2mm}
此外,还有上述到纸张左边距的水平距离
\setplength{foldmarkhpos}{3.5mm}
以及折叠痕迹厚度:
\setplength{foldmarkthickness}{.2pt}
因此您可以设置:
\setplength{tfoldmarklength}{4mm}
\setplength{pfoldmarklength}{8mm}
\setplength{bfoldmarklength}{4mm}
\setplength{foldmarkthickness}{.5pt}
\documentclass{scrlttr2}
\begin{document}
\setplength{tfoldmarklength}{4mm}
\setplength{pfoldmarklength}{8mm}
\setplength{bfoldmarklength}{4mm}
\setplength{foldmarkthickness}{.5pt}
\begin{letter}{Recipient\\somestreet 15\\12345 postalcode}
\opening{To whom it may concern}
This is a letter body.
\closing{yours sincerely}
\end{letter}
\end{document}