在 scrlttr2 中添加“注意”行

在 scrlttr2 中添加“注意”行

在商务信函中,有一个惯例,就是在正文前加上一行“收件人:某某人士”。

我想知道在 KOMA 课程中我有哪些选择scrlttr2。以下尝试使用所谓的“参考线”。这是我唯一的选择吗?

在相关问题中,在此特定示例中,向参考行添加自定义变量会在信件日期上方添加日期:。我该如何删除它?

\documentclass[12pt,sections,headheight=30pt,headinclude,firstfoot=false,enlargefirstpage=true,foldmarks=false,foldmarks=blmtP,fromalign=center,fromphone,fromemail,version=last, backaddress=false, subject=titled]{scrlttr2}
\usepackage{scrpage2}

\usepackage[T1]{fontenc}
\usepackage{fouriernc}

\begin{document}
\setkomavar{fromname}{Name}
\setkomavar{fromaddress}{Address}
\renewcommand{\phonename}{Landline}
\setkomavar{fromphone}{Landline phone number}
\renewcommand{\mobilephonename}{Mobile}
\setkomavar{frommobilephone}{Mobile phone numbers}
\setkomavar{fromemail}{Email address}
\setkomavar{signature}{(\usekomavar{fromname})}
\newkomavar*[ATTN:]{attention}
\setkomavar{attention}{Recipient 1, Recipient 2\\ and Recipient 3}
\setkomavar{subject}{Subject}
\setkomavar{date}{\today}

\setkomavar{firsthead}{%
  \parbox{\linewidth}{\centering
    {\fontfamily{pzc}\selectfont
    \hspace{\textwidth}
    \usekomavar{fromname}\\
    \usekomavar{fromaddress}\\
    \usekomavar*{phoneseparator}\usekomavar{phoneseparator}\usekomavar{fromphone}\\
    \usekomavar*{mobilephoneseparator}\usekomavar{mobilephoneseparator}\usekomavar{frommobilephone}\\
    \usekomavar*{emailseparator}\usekomavar{emailseparator}\usekomavar{fromemail}
    }
  }%
}

\def\today{29th April, 2018}
\begin{letter}{To Address}

  \opening{Addressee}

\closing{Yours Sincerely,}

\end{letter}
\end{document}

答案1

您可以重新定义变量的描述date以删除参考行中日期上方的“日期”:

\setkomavar*{date}{}

在此处输入图片描述

代码:

\documentclass[12pt,
%sections,% unused global option (unknown to scrlttr2}
headheight=30pt,headinclude,firstfoot=false,enlargefirstpage=true,
foldmarks=false,
%foldmarks=blmtP,% unused if foldmarks=false
fromalign=center,fromphone,fromemail,version=last, backaddress=false, subject=titled]{scrlttr2}
\usepackage{scrlayer-scrpage}% scrpage2 is outdated

\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage{fouriernc}

\begin{document}
\setkomavar{fromname}{Name}
\setkomavar{fromaddress}{Address}
\renewcommand{\phonename}{Landline}
\setkomavar{fromphone}{Landline phone number}
\renewcommand{\mobilephonename}{Mobile}
\setkomavar{frommobilephone}{Mobile phone numbers}
\setkomavar{fromemail}{Email address}
\setkomavar{signature}{(\usekomavar{fromname})}
\newkomavar*[ATTN:]{attention}
\setkomavar{attention}{Recipient 1, Recipient 2\\ and Recipient 3}
\setkomavar{subject}{Subject}
\setkomavar{date}{29th April, 2018}% avoids redefining \today
\setkomavar*{date}{}% remove "Date" above the date in the reference line

\setkomavar{firsthead}{%
  \parbox{\linewidth}{\centering
    {\fontfamily{pzc}\selectfont
    \hspace{\textwidth}
    \usekomavar{fromname}\\
    \usekomavar{fromaddress}\\
    \usekomavar*{phoneseparator}\usekomavar{phoneseparator}\usekomavar{fromphone}\\
    \usekomavar*{mobilephoneseparator}\usekomavar{mobilephoneseparator}\usekomavar{frommobilephone}\\
    \usekomavar*{emailseparator}\usekomavar{emailseparator}\usekomavar{fromemail}
    }
  }%
}

\begin{letter}{To Address}
\opening{Addressee}
\closing{Yours Sincerely,}
\end{letter}
\end{document}

您还可以使用location

\setkomavar{location}{%
  \usekomavar*{attention}\\
  \usekomavar{attention}
}

在此处输入图片描述

代码:

\documentclass[12pt,
%sections,% unused global option (unknown to scrlttr2}
headheight=30pt,headinclude,firstfoot=false,enlargefirstpage=true,
foldmarks=false,
%foldmarks=blmtP,% unused if foldmarks=false
fromalign=center,fromphone,fromemail,version=last, backaddress=false, subject=titled]{scrlttr2}
\usepackage{scrlayer-scrpage}% scrpage2 is outdated

\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage{fouriernc}

\begin{document}
\setkomavar{fromname}{Name}
\setkomavar{fromaddress}{Address}
\renewcommand{\phonename}{Landline}
\setkomavar{fromphone}{Landline phone number}
\renewcommand{\mobilephonename}{Mobile}
\setkomavar{frommobilephone}{Mobile phone numbers}
\setkomavar{fromemail}{Email address}
\setkomavar{signature}{(\usekomavar{fromname})}
\newkomavar[ATTN:]{attention}% <- changed
\setkomavar{attention}{Recipient 1, Recipient 2 and Recipient 3}% <- changed
\setkomavar{subject}{Subject}
\setkomavar{date}{29th April, 2018}% avoids redefining \today

\setkomavar{location}{%
  \usekomavar*{attention}\\
  \usekomavar{attention}
}

\setkomavar{firsthead}{%
  \parbox{\linewidth}{\centering
    {\fontfamily{pzc}\selectfont
    \hspace{\textwidth}
    \usekomavar{fromname}\\
    \usekomavar{fromaddress}\\
    \usekomavar*{phoneseparator}\usekomavar{phoneseparator}\usekomavar{fromphone}\\
    \usekomavar*{mobilephoneseparator}\usekomavar{mobilephoneseparator}\usekomavar{frommobilephone}\\
    \usekomavar*{emailseparator}\usekomavar{emailseparator}\usekomavar{fromemail}
    }
  }%
}

\begin{letter}{To Address}
\opening{Addressee}
\closing{Yours Sincerely,}
\end{letter}
\end{document}

相关内容