% \iffalse meta-comment
% ======================================================================
% scrkernel-notepaper.dtx
% Copyright (c) Markus Kohm, 2006-2023
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
% This work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, version 1.3c of the license.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later and of this work.
%
% This work has the LPPL maintenance status "author-maintained".
%
% The Current Maintainer and author of this work is Markus Kohm.
%
% This work consists of all files listed in MANIFEST.md.
% ======================================================================
%%% From File: $Id: scrkernel-notepaper.dtx 4113 2024-06-07 08:20:20Z kohm $
%
% \end{macrocode}
% \end{macro}
% \end{option}
%
%
% \subsection{Options for the addressee and the location field}
%
% \begin{option}{addrfield}
% \changes{v2.8q}{2001/10/09}{added}
% \changes{v3.03}{2009/03/04}{new values added}
% \changes{v3.17}{2015/03/16}{using internal value storage}
% \begin{macro}{\@afieldmode}
% \changes{v3.03}{2009/03/04}{added}
% There are several settings for the address field---not only to switch it on
% and off:
% \begin{center}
% \begin{tabular}{lrl}
% \opt{addrfield} & \cs{@afieldmode} & meaning \\\hline
% false & 0 & don't show the address
% field\\
% true & 1 & show address field
% centered\\
% PP & 2 & address field with
% pospaid\\
% backgroundimage & 3 & address field with
% background image\\
% image & 4 & address field by image\\
% topaligned & 5 & show address field top
% aligned\\
% \end{tabular}
% \end{center}
% \begin{macrocode}
%<*option>
\newcommand*{\@afieldmode}{\@ne}
\KOMA@ncmdkey{addrfield}[true]{@afieldmode}{%
{false}{0},{off}{0},{no}{0},%
{true}{1},{on}{1},{yes}{1},%
{PP}{2},{pp}{2},%
{PPexplicite}{2},{PPExplicite}{2},%
{ppexplicite}{2},{ppExplicite}{2},%
{backgroundimage}{3},%
{PPbackgroundimage}{3},{PPBackgroundImage}{3},{PPBackGroundImage}{3},%
{ppbackgroundimage}{3},{ppBackgroundImage}{3},{ppBackGroundImage}{3},%
{image}{4},{Image}{4},%
{PPimage}{4},{PPImage}{4},%
{ppimage}{4},{ppImage}{4},%
{topaligned}{5},{alignedtop}{5}%
}
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{addrfield}{true}
% \end{macrocode}
% \begin{macro}{\@afieldfalse,\@afieldtrue,\if@afield}
% \changes{v3.03}{2009/03/04}{replaced by \cs{@afieldmode}}
% \changes{v3.36}{2022/03/02}{removed}
% \end{macro}
% \end{macro}
% \end{option}
%
% \begin{option}{priority}
% \changes{v3.03}{2009/03/04}{added}
% \changes{v3.17}{2015/03/16}{using internal value storage}
% \changes{v3.36}{2022/03/02}{value \opt{\quotechar=manual} fixed}
% \begin{macro}{\ltr@priority}
% \changes{v3.03}{2009/03/04}{added}
% The international postage convention allows two priorities for
% letters. Together with no (or manually given) priority we have three of
% them:
% \begin{center}
% \begin{tabular}{lrl}
% \opt{priority} & \cs{ltr@priority} & meaning \\\hline
% false & 0 & use variable \var{specialmail}\\
% B & 1 & set \var{specialmail} to
% B-Economy\\
% A & 2 & set \var{specialmail} to
% A-Priority\\
% \end{tabular}
% \end{center}
% \begin{macrocode}
\KOMA@ncmdkey{priority}[A]{ltr@priority}{%
{no}{0},{off}{0},{false}{0},{manual}{0},%
{B}{1},{b}{1},%
{economy}{1},{Economy}{1},{ECONOMY}{1},%
{B-ECONOMY}{1},{B-Economy}{1},{b-economy}{1},%
{A}{2},{a}{2},%
{priority}{2},{Priority}{2},{PRIORITY}{2},%
{A-PRIORITY}{2},{A-Priority}{2},{a-priority}{2}%
}%
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{priority}{false}
% \end{macrocode}
% \end{macro}
% \end{option}
%
% \begin{option}{backaddress}
% \changes{v2.8q}{2002/01/22}{added}
% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
% \changes{v3.17}{3015/03/16}{using internal value storage}
% \changes{v3.39}{2022/11/11}{initial dot removed from member argument of
% option storage commands}
% \begin{macro}{\@baddrfalse,\@baddrtrue,\if@baddr}
% \begin{macro}{\backaddr@format}
% \changes{v2.96}{2006/07/31}{added}
% The address field of the addressee can also contain a small sender's address
% also known as return address.
% \begin{center}
% \begin{tabular}{llll}
% \opt{backaddress} & \cs{if@baddr} & \cs{backaddr@format} & meaning \\\hline
% \opt{=false} & \cs{iffalse} & unchanged & don't show a
% return
% address\\
% \opt{=true} & \cs{iftrue} & unchanged & show the
% return address\\
% \opt{=underlined} & \cs{iftrue} & \cs{underline} & show
% underlined
% return
% address\\
% \opt{=plain} & \cs{iftrue} & \cs{@firstofone} & show the
% return
% address
% unchanged\\
% \end{tabular}
% \end{center}
% Initial setting is to show a underlined return address.
% \begin{macrocode}
\newcommand{\backaddr@format}[1]{}
\let\backaddr@format\underline
\newif\if@baddr\@baddrtrue
\KOMA@key{backaddress}[true]{%
\begingroup
\KOMA@set@ncmdkey{backaddress}{@tempa}{%
{false}{0},{off}{0},{no}{0},%
{true}{1},{on}{1},{yes}{1},%
{underlined}{2},%
{plain}{3}%
}{#1}%
\ifx\FamilyKeyState\FamilyKeyStateProcessed
\aftergroup\FamilyKeyStateProcessed
\ifcase\@tempa
\endgroup
\@baddrfalse
\or
\endgroup
\@baddrtrue
\or
\endgroup
\@baddrtrue
\let\backaddr@format\underline
\or
\endgroup
\@baddrtrue
\let\backaddr@format\@firstofone
\else
\endgroup
\fi
\if@baddr
\ifx\backaddr@format\underline
\KOMA@kav@replacevalue{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{backaddress}{underlined}%
\else
\ifx\backaddr@format\@firstofone
\KOMA@kav@replacevalue{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{backaddress}{plain}%
\else
\KOMA@kav@replacevalue{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{backaddress}{true}%
\fi
\fi
\else
\KOMA@kav@replacevalue{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{backaddress}{false}%
\fi
\else
\endgroup
\FamilyKeyStateUnknownValue
\fi
}
% \end{macrocode}
% \end{macro}^^A \backaddr@format
% \end{macro}^^A \if@baddr
% \end{option}^^A backaddress
%
% \begin{option}{locfield}
% \changes{v2.8q}{2001/10/09}{added}
% \changes{v2.97c}{2007/03/30}{inverted meaning fixed}
% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
% \changes{v3.17}{2015/03/16}{using internal value storage}
% \changes{v3.39}{2022/11/11}{initial dot removed from member argument of
% option storage commands}
% \changes{v3.42}{2024/06/07}{missing \cs{FamilyKeyStateProcessed} after end
% of group added}
% \begin{macro}{\@biglocfalse,\@bigloctrue,\if@bigloc}
% We allow two different automatic settings for the location field right
% beside the addressee's address field:
% \begin{center}
% \begin{tabular}{lll}
% \opt{locfield} & \cs{if@bigloc} & meaning \\\hline
% \opt{=wide} & \cs{iftrue} & set \plen{locwidth} to 2/3 of
% available space\\
% \opt{=narrow} & \cs{iffalse} & set \plen{locwidth} to 1/2 of
% available space\\
% \end{tabular}
% \end{center}
% Initial setting is \opt{locfield=narrow}.
% \begin{macrocode}
\newif\if@bigloc
\KOMA@key{locfield}[wide]{%
\begingroup
\KOMA@set@ncmdkey{locfield}{@tempa}{{wide}{0},{narrow}{1}}{#1}%
\ifx\FamilyKeyState\FamilyKeyStateProcessed
\aftergroup\FamilyKeyStateProcessed
\ifcase\@tempa
\endgroup
\@bigloctrue
\KOMA@kav@replacevalue{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{locfield}{wide}%
\else
\endgroup
\@biglocfalse
\KOMA@kav@replacevalue{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{locfield}{narrow}%
\fi
\else
\endgroup
\FamilyKeyStateUnknownValue
\fi
}
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{locfield}{narrow}
% \end{macrocode}
% \begin{option}{wlocfield,slocfield}
% \changes{v3.01a}{2008/11/20}{deprecated}
% \changes{v3.99}{2022/11/16}{removed from \KOMAScript~4}
% \begin{macrocode}
%<*!v4>
\KOMA@DeclareDeprecatedOption{wlocfield}{locfield=wide}
\KOMA@DeclareDeprecatedOption{slocfield}{locfield=narrow}
%!v4>
%
% \end{macrocode}
% \end{option}^^A wlocfield,slocfield
% \end{macro}^^A \if@bigloc
% \end{option}^^A locfield
%
%
% \subsection{Options of the fold marks}
%
% \KOMAScript{} provides a large number of horizontal and vertical fold marks.
% \begin{option}{foldmarks}
% \changes{v2.8q}{2001/09/10}{added}
% \changes{v3.00}{2008/06/06}{locally re-definition of \cs{FamilyUnkownKeyVal}
% instead of \cs{KOMA@unkown@keyval}}
% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
% \changes{v3.17}{2015/03/16}{using internal value storage}
% \changes{v3.39}{2022/11/11}{initial dot removed from member argument of
% option storage commands}
% \begin{macro}{\@foldfalse,\@foldtrue,\if@fold}
% \begin{macro}{\@usefolds}
% \changes{v2.97e}{2007/11/08}{added}
% Fold marks can be generally switched on and off and it can be selected,
% which fold marks should be shown, if fold marks has been activated:
% \begin{center}
% \begin{tabular}{llll}
% \opt{foldmarks} & \cs{if@fold} & \cs{@usefolds} & meaning\\\hline
% \opt{=true} & \cs{iftrue} & \emph{no change} & switch on fold
% marks\\
% \opt{=false} & \cs{iffalse} & \emph{no change} & switch off fold
% marks\\
% \opt{=\dots T\dots} & \emph{no change} & \texttt{T} \emph{added} & top
% fold mark
% enabled\\
% \opt{=\dots M\dots} & \emph{no change} & \texttt{M} \emph{added} & middle
% fold mark
% enabled\\
% \opt{=\dots B\dots} & \emph{no change} & \texttt{B} \emph{added} & bottom
% fold mark
% enabled\\
% \opt{=\dots P\dots} & \emph{no change} & \texttt{P} \emph{added} & hole
% punch fold mark
% enabled\\
% \opt{=\dots H\dots} & \emph{no change} & \texttt{TMBP} \emph{added} & all
% horizontal fold
% marks enabled\\
% \opt{=\dots L\dots} & \emph{no change} & \texttt{L} \emph{added} & left
% fold mark
% enabled\\
% \opt{=\dots V\dots} & \emph{no change} & \texttt{L} \emph{added} & all
% vertical fold
% marks enabled\\
% \opt{=\dots t\dots} & \emph{no change} & \texttt{T} \emph{removed} & top
% fold mark
% disabled\\
% \opt{=\dots m\dots} & \emph{no change} & \texttt{M} \emph{removed} & middle
% fold mark
% disabled\\
% \opt{=\dots b\dots} & \emph{no change} & \texttt{B} \emph{removed} & bottom
% fold mark
% disabled\\
% \opt{=\dots p\dots} & \emph{no change} & \texttt{P} \emph{removed} & hole
% punch fold mark
% disabled\\
% \opt{=\dots h\dots} & \emph{no change} & \texttt{TMBP} \emph{removed} & all
% horizontal fold
% marks disabled\\
% \opt{=\dots l\dots} & \emph{no change} & \texttt{L} \emph{removed} & left
% fold mark
% disabled\\
% \opt{=\dots v\dots} & \emph{no change} & \texttt{L} \emph{removed} & all
% vertical fold
% marks disabled\\
% \end{tabular}
% \end{center}
% Enabling or disabling a fold mark does not enable printing of fold
% marks. the enabled fold marks are only printed, if fold marks are switched
% on. The initial state is to switch on the top, middle, bottom, punch hole
% and left fold mark (in other words: all fold marks).
% \begin{macrocode}
%<*option>
\newif\if@fold\@foldtrue
\newcommand*{\@usefolds}{TMBPL}
\KOMA@key{foldmarks}[true]{%
\begingroup
\KOMA@set@ifkey\@empty{@fold}{#1}%
\ifx\FamilyKeyState\FamilyKeyStateProcessed
\if@fold\aftergroup\@foldtrue\else\aftergroup\@foldfalse\fi
\aftergroup\FamilyKeyStateProcessed
\else
\aftergroup\FamilyKeyStateProcessed
\def\sc@nf@ldch@rs##1{%
\ifx ##1\@nil\else
\if ##1T\g@addto@macro\@usefolds{##1}\else
\if ##1M\g@addto@macro\@usefolds{##1}\else
\if ##1B\g@addto@macro\@usefolds{##1}\else
\if ##1P\g@addto@macro\@usefolds{##1}\else
\if ##1L\g@addto@macro\@usefolds{##1}\else
\if ##1V\g@addto@macro\@usefolds{L}\else
\if ##1H\g@addto@macro\@usefolds{TMBP}\else
\if ##1t\scr@removechar\@usefolds{T}\else
\if ##1m\scr@removechar\@usefolds{M}\else
\if ##1b\scr@removechar\@usefolds{B}\else
\if ##1p\scr@removechar\@usefolds{P}\else
\if ##1l\scr@removechar\@usefolds{L}\else
\if ##1v%
\scr@removechar\@usefolds{L}%
\else
\if ##1h%
\scr@removechar\@usefolds{T}%
\scr@removechar\@usefolds{M}%
\scr@removechar\@usefolds{B}%
\else
\aftergroup\FamilyKeyStateUnknownValue
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\expandafter\sc@nf@ldch@rs
\fi
}%
\expandafter\sc@nf@ldch@rs#1\@nil
\fi
\endgroup
\ifx\FamilyKeyState\FamilyKeyStateProcessed
\KOMA@kav@xreplacevalue{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{foldmarks}{\@usefolds}%
\KOMA@kav@xadd{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{foldmarks}{\if@fold true\else false\fi}%
\fi
}
\KOMA@kav@xadd{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{foldmarks}{\@usefolds}%
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{foldmarks}{true}%
% \end{macrocode}
% \begin{macro}{\scr@removechar}
% \changes{v2.97e}{2007/11/08}{added}
% Used to remove one char from a character list macro like \cs{@usefolds}.
% \begin{macrocode}
\newcommand*{\scr@removechar}[2]{%
\def\in@@##1#2##2##3\in@@{%
\ifx\in@##2\else
\def\in@@####1#2\in@{\gdef#1{##1####1}}%
\in@@##2##3%
\fi}%
\expandafter\in@@#1#2\in@\in@@
}
%
% \end{macrocode}
% \end{macro}^^A \scr@removechar
% \end{macro}^^A \@usefolds
% \end{macro}^^A \if@fold
% \end{option}^^A foldmarks
%
%
% \subsection{Options of the reference line}
%
% \begin{option}{refline}
% \changes{v2.8n}{2001/09/08}{added}
% \changes{v2.96a}{2006/12/07}{alternated meaning fixed}
% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
% \changes{v3.17}{2015/03/16}{using internal value storage}
% \changes{v3.09}{2011/03/07}{values \opt{\quotechar=dateleft},
% \opt{\quotechar=dateright}, \opt{\quotechar=nodate} added}
% \changes{v3.27}{2019/05/03}{new value \opt{\quotechar=false} added}
% \changes{v3.39}{2022/11/11}{initial dot removed from member argument of
% option storage commands}
% \begin{macro}{\@refwidefalse,\@refwidetrue,\if@refwide}
% \changes{v2.8n}{2001/09/08}{added}
% \begin{macro}{\@datepos}
% \changes{v3.09}{2011/03/07}{added}
% \begin{macro}{\@reflinefalse,\@reflinetrue,\if@refline}
% \changes{v3.27}{2019/05/03}{added}
% The reference line support two predefined widths, switching off and
% three different positions for the date:
% \begin{center}
% \begin{tabular}{lllrl}
% \opt{refline} & \cs{if@refwide} & \cs{if@refline} & \cs{@datepos} &
% meaning\\\hline
% \opt{false} & \emph{unchanged}& \cs{iffalse} & \emph{unchanged} &
% deactivate reference line\\
% \opt{=wide} & \cs{iftrue} & \cs{iftrue} & \emph{unchanged} &
% print wide reference line\\
% \opt{=narrow} & \cs{iffalse} & \cs{iftrue} & \emph{unchanged} &
% print narrow reference line\\
% \opt{=nodate}& \emph{unchanged} & \emph{unchanged} & 1 & don't print
% date in reference line\\
% \opt{=dateright}& \emph{unchanged} & \emph{unchanged} & 1 & add date
% rightmost to reference line\\
% \opt{=dateleft} & \emph{unchanged} & \emph{unchanged} & 2 & add date
% leftmost to reference line\\
% \end{tabular}
% \end{center}
% \begin{macrocode}
%<*option>
\newif\if@refwide
%\newif\if@refline\@reflinetrue
\newcommand*{\@datepos}{1}
\KOMA@key{refline}[wide]{%
\begingroup
\KOMA@set@ncmdkey{refline}{@tempa}{{wide}{0},{narrow}{1},%
{dateleft}{2},{leftdate}{2},%
{dateright}{3},{rightdate}{3},%
{nodate}{4}%
% ,{no}{5},{off}{5},{false}{5}%
}{#1}%
\ifx\FamilyKeyState\FamilyKeyStateProcessed
\aftergroup\FamilyKeyStateProcessed
\ifcase\@tempa% wide
\endgroup
\@refwidetrue
%<*package>
\@reflinetrue
\KOMA@kav@remove{scrletter.\scr@pkgextension}{refline}{false}%
%
\KOMA@kav@remove{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{wide}%
\KOMA@kav@remove{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{narrow}%
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{wide}%
\or% narrow
\endgroup
\@refwidefalse
%<*package>
\@reflinetrue
\KOMA@kav@remove{scrletter.\scr@pkgextension}{refline}{false}%
%
\KOMA@kav@remove{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{wide}%
\KOMA@kav@remove{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{narrow}%
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{narrow}%
\or% dateleft
\endgroup
\def\@datepos{2}%
\KOMA@kav@remove{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{dateleft}%
\KOMA@kav@remove{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{dateright}%
\KOMA@kav@remove{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{nodate}%
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{dateleft}%
\or% dateright
\endgroup
\def\@datepos{1}%
\KOMA@kav@remove{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{dateleft}%
\KOMA@kav@remove{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{dateright}%
\KOMA@kav@remove{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{nodate}%
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{dateright}%
\or% nodate
\endgroup
\def\@datepos{0}%
\KOMA@kav@remove{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{dateleft}%
\KOMA@kav@remove{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{dateright}%
\KOMA@kav@remove{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{nodate}%
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{nodate}%
%<*package>
\or% false
\endgroup
\@reflinefalse
\KOMA@kav@remove{scrletter.\scr@pkgextension}{refline}{wide}%
\KOMA@kav@remove{scrletter.\scr@pkgextension}{reline}{narrow}%
\KOMA@kav@add{scrletter.\scr@pkgextension}{refline}{false}%
%
\fi
\else
\endgroup
\FamilyKeyStateUnknownValue
\fi
}
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{dateright}%
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{refline}{narrow}%
%
% \end{macrocode}
% \end{macro}^^A \@reflinefalse,\@reflinetrue,\if@refline
% \end{macro}^^A \@datepos
% \end{macro}^^A \@refwidefalse,\@refwidetrue,\if@refwide
% \end{option}^^A refline
%
%
% \subsection{Options of the subject}
%
% \begin{option}{subject}
% \changes{v2.8q}{2001/10/09}{added}
% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
% \changes{v3.17}{2015/03/16}{using internal value storage}
% \begin{macro}{\@subjtrue,\@subjfalse,\if@subj}
% \begin{macro}{\@subjaftertrue,\@subjafterfalse,\if@subjafter}
% \begin{macro}{\subject@format}
% \changes{v2.97c}{2007/07/06}{added}
% \begin{command}{\raggedsubject}
% \changes{v2.97c}{2007/07/06}{added}
% The subject can be printed with or without title before or after the
% opening. Different alignments and formats are also supported:
% \begin{center}
% \begin{tabular}{lllll}
% \opt{subject} & \cs{if@subj} & \cs{if@subjafter} & \cs{subject@format} &
% \cs{raggedsubject}\\\hline
% \opt{=titled} & \cs{iftrue} & \emph{unchanged} & \emph{unchanged} &
% \emph{unchanged}\\
% \opt{=untitled} & \cs{iffalse} & \emph{unchanged} & \emph{unchanged} &
% \emph{unchanged}\\
% \opt{=afteropening} & \emph{unchanged} & \cs{iftrue} & \emph{unchanged} &
% \emph{unchanged}\\
% \opt{=beforeopening} & \emph{unchanged} & \cs{iffalse} & \emph{unchanged} &
% \emph{unchanged}\\
% \opt{=underlined} & \emph{unchanged} & \emph{unchanged} & \cs{underline}
% & \emph{unchanged}\\
% \opt{=left} & \emph{unchanged} & \emph{unchanged} & \emph{unchanged} &
% \cs{raggedright} \\
% \opt{=right} & \emph{unchanged} & \emph{unchanged} & \emph{unchanged} &
% \cs{raggedleft} \\
% \opt{=centered} & \emph{unchanged} & \emph{unchanged} & \emph{unchanged} &
% \cs{centering} \\
% \end{tabular}
% \end{center}
% \begin{macrocode}
%<*option>
\newcommand{\subject@format}[1]{#1}
\newcommand*{\raggedsubject}{}
\newif\if@subj
\newif\if@subjafter
\KOMA@key{subject}{%
\begingroup
\KOMA@set@ncmdkey{subject}{@tempa}{%
{titled}{0},%
{untitled}{1},%
{afteropening}{2},%
{beforeopening}{3},%
{underlined}{4},%
{left}{5},%
{right}{6},%
{centered}{7}%
}{#1}%
\ifx\FamilyKeyState\FamilyKeyStateProcessed
\aftergroup\FamilyKeyStateProcessed
\ifcase\@tempa
\aftergroup\@subjtrue
\or
\aftergroup\@subjfalse
\or
\aftergroup\@subjaftertrue
\or
\aftergroup\@subjafterfalse
\or
\aftergroup\let\aftergroup\subject@format\aftergroup\underline
\or
\aftergroup\let\aftergroup\raggedsubject\aftergroup\raggedright
\or
\aftergroup\let\aftergroup\raggedsubject\aftergroup\raggedleft
\or
\aftergroup\let\aftergroup\raggedsubject\aftergroup\centering
\fi
\else
\aftergroup\FamilyKeyStateUnknownValue
\fi
\endgroup
\ifx\FamilyKeyState\FamilyKeyStateProcessed
\KOMA@kav@xreplacevalue{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{subject}{\if@subj titled\else untitled\fi}%
\KOMA@kav@xadd{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{subject}{\if@subjafter after\else before\fi opening}%
\ifx\subject@format\underline
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{subject}{underlined}%
\fi
\ifx\raggedsubject\raggedright
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{subject}{left}%
\else
\ifx\raggedsubject\raggedleft
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{subject}{right}%
\else
\ifx\raggedsubject\centering
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{subject}{centered}%
\fi
\fi
\fi
\fi
}
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{subject}{untitled}%
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{subject}{beforeopening}%
%
% \end{macrocode}
% \end{command}^^A \raggedsubject
% \end{macro}^^A \subject@format
% \end{macro}^^A \@subjaftertrue,\@subjafterfalse,\if@subjafter
% \end{macro}^^A \@subjtrue,\@subjfalse,\if@subj
% \end{option}^^A subject
%
%
% \subsection{Options of the typing area}
%
% \begin{option}{enlargefirstpage}
% \changes{v2.8o}{2001/09/18}{added}
% \begin{macro}{\@enlargefpfalse,\@enlargefptrue,\if@enlargefp}
% \changes{v2.8o}{2001/09/18}{added}
% Usually the text at the notepaper is placed regarding the general typing
% area. But if the position of the foot of the note paper is to high, the text
% area is automatically shorten. Option \opt{firstpageenlarge} also provides
% the opposite: enlarge the text area of the first page, if the foot of the
% note paper is placed very low.
% \begin{macrocode}
%<*option>
\KOMA@ifkey{enlargefirstpage}{@enlargefp}
%
% \end{macrocode}
% \end{macro}^^A \if@enlargefp
% \end{option}^^A enlargefirstpage
%
%
% \subsection{Options of the letter footer}
%
% \begin{option}{firstfoot}
% \changes{v2.97e}{2007/11/22}{added}
% \begin{macro}{\@firstfootfalse,\@firstfoottrue,\if@firstfoot}
% \changes{v2.8q}{2002/01/25}{added}
% Allow to switch of the footer of the note paper.
% \begin{macrocode}
%<*option>
\KOMA@ifkey{firstfoot}{@firstfoot}\@firstfoottrue
%
% \end{macrocode}
% \end{macro}
% \end{option}
%
%
% \subsection{Options of the head of succeeding pages}
%
% \begin{option}{pagenumber}
% \changes{v2.8q}{2002/01/31}{added}
% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}}
% \changes{v3.39}{2022/11/11}{initial dot removed from member argument of
% option storage commands}
% \begin{macro}{\@pageat}
% \changes{v2.8q}{2002/01/31}{added}
% This is irrelevant for the notepaper but selects the position of the page
% number on succeeding pages using page style \pstyle{headings},
% \pstyle{myheadings} or \pstyle{plain} resp. \pstyle{letter} or
% \pstyle{plain.letter}.
% \begin{center}
% \begin{tabular}{lrl}
% \opt{pagenumber} & \cs{@pageat} & meaning\\\hline
% \opt{=false} & -1 & no page number\\
% \opt{=topleft} & 0 & in the left of the page head\\
% \opt{=topmiddle} & 1 & centered in the page head\\
% \opt{=topright} & 2 & in the right of the page head\\
% \opt{=botleft} & 3 & in the left of the page foot\\
% \opt{=botmiddle} & 4 & centered in the page foot\\
% \opt{=botright} & 5 & in the right of the page foot\\
% \end{tabular}
% \end{center}
% \begin{macrocode}
%<*option>
\newcommand*{\@pageat}{4}
\KOMA@key{pagenumber}{%
\begingroup
\KOMA@set@ncmdkey{pagenumber}{@tempa}{%
{no}{-1},{off}{-1},{false}{-1},%
{topleft}{0},{headleft}{0},%
{topmiddle}{1},{topcenter}{1},{topcentered}{1},%
{headmiddle}{1},{headcenter}{1},{headcentered}{1},%
{topright}{2},{headright}{2},%
{botleft}{3},{footleft}{3},%
{botmiddle}{4},{botcenter}{4},{botcentered}{4},%
{footmiddle}{4},{footcenter}{4},{footcentered}{4},%
{botright}{5},{footright}{5},%
{top}{10},{head}{10},{bot}{11},{foot}{11},%
{left}{20},{middle}{21},{center}{21},{centered}{21},{right}{22}%
}{#1}%
\ifx\FamilyKeyState\FamilyKeyStateProcessed
\aftergroup\FamilyKeyStateProcessed
\ifnum\@tempa<10
\edef\@tempa{\endgroup\edef\noexpand\@pageat{\@tempa}}%
\else
\ifnum\@tempa<20
\@tempcnta\@pageat\relax
\ifnum\@tempcnta>2
\advance\@tempcnta by -3
\fi
\ifnum\@tempa=11
\advance\@tempcnta by 3
\fi
\edef\@tempa{\endgroup\edef\noexpand\@pageat{\the\@tempcnta}}%
\else
\ifnum\@pageat>2
\edef\@pageat{3}%
\else
\edef\@pageat{0}%
\fi
\@tempcnta\@tempa
\advance\@tempcnta by -20
\advance\@tempcnta by\@pageat
\edef\@tempa{\endgroup\edef\noexpand\@pageat{\the\@tempcnta}}%
\fi
\fi
\else
\def\@tempa{\endgroup\FamilyKeyStateUnknownValue}%
\fi
\@tempa
\KOMA@kav@xreplacevalue{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{pagenumber}{%
\ifcase \@pageat
topleft%
\or
topmiddle%
\or
topright%
\or
botleft%
\or
botmiddle%
\or
botright%
\else
false%
\fi
}%
}
\KOMA@kav@add{%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
}{pagenumber}{botmiddle}
%
% \end{macrocode}
% \end{macro}
% \end{option}
%
%
% \subsection{Commands and macros of the letter head}
%
% \begin{variable}{firsthead}
% \changes{v2.8q}{2002/01/28}{\cs{@alignfrom} set to 10000}
% \changes{v3.08}{2010/10/28}{added}
% \changes{v3.13b}{2014/10/04}{\emph{hook} for \file{DINmtext.lco} added}
% \changes{v3.27}{2019/04/02}{\emph{hook} removed}
% \changes{v3.28}{2019/11/15}{\cs{ifkomavarempty} replaced by
% \cs{Ifkomavarempty}}
% The head of the notepaper is not set by the page style but variable
% \var{firsthead} inside \cs{opening}.
% \begin{description}
% \item[ToDo:] Change this at least for \pkg*{scrletter} to make the letter
% head independent from \cs{opening}. With this \opt{fromalign} could
% immediately re-define \var{firsthead} and also \cs{@gen@fisthead}
% could become superfluously.
% \end{description}
% \begin{macrocode}
%<*body>
\newkomavar{firsthead}
\setkomavar{firsthead}{%
\parbox[b]{\useplength{firstheadwidth}}%
{\centering\usekomafont{fromaddress}{%
\Ifkomavarempty{fromname}{}{%
{\usekomafont{fromname}%
{\ignorespaces\usekomavar{fromname}}\\[-8pt]}
{\usekomafont{fromrule}{\rule{\useplength{firstheadwidth}}{.4pt}}}\\
}%
\Ifkomavarempty{fromaddress}{}{%
\ignorespaces\usekomavar{fromaddress}%
}%
}%
}%
}
% \end{macrocode}
% \end{variable}
% \begin{macro}{\scr@firsthead@postsetvar}
% \changes{v3.08}{2010/10/28}{added}
% \changes{v3.17}{2015/03/16}{internal setting of {fromalign\quotechar=false}}
% \changes{v3.39}{2022/11/11}{initial dot in member argument of
% \cs{KOMAExecuteOptions} removed}
% After setting the variable \opt{fromalign} has to be set to manual
% alignment. But this must not be done for the initialization.
% \begin{macrocode}
\newcommand*{\scr@firsthead@postsetvar}{%
\KOMAExecuteOptions[%
% \KOMAClassFileName
% scrletter.\scr@pkgextension
]{fromalign=no}%
}
% \end{macrocode}
% \end{macro}^^A \scr@firsthead@postsetvar
% \begin{macro}{\@gen@firsthead}
% \changes{v2.8q}{2002/01/28}{added}
% \changes{v2.97c}{2007/05/08}{configurable thickness of the line}
% \changes{v2.97c}{2007/05/08}{configurable font/color of the line}
% \changes{v3.06a}{2010/07/29}{using font element \fnt{fromrule}}
% \changes{v3.08}{2010/10/28}{the notepaper head is a variable}
% \changes{v3.12}{2013/05/29}{using variable \var{frommobilephone}}
% \begin{macrocode}
\newcommand*{\@gen@firsthead}{%
% \end{macrocode}
% Re-defines the page head of the notepaper, if this has been activated by
% option \opt{fromalign}.
% \begin{macrocode}
\ifcase\@alignfrom
% \end{macrocode}
% This is \cs{@alignfrom}=0 context, which means a left aligned sender's
% address. This is done using a \cs{parbox} over the while text width.
% \begin{macrocode}
\setkomavar{firsthead}{%
\parbox[b]{\textwidth}{\raggedright
% \end{macrocode}
% The name with the font element \fnt{fromname}.
% \begin{macrocode}
{\usekomafont{fromname}\strut\ignorespaces
\usekomavar{fromname}%
% \end{macrocode}
% If \cs{@rulefrom}=1, a horizontal rule has to follow. The length is either
% \plen{fromrulewidth} or, if \plen{fromrulewidth} is 0, it is
% automatically calculated. Here we avoid a rule into the logo.
% \begin{macrocode}
{%
\ifnum\@rulefrom=1\\[-.5\baselineskip]%
\usekomafont{fromrule}{%
\setlength{\@tempdima}{\useplength{fromrulewidth}}%
\ifdim\@tempdima=\z@
\setlength{\@tempdima}{\textwidth}%
\if@logo
\settowidth{\@tempdimb}{\usekomavar{fromlogo}}%
\addtolength{\@tempdima}{-\@tempdimb}%
\fi
\fi
\expandafter\rule\expandafter{\the\@tempdima}{%
\useplength{fromrulethickness}}}%
\fi
}%
\\
}%
% \end{macrocode}
% Next the senders' address with all optional fields, depending on the
% corresponding switches. Once again we need a group because of the font
% element \fnt{fromaddress} to be used.
% \begin{macrocode}
{\usekomafont{fromaddress}\strut\ignorespaces
\usekomavar{fromaddress}%
\if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi%
\if@mobilephone
\\\usekomavar*{frommobilephone}\usekomavar{frommobilephone}%
\fi%
\if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi%
\if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi%
\if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi%
% \end{macrocode}
% If \cs{@rulefrom}=2, the horizontal rule has to be placed here. Once again
% the length can be calculated automatically for \plen{fromrulewidth}=0.
% \begin{macrocode}
\ifnum\@rulefrom=2\\[-.5\baselineskip]%
\usekomafont{fromrule}{%
\setlength{\@tempdima}{\useplength{fromrulewidth}}%
\ifdim\@tempdima=\z@
\setlength{\@tempdima}{\textwidth}%
\fi
\expandafter\rule\expandafter{\the\@tempdima}{%
\useplength{fromrulethickness}}}%
\fi
\\
}%
}%
% \end{macrocode}
% This was the \cs{parbox}, but maybe we have to place the logo.
% \begin{macrocode}
\if@logo
\llap{\usekomavar{fromlogo}}%
\fi
}%
\renewcommand*{\@alignfrom}{0}%
\or
% \end{macrocode}
% This is \cs{@alignfrom}=1 context, which means centered sender's
% address. Here the logo needs special treatment: It is placed in the location
% field.
% \begin{macrocode}
\setkomavar{firsthead}{%
\parbox[b]{\textwidth}{\centering
{\usekomafont{fromname}\strut\ignorespaces
\usekomavar{fromname}%
{%
\ifnum\@rulefrom=1\\[-.5\baselineskip]%
\usekomafont{fromrule}{%
\setlength{\@tempdima}{\useplength{fromrulewidth}}%
\ifdim\@tempdima=\z@
\setlength{\@tempdima}{\textwidth}%
\fi
\expandafter\rule\expandafter{\the\@tempdima}{%
\useplength{fromrulethickness}}}%
\fi
}%
\\
}%
{\usekomafont{fromaddress}\strut\ignorespaces
\usekomavar{fromaddress}%
\if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi%
\if@mobilephone
\\\usekomavar*{frommobilephone}\usekomavar{frommobilephone}%
\fi%
\if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi%
\if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi%
\if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi%
\ifnum\@rulefrom=2\\[-.5\baselineskip]%
\usekomafont{fromrule}{%
\setlength{\@tempdima}{\useplength{fromrulewidth}}%
\ifdim\@tempdima=\z@
\setlength{\@tempdima}{\textwidth}%
\fi
\expandafter\rule\expandafter{\the\@tempdima}{%
\useplength{fromrulethickness}}}%
\fi
\\
}%
}%
}%
\renewcommand*{\@alignfrom}{1}%
\or
% \end{macrocode}
% This is \cs{@alignfrom}=2 context, which means right aligned sender's
% address. This is almost the same as left aligned.
% \begin{macrocode}
\setkomavar{firsthead}{%
\if@logo
\rlap{\usekomavar{fromlogo}}%
\fi
\parbox[b]{\textwidth}{\raggedleft
{\usekomafont{fromname}\strut\ignorespaces
\usekomavar{fromname}%
{%
\ifnum\@rulefrom=1\\[-.5\baselineskip]%
\usekomafont{fromrule}{%
\setlength{\@tempdima}{\useplength{fromrulewidth}}%
\ifdim\@tempdima=\z@
\setlength{\@tempdima}{\textwidth}%
\if@logo
\settowidth{\@tempdimb}{\usekomavar{fromlogo}}%
\addtolength{\@tempdima}{-\@tempdimb}%
\fi
\fi
\expandafter\rule\expandafter{\the\@tempdima}{%
\useplength{fromrulethickness}}}%
\fi
}%
\\
}%
{\usekomafont{fromaddress}\strut\ignorespaces
\usekomavar{fromaddress}%
\if@phone\\\usekomavar*{fromphone}\usekomavar{fromphone}\fi%
\if@mobilephone
\\\usekomavar*{frommobilephone}\usekomavar{frommobilephone}%
\fi%
\if@fax\\\usekomavar*{fromfax}\usekomavar{fromfax}\fi%
\if@email\\\usekomavar*{fromemail}\usekomavar{fromemail}\fi%
\if@www\\\usekomavar*{fromurl}\usekomavar{fromurl}\fi%
\ifnum\@rulefrom=2\\[-.5\baselineskip]%
\usekomafont{fromrule}{%
\setlength{\@tempdima}{\useplength{fromrulewidth}}%
\ifdim\@tempdima=\z@
\setlength{\@tempdima}{\textwidth}%
\fi
\expandafter\rule\expandafter{\the\@tempdima}{%
\useplength{fromrulethickness}}}%
\fi
\\
}%
}%
}%
\renewcommand*{\@alignfrom}{2}%
% \end{macrocode}
% All other values of \cs{@alignfrom} do not change anything.
% \begin{macrocode}
\fi
}
% \end{macrocode}
% \end{macro}^^A \@gen@firsthead
%
% \begin{command}{\firsthead}
% \changes{v3.08}{2010/10/28}{deprecated}
% \changes{v3.99}{2022/11/16}{removed from \KOMAScript~4}
% \begin{macro}{\@firsthead}
% \changes{v3.08}{2010/10/28}{deprecated}
% \changes{v3.99}{2022/11/16}{removed from \KOMAScript~4}
% \begin{macrocode}
%<*class&!v4>
\newcommand*{\@firsthead}{%
\ClassWarning{scrlttr2}{%
Deprecated usage of \string\@firsthead.\MessageBreak
\string\usekomavar{firsthead} should be used\MessageBreak
instead of \string\@firsthead
}%
\usekomavar{firsthead}%
}
\newcommand{\firsthead}{%
\ClassWarning{scrlttr2}{%
Deprecated usage of \string\firsthead.\MessageBreak
You should use \string\setkomavar{firsthead}\MessageBreak
instead of \string\firsthead
}
\setkomavar{firsthead}%
}
%
%
% \end{macrocode}
% \end{macro}
% \end{command}
%
% \subsection{Fonts of the notepaper}
%
% \begin{fontelement}{foldmark}
% \changes{v2.97c}{2007/05/08}{added}
% The font or indeed the color of the fold marks.
% \begin{macrocode}
%<*body>
\newkomafont{foldmark}{}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{fromname}
% \changes{v2.95}{2006/03/23}{using \cs{newkomafont}}
% The font of the sender's name in the letter head.
% \begin{macrocode}
\newkomafont{fromname}{}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{fromaddress}
% \changes{v2.95}{2006/03/23}{using \cs{newkomafont}}
% The font of the sender's address in the letter head.
% \begin{macrocode}
\newkomafont{fromaddress}{}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{fromrule}
% \changes{v2.97c}{2007/05/08}{added}
% The font or indeed the color of the horizontal rule above or below the
% sender's address.
% \begin{macrocode}
\newkomafont{fromrule}{}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{backaddress}
% \changes{v2.95}{2006/03/23}{using \cs{newkomafont}}
% \changes{v3.21}{2016/05/19}{support of option
% \opt{egregdoesnotlikesansseriftitles}}
% \changes{v3.39}{2023/04/04}{using \cs{maybesffamily}}
% The font of the return address.
% \begin{macrocode}
\newkomafont{backaddress}{\maybesffamily}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{specialmail}
% \changes{v2.97c}{2007/07/06}{added}
% The font of the special sending note.
% \begin{macrocode}
\newkomafont{specialmail}{}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{priority}
% \changes{v3.03}{2009/03/04}{added}
% The font of the priority note of priority A or B. Here we don't use any lead
% and sans-serif is a must, so \opt{sfdefaults} is ignored.
% \begin{macrocode}
\newkomafont{priority}{\fontsize{10pt}{10pt}\sffamily\bfseries}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{prioritykey}
% \changes{v3.03}{2009/03/04}{added}
% The font of the letter of priority A or B. It is used after
% \fnt{priority}. Generally this should be 9\,mm, but this would need a free
% scalable font. With 24.88\,pt we are only 0.25\,mm to low. This should not
% be a problem and does also work with Computer Modern. Once again we do not
% use any lead.
% \begin{macrocode}
\newkomafont{prioritykey}{\fontsize{24.88pt}{24.88pt}\selectfont}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{PPlogo}
% \changes{v3.03}{2009/03/04}{added}
% The font of the ``\texttt{P.P.}'' logo, with \opt{addrfield=PP}. Once again
% sans-serif is a must, so option \opt{sfdefaults} is ignored.
% \begin{macrocode}
\newkomafont{PPlogo}{\sffamily\bfseries}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{PPdata}
% \changes{v3.03}{2009/03/04}{added}
% The font to be used inside the PP head. Once again sans-serif is a must, so
% option \opt{sfdefaults} is ignored.
% \begin{macrocode}
\newkomafont{PPdata}{\sffamily}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{addressee}
% \changes{v2.97c}{2007/07/06}{added}
% The font to be used for the whole addressee.
% \begin{macrocode}
\newkomafont{addressee}{}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{toname}
% \changes{v2.97c}{2007/07/06}{added}
% The font used only for the name of the addressee in difference to
% \fnt{addressee}.
% \begin{macrocode}
\newkomafont{toname}{}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{toaddress}
% \changes{v2.97c}{2007/07/06}{added}
% The font used only for the address of the addressee in difference to
% \fnt{addressee}.
% \begin{macrocode}
\newkomafont{toaddress}{}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{refname}
% \changes{v2.97c}{2007/05/14}{added}
% \changes{v3.21}{2016/05/19}{support of \opt{egregdoesnotlikesansseriftitles}}
% \changes{v3.39}{2023/04/04}{usage of \cs{maybesffamily}}
% The font for the field names of the reference line.
% \begin{macrocode}
\newkomafont{refname}{\maybesffamily\scriptsize}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{refvalue}
% \changes{v2.97c}{2007/05/14}{added}
% \changes{v2.97d}{2007/10/09}{initial value changed}
% \changes{v3.39}{2022/10/25}{using \cs{scr@v@is@eq}}
% The font of the field values of the reference line.
% Support for option \opt{sfdefaults} is not needed on
% compatibility mode, because the option did not exist in version 2.97.
% \begin{macrocode}
%<*class&!v4>
\expandafter\ifnum\scr@v@is@eq{2.97}%
\newkomafont{refvalue}{\sffamily\scriptsize}
\else
%
\newkomafont{refvalue}{}
%\fi
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{placeanddate}
% \changes{v3.12}{2013/07/31}{added}
% The font is used for place and date, if not real reference line but only
% place and date are used.
% \begin{macrocode}
\newkomafont{placeanddate}{}
% \end{macrocode}
% \end{fontelement}
%
% \begin{fontelement}{lettertitle}
% \changes{v3.17}{2015/02/21}{replacement of \fnt{letter}}
% \changes{v3.21}{2016/05/19}{support of \opt{egregdoesnotlikesansseriftitles}}
% \changes{v3.39}{2023/04/04}{usage of \cs{maybesffamily}}
% The font of the title of the letter.
% \begin{macrocode}
\newkomafont{lettertitle}{\normalcolor\maybesffamily\bfseries}
% \end{macrocode}
% \begin{fontelement}{title}
% \changes{v2.95}{2006/03/23}{using \cs{newkomafont}}
% \changes{v3.17}{2015/02/21}{only an alias}
% \changes{v3.17a}{2015/04/26}{alias fixed}
% \begin{macrocode}
%\scr@ifundefinedorrelax{scr@fnt@title}{%
\aliaskomafont{title}{lettertitle}%
%}{}
% \end{macrocode}
% \end{fontelement}
% \end{fontelement}
%
% \begin{fontelement}{lettersubject}
% \changes{v3.17}{2015/02/21}{replacement of \texttt{subject}}
% \changes{v3.17a}{2015/04/26}{alias fixed}
% The font of the subject of the letter.
% \begin{macrocode}
\newkomafont{lettersubject}{\normalfont\bfseries}
% \end{macrocode}
% \begin{fontelement}{subject}
% \changes{v2.95}{2006/03/23}{using \cs{newkomafont}}
% \changes{v3.17}{2015/02/21}{only an alias}
% \begin{macrocode}
%\scr@ifundefinedorrelax{scr@fnt@subject}{%
\aliaskomafont{subject}{lettersubject}%
%}{}
%