![KOMA scrttl2 主题如何书写而不在前面写“主题:”?](https://linux22.com/image/388887/KOMA%20scrttl2%20%E4%B8%BB%E9%A2%98%E5%A6%82%E4%BD%95%E4%B9%A6%E5%86%99%E8%80%8C%E4%B8%8D%E5%9C%A8%E5%89%8D%E9%9D%A2%E5%86%99%E2%80%9C%E4%B8%BB%E9%A2%98%EF%BC%9A%E2%80%9D%EF%BC%9F.png)
添加主题的标准方法是使用
\setkomavar{subject}{Insert the subject of the letter}
在文件的序言中。这将在信件开头之前插入一行文字,如下所示。
主题:插入信件主题
但是,我希望主题中不包含“主题:”字样。此外,我希望主题行以粗体显示,如下所示。
插入信件主题
我怎么做?
答案1
要删除“主题:”,您需要查找 的scrlttr2
选项subject=untitled
,而要使用粗体字体,则\setkomafont{lettersubject}{\normalcolor\bfseries}
应该可以解决问题。但是,由于这两个是默认设置,您可能应该在文档中查找更改它们的位置。
\documentclass[foldmarks=true,foldmarks=blmtP,
fromphone,fromemail,fromlogo,
subject=untitled,
version=last]{scrlttr2}
\usepackage[british]{babel}
\usepackage{graphics}
\begin{document}
\setkomavar{fromname}{Joe Public}
\setkomavar{fromaddress}{2 Valley\\
SAMPLEBY\\
ZY32 1XW}
\setkomavar{fromphone}{0\,12\,34~56\,78}
\setkomavar{fromemail}{[email protected]}
\setkomavar{location}{\raggedright
Club member no.~4711\\
since 11.09.2001\\
chairman 2003--2005}
\setkomavar{date}{29th February 2011}
\setkomavar{place}{Sampleby}
\setkomavar{subject}{Missing general meeting}
\setkomafont{lettersubject}{\normalcolor\bfseries}
\begin{letter}{%
Joanna Public\\
1 Hillside\\
SAMPLESTEAD\\
WX12 3YZ%
}
\opening{Dear Madam Chair,}
The last general meeting was more than a year ago.
I would like to remind you that the articles of our
club stipulate that one should be held every
six months. For this reason, I call on the executive
board to arrange such a meeting immediately.
\closing{Anticipating an invitation}
\ps PS: I hope you do not take this request amiss.
\setkomavar*{enclseparator}{Enclosure}
\encl{Excerpt from the articles governing general
meetings}
\cc{executive board\\all members}
\end{letter}
\end{document}