% \iffalse meta-comment
% ======================================================================
% scrkernel-fonts.dtx
% Copyright (c) Markus Kohm, 2002-2022
%
% 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-fonts.dtx 3958 2022-10-06 12:44:28Z kohm $
%<identify>%%%            (run: identify)
%<option>%%%            (run: option)
%<body>%%%            (run: body)
%<10pt>%%%            (run: 10pt)
%<11pt>%%%            (run: 11pt)
%<11pt>%%%            (run: 12pt)
%<*dtx>
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\begingroup
  \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
  \filedate$Date: 2022-10-06 14:44:28 +0200 (Do, 06. Okt 2022) $
  \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
  \filerevision$Revision: 3958 $
  \edef\reserved@a{%
    \noexpand\endgroup
    \noexpand\ProvidesFile{scrkernel-fonts.dtx}%
                          [\filedate\space\filerevision\space
                           KOMA-Script source
                           (font size)]
  }%
\reserved@a
% \changes{v3.09}{2011/02/23}{new package \pkg*{scrfontsizes}}
%</dtx>
%<*package&generator&identify>
%<package&generator&identify>\ProvidesPackage{scrfontsizes}[%
%!KOMAScriptVersion
%<package&generator&identify>  package (font size file generator)]
%</package&generator&identify>
%<*dtx>
\documentclass[USenglish]{koma-script-source-doc}
\usepackage{babel}
\usepackage{hvlogos}
\setcounter{StandardModuleDepth}{2}
\begin{document}
\DocInput{scrkernel-fonts.dtx}
\end{document}
%</dtx>
% \fi
%
%
% \changes{v2.95}{2002/06/25}{new by splitting \file{scrclass.dtx}}
% \changes{v3.36}{2022/02/22}{switch over from \cls*{scrdoc} to
%   \cls*{koma-script-source-doc}}
% \changes{v3.36}{2022/02/22}{implementation documentation in English}
%
% \GetFileInfo{scrkernel-fonts.dtx}
% \title{Code for the Foats of the
%   \href{https://komascript.de}{\KOMAScript} Classes}
% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
% \date{Revision \fileversion{} of \filedate}
% \maketitle
% \begin{abstract}
%   \file{scrkernel-fonts.dtx} mainly implements the font selection of
%   \KOMAScript{}. This is not only the selection of the font sizes but also
%   the implementation of font elements. Additionally it provides package
%   \pkg*{scrfontsizes} to generate new font size files.
% \end{abstract}
% \tableofcontents
%
% \section{User Manual}
%
% You can find the user documentation the commands implemented here in the
% \KOMAScript{} manual, either the German \file{scrguide} or the English
% \file{scrguien}. The user documentation of alpha package \pkg*{scrfontsizes}
% is still missing.
%
%
% \MaybeStop{\PrintIndex}
%
%
% \section{Implementation of \KOMAScript{} Font Features}
%
% \subsection{Options of the font size files generator package}
%
% From version 3.09 there exist package \pkg*{scrfontsizes}, which is currently
% very rudimentary. However it can used to generate font size files that can
% be modified by the user afterwards. Currently it does not provide any options.
%
%    \begin{macrocode}
%<*generator&option>
\ProcessOptions\relax
%</generator&option>
%    \end{macrocode}
%
% \subsection{Font size options of the \KOMAScript{} classes}
%
% \begin{option}{10pt,11pt,12pt}
% These options do not exist as explicit options but are handled by
% \cs{DeclareOption*} via \cs{@pt@scan}.
% \end{option}
%
% \begin{macro}{\@ptsize}
% \changes{v2.96}{2006/08/11}{\cs{@ptsize} different temporary meaning}
% \changes{v3.27}{2019/03/25}{\cs{providecommand} instead of \cs{newcommand}}
% The main meaning of \cs{@ptsize} is the base font size minus 10\,pt, or in
% other words: base font size = \cs{@ptsize} + 10\,pt. But, until the final
% font size has been set, we use it for the default size. \cs{providecommand}
% is used to define it, so a wrapper class can define a different default size
% before loading the final class.
%    \begin{macrocode}
%<*class&option>
\providecommand*\@ptsize{%
%<!letter>  11%
%<letter>  12%
}
%</class&option>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@pt@scan}
% \changes{v2.6}{2000/01/04}{added}
% \begin{macro}{\@pt@@scan}
% \changes{v2.6}{2000/01/04}{added}
% \changes{v2.97c}{2007/05/12}{\cs{KOMA@UseObsolete} replaced by
%   \cs{KOMA@UseObsoleteOption}}
% \changes{v2.98c}{2008/03/22}{Usage of \cs{KOMA@UseObsoleteOption} fixed}
% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}}
% \changes{v3.12}{2013/03/04}{other font size options than \opt{10pt},
%   \opt{11pt}, \opt{12pt} are deprecated}
% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
% \changes{v3.28}{2019/11/18}{\cs{ifnumber} renamed to \cs{Ifnumber}}
% This macro scans the current option and recognizes classic font size
% options. It is used with \cs{DeclareOption*}.
%    \begin{macrocode}
%<*class&option>
\newcommand*{\@pt@scan}{%
  \expandafter\@pt@@scan\CurrentOption pt\@pt@@scan%
}
\newcommand*{\@pt@@scan}{}
\def\@pt@@scan #1pt#2\@pt@@scan{%
  \Ifstr{#2}{pt}{%
    \Ifnumber{#1}{%
      \Ifstr{#1}{10}{%
        \KOMA@UseStandardOption{\PackageInfoNoLine{\KOMAClassName}}%
                               {#1#2}{fontsize=#1#2}%
      }{%
        \Ifstr{#1}{11}{%
          \KOMA@UseStandardOption{\PackageInfoNoLine{\KOMAClassName}}%
                                 {#1#2}{fontsize=#1#2}%
        }{%
          \Ifstr{#1}{12}{%
            \KOMA@UseStandardOption{\PackageInfoNoLine{\KOMAClassName}}%
                                   {#1#2}{fontsize=#1#2}%
          }{%
            \KOMA@UseDeprecatedOption{\PackageWarningNoLine{\KOMAClassName}}%
                                     {#1#2}{fontsize=#1#2}%
          }%
        }%
      }
    }{\@headlines}%
  }{\@headlines}%
}
%</class&option>
%    \end{macrocode}
% \end{macro}^^A \@pt@@scan
% \end{macro}^^A \@pt@scan
%
% \begin{macro}{\@fontsizefilebase}
% \changes{v2.96}{2006/08/11}{added}
% \changes{v3.00}{2008/05/01}{definition earlier because of \pkg*{scrextend}}
% This is the prefix for the \KOMAScript{} font size files. Wrapper classes
% are allowed to change it to use their own font size files.
%    \begin{macrocode}
%<*option&(class|extend)>
\providecommand*{\@fontsizefilebase}{scrsize}
%    \end{macrocode}
% \end{macro}
%
% \changes{v3.17}{2015/03/10}{saving option values in internal list}
% \begin{option}{fontsize}
% \changes{v2.96}{2006/08/11}{function rewritten}
% \changes{v2.98c}{2008/03/26}{loading font size file if available}
% \changes{v3.12}{2013/03/05}{signaling using \cs{FamilyKeyStateProcessed}}
% \changes{v3.38}{2022/10/06}{error message in horizontal mode added}
% The option itself. Note, that it supports also font sizes like
% \texttt{10.3pt}.
%    \begin{macrocode}
\KOMA@key{fontsize}{%
%<*!extend>
  \scr@ifundefinedorrelax{changefontsizes}{%
    \@defaultunits\@tempdima#1pt\relax\@nnil
    \edef\@ptsize{#1}%
  }{%
%</!extend>
    \ifvmode\else
      \par
%<class>      \ClassError{\KOMAClassName}{%
%<extend>      \PackageError{scrextend}{%
        Option `fontsize' inside paragraph not allowed%
      }{%
        Option `fontsize' has been designed to change the base font size of
        a\MessageBreak
        document. It has not been made to change the current font
        size. Moreover\MessageBreak
        using it inside a paragraph mostly will not have the intended result,
        because\MessageBreak
        TeX always uses the setting of `\string\baselineskip' and other
        parameters from the\MessageBreak
        end of a paragraph for the whole paragraph. Therefore using option
        `fontsize'\MessageBreak
        in TeX's horizontal mode does not make sense and is not
        permitted.\MessageBreak
        You should use font size commands like `\string\Huge'…`\string\tiny'
        or `\string\fontsize' here.\MessageBreak
        See a LaTeX introduction for more information.\MessageBreak
        But maybe you've just forgotten to make a paragraph. So if you'd
        continue,\MessageBreak
        I'll add `\expandafter\string\csname par\endcsname'.%
      }%
    \fi
    \expandafter\@defaultunits\expandafter\@tempdima#1 pt\relax\@nnil
    \edef\@tempa{#1}%
    \setlength{\@tempdimb}{\@tempdima}%
    \edef\@tempb{\strip@pt\@tempdimb}%
    \addtolength{\@tempdimb}{-10\p@}%
    \edef\@ptsize{\strip@pt\@tempdimb}%
    \edef\@tempa{%
      \noexpand\makeatletter
      \noexpand\InputIfFileExists{\@fontsizefilebase\@tempa.clo}{%
%<!extend>        \noexpand\ClassInfo{\KOMAClassName}{%
%<extend>        \noexpand\PackageInfo{scrextend}{%
          File `\@fontsizefilebase\@tempa.clo' used to setup font sizes}%
      }{%
        \noexpand\InputIfFileExists{\@fontsizefilebase\@tempb pt.clo}{%
%<!extend>          \noexpand\ClassInfo{\KOMAClassName}{%
%<extend>          \noexpand\PackageInfo{scrextend}{%
            File `\@fontsizefilebase\@tempb pt.clo' used instead of%
            \noexpand\MessageBreak
            file `\@fontsizefilebase\@tempa.clo' to setup font sizes}%
        }{%
          \noexpand\changefontsizes{#1}%
        }%
      }%
      \noexpand\catcode`\noexpand\@=\the\catcode`\@
    }%
%<extend>  \scr@ifundefinedorrelax{changefontsizes}{%
%<extend>    \expandafter\AtEndOfPackage\expandafter{\@tempa}%
%<extend>  }{%
    \@tempa
  }%
  \FamilyKeyStateProcessed
  \KOMA@kav@xreplacevalue{.%
%<class>    \KOMAClassFileName
%<extend>    scrextend.\scr@pkgextension
  }{fontsize}{#1}%
}
%</option&(class|extend)>
%    \end{macrocode}
% \end{option}
%
%
% \subsection{Packages required by the font size file generator package}
%
% \pkg*{scrfontsizes} needs command \cs{changefontsizes}. This can either be
% provided by a \KOMAScript{} class or package \pkg*{scrextend}.
%    \begin{macrocode}
%<*generator&body>
\@ifundefined{changefontsizes}{\RequirePackage{scrextend}}{}
%</generator&body>
%    \end{macrocode}
%
%
% \subsection{The font size files}
%
% \changes{v2.6}{2000/01/04}{reading font size files works independent from size}
% \changes{v2.98c}{2008/03/26}{using my own \file{scrsize\dots.clo} files}
%
% We need at least the font size files for the three base sizes 10\,pt, 11\,pt
% and 12\,pt. From version 2.98c \KOMAScript{} prefers to use its own files,
% because these can be loaded without problems after |\begin{document}| and
% after another font size file has already been loaded. Nevertheless the base
% sizes are more or less from the standard classes.
%
%    \begin{macrocode}
%<*10pt|11pt|12pt>
\ProvidesFile{%
%<10pt>  scrsize10pt.clo%
%<11pt>  scrsize11pt.clo%
%<12pt>  scrsize12pt.clo%
}[\KOMAScriptVersion\space font size class option %
%<10pt>  (10pt)%
%<11pt>  (11pt)%
%<12pt>  (12pt)%
]
%    \end{macrocode}
%
% \begin{command}{\normalsize,\small,\footnotesize,\scriptsize,\tiny,\large,
%                 \Large,\LARGE,\huge,\Huge}
% \changes{v2.98c}{2008/03/26}{defined in the \file{scrsize\dots.clo} files}
% \changes{v3.38}{2022/07/30}{define the macros robust as the \file{clo} files
%   from 2021/10/04}
%    \begin{macrocode}
\let\normalsize\@undefined
\DeclareRobustCommand\normalsize{%
%<*10pt>
  \@setfontsize\normalsize\@xpt\@xiipt
  \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
  \abovedisplayshortskip \z@ \@plus3\p@
  \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
%</10pt>
%<*11pt>
  \@setfontsize\normalsize\@xipt{13.6}%
  \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
  \abovedisplayshortskip \z@ \@plus3\p@
  \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
%</11pt>
%<*12pt>
  \@setfontsize\normalsize\@xiipt{14.5}%
  \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
  \abovedisplayshortskip \z@ \@plus3\p@
  \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
%</12pt>
  \belowdisplayskip \abovedisplayskip
  \let\@listi\@listI
}
\let\small\@undefined
\DeclareRobustCommand\small{%
%<*10pt>
  \@setfontsize\small\@ixpt{11}%
  \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
  \abovedisplayshortskip \z@ \@plus2\p@
  \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
  \def\@listi{\leftmargin\leftmargini
    \topsep 4\p@ \@plus2\p@ \@minus2\p@
    \parsep 2\p@ \@plus\p@ \@minus\p@
    \itemsep \parsep}%
%</10pt>
%<*11pt>
  \@setfontsize\small\@xpt\@xiipt
  \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
  \abovedisplayshortskip \z@ \@plus3\p@
  \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
  \def\@listi{\leftmargin\leftmargini
    \topsep 6\p@ \@plus2\p@ \@minus2\p@
    \parsep 3\p@ \@plus2\p@ \@minus\p@
    \itemsep \parsep}%
%</11pt>
%<*12pt>
  \@setfontsize\small\@xipt{13.6}%
  \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
  \abovedisplayshortskip \z@ \@plus3\p@
  \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
  \def\@listi{\leftmargin\leftmargini
    \topsep 9\p@ \@plus3\p@ \@minus5\p@
    \parsep 4.5\p@ \@plus2\p@ \@minus\p@
    \itemsep \parsep}%
%</12pt>
  \belowdisplayskip \abovedisplayskip
}
\let\footnotesize\@undefined
\DeclareRobustCommand\footnotesize{%
%<*10pt>
  \@setfontsize\footnotesize\@viiipt{9.5}%
  \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
  \abovedisplayshortskip \z@ \@plus\p@
  \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
  \def\@listi{\leftmargin\leftmargini
    \topsep 3\p@ \@plus\p@ \@minus\p@
    \parsep 2\p@ \@plus\p@ \@minus\p@
    \itemsep \parsep}%
%</10pt>
%<*11pt>
  \@setfontsize\footnotesize\@ixpt{11}%
  \abovedisplayskip 8\p@ \@plus2\p@ \@minus4\p@
  \abovedisplayshortskip \z@ \@plus\p@
  \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
  \def\@listi{\leftmargin\leftmargini
    \topsep 4\p@ \@plus2\p@ \@minus2\p@
    \parsep 2\p@ \@plus\p@ \@minus\p@
    \itemsep \parsep}%
%</11pt>
%<*12pt>
   \@setfontsize\footnotesize\@xpt\@xiipt
   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
   \def\@listi{\leftmargin\leftmargini
               \topsep 6\p@ \@plus2\p@ \@minus2\p@
               \parsep 3\p@ \@plus2\p@ \@minus\p@
               \itemsep \parsep}%
%</12pt>
  \belowdisplayskip \abovedisplayskip
}
%<*10pt>
\let\scriptsize\@undefined
\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt}
\let\tiny\@undefined
\DeclareRobustCommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
\let\large\@undefined
\DeclareRobustCommand\large{\@setfontsize\large\@xiipt{14}}
\let\Large\@undefined
\DeclareRobustCommand\Large{\@setfontsize\Large\@xivpt{18}}
\let\LARGE\@undefined
\DeclareRobustCommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
\let\huge\@undefined
\DeclareRobustCommand\huge{\@setfontsize\huge\@xxpt{25}}
\let\Huge\@undefined
\DeclareRobustCommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
%</10pt>
%<*11pt>
\let\scriptsize\@undefined
\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}}
\let\tiny\@undefined
\DeclareRobustCommand\tiny{\@setfontsize\tiny\@vipt\@viipt}
\let\large\@undefined
\DeclareRobustCommand\large{\@setfontsize\large\@xiipt{14}}
\let\Large\@undefined
\DeclareRobustCommand\Large{\@setfontsize\Large\@xivpt{18}}
\let\LARGE\@undefined
\DeclareRobustCommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
\let\huge\@undefined
\DeclareRobustCommand\huge{\@setfontsize\huge\@xxpt{25}}
\let\Huge\@undefined
\DeclareRobustCommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
%</11pt>
%<*12pt>
\let\scriptsize\@undefined
\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}}
\let\tiny\@undefined
\DeclareRobustCommand\tiny{\@setfontsize\tiny\@vipt\@viipt}
\let\large\@undefined
\DeclareRobustCommand\large{\@setfontsize\large\@xivpt{18}}
\let\Large\@undefined
\DeclareRobustCommand\Large{\@setfontsize\Large\@xviipt{22}}
\let\LARGE\@undefined
\DeclareRobustCommand\LARGE{\@setfontsize\LARGE\@xxpt{25}}
\let\huge\@undefined
\DeclareRobustCommand\huge{\@setfontsize\huge\@xxvpt{30}}
\@ifundefined{DeclareCommandCopy}{%
  \let\Huge\huge
}{%
  \DeclareCommandCopy\Huge\huge
}
%</12pt>
\normalsize
%    \end{macrocode}
% \end{command}
%
% \begin{length}{\footnotesep,\footins,\floatsep,\textfloatsep,\intextsep,
%                \dblfloatsep,\sbltextfloatsep,\partopsep}
% \changes{v2.98c}{2008/03/26}{defined in the \file{scrsize\dots.clo} files}
% \begin{ilength}{\@fptop,\@fpsep,\@fpbot,\@dblfptop,\@dblfpsep,\@dblfpbot}
% \changes{v2.98c}{2008/03/26}{defined in the \file{scrsize\dots.clo} files}
% The values are same as with the standard classes.
%    \begin{macrocode}
%<*10pt>
\setlength\footnotesep    {6.65\p@}
\setlength{\skip\footins} {9\p@ \@plus 4\p@ \@minus 2\p@}
\setlength\floatsep       {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\textfloatsep   {20\p@ \@plus 2\p@ \@minus 4\p@}
\setlength\intextsep      {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\dblfloatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
\setlength\partopsep      {2\p@ \@plus 1\p@ \@minus 1\p@}
\setlength\@fptop         {0\p@ \@plus 1fil}
\setlength\@fpsep         {8\p@ \@plus 2fil}
\setlength\@fpbot         {0\p@ \@plus 1fil}
\setlength\@dblfptop      {0\p@ \@plus 1fil}
\setlength\@dblfpsep      {8\p@ \@plus 2fil}
\setlength\@dblfpbot      {0\p@ \@plus 1fil}
%</10pt>
%<*11pt>
\setlength\footnotesep    {7.7\p@}
\setlength{\skip\footins} {10\p@ \@plus 4\p@ \@minus 2\p@}
\setlength\floatsep       {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\textfloatsep   {20\p@ \@plus 2\p@ \@minus 4\p@}
\setlength\intextsep      {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\dblfloatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
\setlength\partopsep      {3\p@ \@plus 1\p@ \@minus 1\p@}
\setlength\@fptop         {0\p@ \@plus 1fil}
\setlength\@fpsep         {8\p@ \@plus 2fil}
\setlength\@fpbot         {0\p@ \@plus 1fil}
\setlength\@dblfptop      {0\p@ \@plus 1fil}
\setlength\@dblfpsep      {8\p@ \@plus 2fil}
\setlength\@dblfpbot      {0\p@ \@plus 1fil}
%</11pt>
%<*12pt>
\setlength\footnotesep    {8.4\p@}
\setlength{\skip\footins} {10.8\p@ \@plus 4\p@ \@minus 2\p@}
\setlength\floatsep       {12\p@ \@plus 2\p@ \@minus 4\p@}
\setlength\textfloatsep   {20\p@ \@plus 2\p@ \@minus 4\p@}
\setlength\intextsep      {14\p@ \@plus 4\p@ \@minus 4\p@}
\setlength\dblfloatsep    {14\p@ \@plus 2\p@ \@minus 4\p@}
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
\setlength\partopsep      {3\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\@fptop         {0\p@ \@plus 1fil}
\setlength\@fpsep         {10\p@ \@plus 2fil}
\setlength\@fpbot         {0\p@ \@plus 1fil}
\setlength\@dblfptop      {0\p@ \@plus 1fil}
\setlength\@dblfpsep      {10\p@ \@plus 2fil}
\setlength\@dblfpbot      {0\p@ \@plus 1fil}
%</12pt>
%    \end{macrocode}
% \begin{macro}{\@listi,\@listii,\@listiii,\@listiv,\@listv,\@listvi}
% \changes{v2.98c}{2008/03/26}{defined in the \file{scrsize\dots.clo} files}
% The definitions are the same as with the standard classes.
%    \begin{macrocode}
\def\@listi{\leftmargin\leftmargini
%<*10pt>
            \parsep 4\p@ \@plus2\p@ \@minus\p@
            \topsep 8\p@ \@plus2\p@ \@minus4\p@
            \itemsep4\p@ \@plus2\p@ \@minus\p@}
%</10pt>
%<*11pt>
            \parsep 4.5\p@ \@plus2\p@ \@minus\p@
            \topsep 9\p@   \@plus3\p@ \@minus5\p@
            \itemsep4.5\p@ \@plus2\p@ \@minus\p@}
%</11pt>
%<*12pt>
            \parsep 5\p@  \@plus2.5\p@ \@minus\p@
            \topsep 10\p@ \@plus4\p@   \@minus6\p@
            \itemsep5\p@  \@plus2.5\p@ \@minus\p@}
%</12pt>
\let\@listI\@listi
\def\@listii {\leftmargin\leftmarginii
              \labelwidth\leftmarginii
              \advance\labelwidth-\labelsep
%<*10pt>
              \topsep    4\p@ \@plus2\p@ \@minus\p@
              \parsep    2\p@ \@plus\p@  \@minus\p@
%</10pt>
%<*11pt>
              \topsep    4.5\p@ \@plus2\p@ \@minus\p@
              \parsep    2\p@   \@plus\p@  \@minus\p@
%</11pt>
%<*12pt>
              \topsep    5\p@   \@plus2.5\p@ \@minus\p@
              \parsep    2.5\p@ \@plus\p@    \@minus\p@
%</12pt>
              \itemsep   \parsep}
\def\@listiii{\leftmargin\leftmarginiii
              \labelwidth\leftmarginiii
              \advance\labelwidth-\labelsep
%<10pt>              \topsep    2\p@ \@plus\p@\@minus\p@
%<11pt>              \topsep    2\p@ \@plus\p@\@minus\p@
%<12pt>              \topsep    2.5\p@\@plus\p@\@minus\p@
              \parsep    \z@
              \partopsep \p@ \@plus\z@ \@minus\p@
              \itemsep   \topsep}
\def\@listiv {\leftmargin\leftmarginiv
              \labelwidth\leftmarginiv
              \advance\labelwidth-\labelsep}
\def\@listv  {\leftmargin\leftmarginv
              \labelwidth\leftmarginv
              \advance\labelwidth-\labelsep}
\def\@listvi {\leftmargin\leftmarginvi
              \labelwidth\leftmarginvi
              \advance\labelwidth-\labelsep}
%</10pt|11pt|12pt>
%    \end{macrocode}
% \end{macro}^^A \@listi … \@listvi
% \end{ilength}^^A \@fptop … \@dblfpbot
% \end{length}^^A \footnotesep … \partopsep
%
% \begin{command}{\changefontsizes}
% \changes{v2.96}{2006/08/11}{added}
% \changes{v3.08b}{2011/02/22}{three \cs{def} replaced by \cs{edef}}
% \changes{v3.17}{2015/02/23}{define if undefined only}
% \changes{v3.17}{2015/02/23}{indirect definition for Falk}
% \begin{macro}{\simple@changefontsizes}
% \changes{v3.17}{2015/02/23}{added}
% \changes{v3.17}{2015/03/25}{\cs{par@updaterelative} added}
% Fallback calculation of font size settings relative to known 10\,pt values:
% \begin{quote}
%   \cs{changefontsizes}\oarg{baseline skip}\marg{font size}
% \end{quote}
% If the \meta{baseline skip} is given, it is used as \len{baselineskip} for
% \cs{normalsize} and all other baseline skips are relative to it. If it is
% not give, it is also calculated.
% \begin{macro}{\scr@setlength}
% \changes{v3.12}{2013/10/08}{added}
% Command
% \begin{quote}
%   \cs{scr@setlength}\marg{\LaTeX length}\marg{base dimension}\marg{plus
%   dimension}\marg{minus dimension}
% \end{quote}
% sets \meta{\LaTeX length} to \meta{base dimension} \texttt{plus} \meta{plus
% dimension} \texttt{minus} \meta{minus dimension}. Minimum value for
% \meta{plus dimension} and \meta{minus dimension} is 1\,pt.
%    \begin{macrocode}
%<*body&(class|extend)>
\newcommand*\scr@setlength[4]{%
  \expandafter\ifnum\scr@v@is@lt{3.12}\relax
    \setlength{#1}{#2 \@plus#3 \@minus#4}%
  \else
    \ifdim #2<\ifdim #2=\z@ \z@ \else \p@\fi
      \ifdim #3<\ifdim #3=\z@ \z@ \else \p@\fi
        \ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi
          \setlength{#1}{\p@ \@plus\p@ \@minus\p@}%
        \else
          \setlength{#1}{\p@ \@plus\p@ \@minus#4}%
        \fi
      \else
        \ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi
          \setlength{#1}{\p@ \@plus#3 \@minus\p@}%
        \else
          \setlength{#1}{\p@ \@plus#3 \@minus#4}%
        \fi
      \fi
    \else
      \ifdim #3<\ifdim #3=\z@ \z@ \else \p@\fi
        \ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi
          \setlength{#1}{#2 \@plus\p@ \@minus\p@}%
        \else
          \setlength{#1}{#2 \@plus\p@ \@minus#4}%
        \fi
      \else
        \ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi
          \setlength{#1}{#2 \@plus#3 \@minus\p@}%
        \else
          \setlength{#1}{#2 \@plus#3 \@minus#4}%
        \fi
      \fi
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
% \changes{v3.17}{2015/03/10}{\eTeX{} warning removed}
% \changes{v3.38}{2022/07/30}{define the macros robust as the \file{clo} files
%   from 2021/10/04}
%    \begin{macrocode}
\providecommand*{\simple@changefontsizes}[2][1.2\@tempdima]{%
  \KOMA@kav@removekey{.%
%<class>    \KOMAClassFileName
%<extend>    scrextend.\scr@pkgextension
  }{fontsize}%
  \@defaultunits\@tempdima#2pt\relax\@nnil
  \setlength{\@tempdimc}{\@tempdima}%
  \addtolength{\@tempdimc}{-10\p@}%
  \edef\@ptsize{\strip@pt\@tempdimc}%
  \@defaultunits\@tempdimb#1pt\relax\@nnil
  \setlength{\@tempdimc}{\dimexpr (100\@tempdimb / \@tempdima * \p@)}%
  \edef\@tempb{\the\@tempdimc}%
  \setlength{\@tempdimc}{\@tempdima}%
  \def\@tempa##1##2##3##4##5\@nnil{\def##1{##2.##3##4}}%
  \expandafter\@tempa\expandafter\@tempb\@tempb\@nnil%
%    \end{macrocode}
% Now, \len{@temdimc} is the wanted basic font size in pt. \cs{@tempb} is the
% factor of the baseline skip rounded to two decimals. \len{@tempdima} is also
% the basic font size and \len{@tempdimb} the \len{baselineskip}. But
% \len{@tempdima} and \len{tempdimb} will change in further calculations
% depending on the wanted font size command.
%
% Calculation and definition of \cs{normalsize}:
%    \begin{macrocode}
  \expandafter\ifnum\scr@v@is@lt{3.12}\relax
    \setlength{\abovedisplayskip}{%
      \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}%
    \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}%
    \setlength{\belowdisplayshortskip}{%
      .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}%
  \else
    \scr@setlength{\abovedisplayskip}%
                  {.8333\@tempdimb}{.1667\@tempdimb}{.5\@tempdimb}%
    \scr@setlength{\abovedisplayshortskip}{\z@}{.25\@tempdimb}{\z@}%
    \scr@setlength{\belowdisplayshortskip}%
                  {.5\@tempdimb}{.25\@tempdimb}{.25\@tempdimb}%
  \fi
  \setlength{\belowdisplayskip}{\abovedisplayskip}%
  \edef\reserved@a{%
    \noexpand\@setfontsize\noexpand\normalsize
    {\the\@tempdima}{\the\@tempdimb}%
    \abovedisplayskip \the\abovedisplayskip
    \abovedisplayshortskip \the\abovedisplayshortskip
    \belowdisplayskip \the\belowdisplayskip
    \belowdisplayshortskip \the\belowdisplayshortskip
    \let\noexpand\@listi\noexpand\@listI
  }%
  \let\normalsize\@undefined
  \expandafter\DeclareRobustCommand\expandafter\normalsize\expandafter{\reserved@a}%
%    \end{macrocode}
% Calculation and definition of \cs{small}:
%    \begin{macrocode}
  \setlength{\@tempdima}{0.9125\@tempdimc}%
  \setlength{\@tempdimb}{\@tempb\@tempdima}%
  \expandafter\ifnum\scr@v@is@lt{3.12}\relax
    \setlength{\abovedisplayskip}{%
      \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}%
    \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}%
    \setlength{\belowdisplayshortskip}{%
      .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}%
  \else
    \scr@setlength{\abovedisplayskip}%
                  {.8333\@tempdimb}{.1667\@tempdimb}{.5\@tempdimb}%
    \scr@setlength{\abovedisplayshortskip}{\z@}{.25\@tempdimb}{\z@}%
    \scr@setlength{\belowdisplayshortskip}%
                  {.5\@tempdimb}{.25\@tempdimb}{.25\@tempdimb}%
  \fi
  \setlength{\belowdisplayskip}{\abovedisplayskip}%
  \edef\reserved@a{%
    \noexpand\@setfontsize\noexpand\small
    {\the\@tempdima}{\the\@tempdimb}%
    \abovedisplayskip \the\abovedisplayskip
    \abovedisplayshortskip \the\abovedisplayshortskip
    \belowdisplayskip \the\belowdisplayskip
    \belowdisplayshortskip \the\belowdisplayshortskip
    \let\noexpand\@listi\noexpand\@listi@small
  }%
  \let\small\@undefined
  \expandafter\DeclareRobustCommand\expandafter\small\expandafter{\reserved@a}%
%    \end{macrocode}
% Calculation and definition of \cs{footnotesize}:
%    \begin{macrocode}
  \setlength{\@tempdima}{.83334\@tempdimc}%
  \setlength{\@tempdimb}{\@tempb\@tempdima}%
  \expandafter\ifnum\scr@v@is@lt{3.12}\relax
    \setlength{\abovedisplayskip}{%
      \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}%
    \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}%
    \setlength{\belowdisplayshortskip}{%
      .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}%
  \else
    \scr@setlength{\abovedisplayskip}%
                  {.8333\@tempdimb}{.1667\@tempdimb}{.5\@tempdimb}%
    \scr@setlength{\abovedisplayshortskip}{\z@}{.25\@tempdimb}{\z@}%
    \scr@setlength{\belowdisplayshortskip}%
                  {.5\@tempdimb}{.25\@tempdimb}{.25\@tempdimb}%
  \fi
  \setlength{\belowdisplayskip}{\abovedisplayskip}%
  \edef\reserved@a{%
    \noexpand\@setfontsize\noexpand\footnotesize
    {\the\@tempdima}{\the\@tempdimb}%
    \abovedisplayskip \the\abovedisplayskip
    \abovedisplayshortskip \the\abovedisplayshortskip
    \belowdisplayskip \the\belowdisplayskip
    \belowdisplayshortskip \the\belowdisplayshortskip
    \let\noexpand\@listi\noexpand\@listi@footnotesize
  }%
  \let\footnotesize\@undefined
  \expandafter\DeclareRobustCommand\expandafter\footnotesize\expandafter{\reserved@a}%
%    \end{macrocode}
% Calculation and definition of \cs{scriptsize}:
%    \begin{macrocode}
  \setlength{\@tempdima}{.66667\@tempdimc}%
  \setlength{\@tempdimb}{\@tempb\@tempdima}%
  \edef\reserved@a{%
    \noexpand\@setfontsize\noexpand\scriptsize
    {\the\@tempdima}{\the\@tempdimb}%
  }%
  \let\scriptsize\@undefined
  \expandafter\DeclareRobustCommand\expandafter\scriptsize\expandafter{\reserved@a}%
%    \end{macrocode}
% Calculation and definition of \cs{tiny}:
%    \begin{macrocode}
  \setlength{\@tempdima}{.5\@tempdimc}%
  \setlength{\@tempdimb}{\@tempb\@tempdima}%
  \edef\reserved@a{%
    \noexpand\@setfontsize\noexpand\tiny
    {\the\@tempdima}{\the\@tempdimb}%
  }%
  \let\tiny\@undefined
  \expandafter\DeclareRobustCommand\expandafter\tiny\expandafter{\reserved@a}%
%    \end{macrocode}
% Calculation and definition of \cs{large}:
%    \begin{macrocode}
  \setlength{\@tempdima}{1.2\@tempdimc}%
  \setlength{\@tempdimb}{\@tempb\@tempdima}%
  \edef\reserved@a{%
    \noexpand\@setfontsize\noexpand\large
    {\the\@tempdima}{\the\@tempdimb}%
  }%
  \let\large\@undefined
  \expandafter\DeclareRobustCommand\expandafter\large\expandafter{\reserved@a}%
%    \end{macrocode}
% Calculation and definition of \cs{Large}:
%    \begin{macrocode}
  \setlength{\@tempdima}{1.44\@tempdimc}%
  \setlength{\@tempdimb}{\@tempb\@tempdima}%
  \edef\reserved@a{%
    \noexpand\@setfontsize\noexpand\Large
    {\the\@tempdima}{\the\@tempdimb}%
  }%
  \let\Large\@undefined
  \expandafter\DeclareRobustCommand\expandafter\Large\expandafter{\reserved@a}%
%    \end{macrocode}
% Calculation and definition of \cs{LARGE}:
%    \begin{macrocode}
  \setlength{\@tempdima}{1.728\@tempdimc}%
  \setlength{\@tempdimb}{\@tempb\@tempdima}%
  \edef\reserved@a{%
    \noexpand\@setfontsize\noexpand\LARGE
    {\the\@tempdima}{\the\@tempdimb}%
  }%
  \let\LARGE\@undefined
  \expandafter\DeclareRobustCommand\expandafter\LARGE\expandafter{\reserved@a}%
%    \end{macrocode}
% Calculation and definition of \cs{huge}:
%    \begin{macrocode}
  \setlength{\@tempdima}{2.074\@tempdimc}%
  \setlength{\@tempdimb}{\@tempb\@tempdima}%
  \edef\reserved@a{%
    \noexpand\@setfontsize\noexpand\huge
    {\the\@tempdima}{\the\@tempdimb}%
  }%
  \let\huge\@undefined
  \expandafter\DeclareRobustCommand\expandafter\huge\expandafter{\reserved@a}%
%    \end{macrocode}
% Calculation and definition of \cs{Huge}:
%    \begin{macrocode}
  \setlength{\@tempdima}{2.488\@tempdimc}%
  \setlength{\@tempdimb}{\@tempb\@tempdima}%
  \edef\reserved@a{%
    \noexpand\@setfontsize\noexpand\Huge
    {\the\@tempdima}{\the\@tempdimb}%
  }%
  \let\Huge\@undefined
  \expandafter\DeclareRobustCommand\expandafter\Huge\expandafter{\reserved@a}%
%    \end{macrocode}
% Activation of \cs{normalsize} and calculation of additional font size
% depending sized.
%    \begin{macrocode}
  \normalsize
%<!extend>  \expandafter\ifnum\scr@v@is@ge{3.17}\@nameuse{par@updaterelative}\fi
%    \end{macrocode}
% After the activation of \cs{normalsize} above, we can use \cs{f@size} and
% \cs{f@baselineskip}. We cannot use \cs{baselineskip}, because this would be
% influenced by \cs{baselinestretch}.
%    \begin{macrocode}
  \expandafter\ifnum\scr@v@is@lt{3.12}\relax
    \setlength{\footnotesep}{.7\@tempdimc}%
    \setlength{\skip\footins}{.9\@tempdimc \@plus .3333\@tempdimc \@minus
      .6\@tempdimc}%
    \setlength{\floatsep}{\@tempdimc \@plus .1667\@tempdimc \@minus
      .3333\@tempdimc}%
    \setlength{\textfloatsep}{1.6667\@tempdimc \@plus .1667\@tempdimc \@minus
      .3333\@tempdimc}%
    \setlength{\intextsep}{\@tempb\@tempdimc \@plus .3333\@tempdimc \@minus
      .3333\@tempdimc}%
    \setlength{\dblfloatsep}{\@tempb\@tempdimc \@plus .1667\@tempdimc \@minus
      .3333\@tempdimc}%
    \setlength{\dbltextfloatsep}{\textfloatsep}%
    \setlength{\@fptop}{0\p@ \@plus 1fil}%
    \setlength{\@fpsep}{.8333\@tempdimc \@plus 2fil}%
    \setlength{\@fpbot}{\@fptop}%
    \setlength{\@dblfptop}{0\p@ \@plus 1fil}%
    \setlength{\@dblfpsep}{.8333\@tempdimc \@plus 2fil}%
    \setlength{\@dblfpbot}{\@fptop}%
  \fi
%    \end{macrocode}
% Calculation and definition of \cs{@listi} and \cs{@listI}:
%    \begin{macrocode}
  \expandafter\ifnum\scr@v@is@lt{3.12}\relax
    \setlength{\topsep}{.8333\@tempdimc \@plus .3333\@tempdimc \@minus
      .5\@tempdimc}%
    \setlength{\parsep}{.4167\@tempdimc \@plus .2083\@tempdimc \@minus \p@}%
  \else
    \setlength{\@tempdimb}{\f@baselineskip}%
    \scr@setlength{\parsep}%
                  {.3333\@tempdimb}{.1667\@tempdimb}{.0833\@tempdimb}%
    \scr@setlength{\topsep}%
                  {.6667\@tempdimb}{.1667\@tempdimb}{.3333\@tempdimb}%
  \fi
  \@tempswafalse
  \begingroup
    \def\@list@extra{\aftergroup\@tempswatrue}%
    \csname @listi\endcsname
  \endgroup
  \edef\@listi{\leftmargin\leftmargini
    \topsep \the\topsep
    \parsep \the\parsep
    \itemsep \parsep
    \if@tempswa\noexpand\@list@extra\fi
  }%
  \let\@listI\@listi
%    \end{macrocode}
% Calculation and definition of \cs{@listi@small}:
%    \begin{macrocode}
  \expandafter\ifnum\scr@v@is@lt{3.12}\relax
    \setlength{\topsep}{.75\@tempdimc \@plus .25\@tempdimc \@minus
      .41667\@tempdimc}%
    \setlength{\parsep}{.375\@tempdimc \@plus .16667\@tempdimc \@minus \p@}%
  \else
    \scr@setlength{\parsep}%
                  {.1667\@tempdimb}{.0833\@tempdimb}{.0833\@tempdimb}%
    \scr@setlength{\topsep}%
                  {.3333\@tempdimb}{.1667\@tempdimb}{.1667\@tempdimb}%
  \fi
  \@tempswafalse
  \begingroup
    \def\@list@extra{\aftergroup\@tempswatrue}%
    \csname @listi\endcsname
  \endgroup
  \edef\@listi@small{\leftmargin\leftmargini
    \topsep \the\topsep
    \parsep \the\parsep
    \itemsep \parsep
    \if@tempswa\noexpand\@list@extra\fi
  }%
%    \end{macrocode}
% Calculation and definition of \cs{@listi@footnotesize}:
%    \begin{macrocode}
  \expandafter\ifnum\scr@v@is@lt{3.12}\relax
    \setlength{\topsep}{.5\@tempdimc \@plus .16667\@tempdimc \@minus
      .16667\@tempdimc}%
    \setlength{\parsep}{.25\@tempdimc \@plus .16667\@tempdimc \@minus \p@}%
  \else
    \scr@setlength{\parsep}%
                  {.125\@tempdimb}{.0625\@tempdimb}{.0625\@tempdimb}%
    \scr@setlength{\topsep}%
                  {.25\@tempdimb}{.125\@tempdimb}{.125\@tempdimb}%
  \fi
  \@tempswafalse
  \begingroup
    \def\@list@extra{\aftergroup\@tempswatrue}%
    \csname @listi\endcsname
  \endgroup
  \edef\@listi@footnotesize{\leftmargin\leftmargini
    \topsep \the\topsep
    \parsep \the\parsep
    \itemsep \parsep
    \if@tempswa\noexpand\@list@extra\fi
  }%
%    \end{macrocode}
% Calculation and definition of \cs{@listii}:
%    \begin{macrocode}
  \expandafter\ifnum\scr@v@is@lt{3.12}\relax
    \setlength{\topsep}{.4167\@tempdimc \@plus .2083\@tempdimc \@minus \p@}%
    \setlength{\parsep}{.2083\@tempdimc \@plus \p@ \@minus \p@}%
  \else
    \scr@setlength{\parsep}%
                  {.1667\@tempdimb}{.0833\@tempdimb}{.0833\@tempdimb}%
    \scr@setlength{\topsep}%
                  {.3333\@tempdimb}{.1667\@tempdimb}{.0833\@tempdimb}%
  \fi
  \@tempswafalse
  \begingroup
    \def\@list@extra{\aftergroup\@tempswatrue}%
    \csname @listii\endcsname
  \endgroup
  \edef\@listii{\leftmargin\leftmarginii
    \labelwidth=\dimexpr \leftmargin-\labelsep
    \topsep \the\topsep
    \parsep \the\parsep
    \itemsep \parsep
    \if@tempswa\noexpand\@list@extra\fi
  }%
%    \end{macrocode}
% Calculation and definition of \cs{@listiii}:
%    \begin{macrocode}
  \expandafter\ifnum\scr@v@is@lt{3.12}\relax
    \setlength{\topsep}{.2083\@tempdimc \@plus \p@ \@minus \p@}%
  \else
    \scr@setlength{\topsep}%
                  {.1667\@tempdimb}{.0833\@tempdimb}{.0833\@tempdimb}%
  \fi
  \setlength{\partopsep}{\z@ \@plus\z@ \@minus\p@}%
  \@tempswafalse
  \begingroup
    \def\@list@extra{\aftergroup\@tempswatrue}%
    \csname @listiii\endcsname
  \endgroup
  \edef\@listiii{\leftmargin\leftmarginiii
    \labelwidth=\dimexpr \leftmargin-\labelsep
    \topsep \the\topsep
    \parsep \z@
    \partopsep \the\partopsep
    \itemsep \topsep
    \if@tempswa\noexpand\@list@extra\fi
  }%
%    \end{macrocode}
% Calculation and definition of \cs{@listiv}:
%    \begin{macrocode}
  \@tempswafalse
  \begingroup
    \def\@list@extra{\aftergroup\@tempswatrue}%
    \csname @listiv\endcsname
  \endgroup
  \edef\@listiv{\leftmargin\leftmarginiv
    \labelwidth=\dimexpr \leftmargin-\labelsep\relax
    \if@tempswa\noexpand\@list@extra\fi
  }%
%    \end{macrocode}
% Calculation and definition of \cs{@listv}:
%    \begin{macrocode}
  \@tempswafalse
  \begingroup
    \def\@list@extra{\aftergroup\@tempswatrue}%
    \csname @listv\endcsname
  \endgroup
  \edef\@listv{\leftmargin\leftmarginv
    \labelwidth=\dimexpr \leftmargin-\labelsep\relax
    \if@tempswa\noexpand\@list@extra\fi
  }%
%    \end{macrocode}
% Calculation and definition of \cs{@listvi}:
%    \begin{macrocode}
  \@tempswafalse
  \begingroup
    \def\@list@extra{\aftergroup\@tempswatrue}%
    \csname @listvi\endcsname
  \endgroup
  \edef\@listvi{\leftmargin\leftmarginvi
    \labelwidth=\dimexpr \leftmargin-\labelsep\relax
    \if@tempswa\noexpand\@list@extra\fi
  }%
  \@listi
%    \end{macrocode}
% \changes{v2.97c}{2007/07/04}{setting \cs{intextsep}}
% \changes{v2.97c}{2007/07/04}{setting \cs{dblfloatsep}}
% \changes{v2.97c}{2007/07/04}{setting \cs{partopsep}}
% \changes{v3.12}{2013/10/08}{calculation of some lengths changed}
% Calculation and setting of \len{intextsep}, \len{dblfloatsep},
% \len{partopsep}, \len{footnotesep}, \cs{skip}\len{footins}, \len{footsep},
% \len{textfloatsep}, \len{@fptop}, \len{@fpsep}, \len{@fpbot},
% \len{@dblfptop}, \len{@dblfpsep}, \len{@dblfpbot}. Setting of \len{topsep}
% and \len{parsep} is not needed because part of \cs{@listi}.
%    \begin{macrocode}
  \expandafter\ifnum\scr@v@is@lt{3.12}\relax
    \setlength{\@tempdimb}{\@tempb\@tempdima}%
    \setlength{\@tempdima}{\dimexpr \@tempdimb-\@tempdimc}%
    \setlength\intextsep{\@tempdimb \@plus.2\@tempdima \@minus.2\@tempdima}%
    \setlength\dblfloatsep\intextsep
    \setlength\partopsep{.2\@tempdimc \@plus.1\@tempdimc \@minus.1\@tempdimc}%
  \else
    \setlength{\@tempdimb}{\f@baselineskip}%
    \setlength{\footnotesep}{.555\@tempdimb}%
    \scr@setlength{\skip\footins}%
                  {.75\@tempdimb}{.3333\@tempdimb}{.1667\@tempdimb}%
    \scr@setlength{\floatsep}%
                  {\@tempdimb}{.1667\@tempdimb}{.1667\@tempdimb}%
    \scr@setlength{\textfloatsep}%
                  {1.6667\@tempdimb}{.1667\@tempdimb}{.3333\@tempdimb}%
    \setlength{\intextsep}{\floatsep}%
    \setlength{\dblfloatsep}{\floatsep}%
    \setlength{\dbltextfloatsep}{\textfloatsep}%
    \setlength{\@fptop}{\z@ \@plus 1fil}%
    \setlength{\@fpsep}{.6667\@tempdimb \@plus 2fil}%
    \setlength{\@fpbot}{\@fptop}%
    \setlength{\@dblfptop}{\@fptop}%
    \setlength{\@dblfpsep}{\@fpsep}%
    \setlength{\@dblfpbot}{\@fptop}%
    \scr@setlength{\partopsep}{.2\@tempdimb}{.1\@tempdimb}{.1\@tempdimb}%
  \fi
}
\scr@ifundefinedorrelax{changefontsizes}{%
  \let\changefontsizes\simple@changefontsizes
}{%
%<class>  \ClassWarning{\KOMAClassName}{%
%<package&extend>  \PackageWarning{scrextend}{%
    \string\changefontsizes\space already defined.\MessageBreak
    I hope, the definition is compatible,\MessageBreak
    because I do not change it%
  }%
}
%</body&(class|extend)>
%    \end{macrocode}
% \end{macro}^^A \simple@changefontsizes
% \end{command}^^A \changefontsizes
%
%
% \begin{command}{\generatefontfile}
% \changes{v3.09}{2011/02/23}{added}
% \changes{v3.17}{2015/03/26}{\cs{par@updaterelative} added}
% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}}
% The main command of the generator:
% \begin{quote}
%   \cs{generatefontfile}\marg{base name}\oarg{baseline skip}\marg{font size}
% \end{quote}
% It writes a font size file ``\meta{base name}\meta{font
% size}.clo''. \meta{base name} ``\texttt{scrbase}'' is protected and results
% in an error message.
%    \begin{macrocode}
%<*generator&body>
\newcommand*{\generatefontfile}[1]{%
  \Ifstr{#1}{scrsize}{%
    \ClassError{\KOMAClassName}{%
      Font file name `scrsize' not allowed%
    }{%
      Font files with name `scrsize<fontsize>.clo' are reserved for
      KOMA-Script.\MessageBreak
      You should use another prefix and rename \string\@fontsizefilebase\space
      either before\MessageBreak
      loading a KOMA-Script class using one of \string\documentclass,
      \string\LoadClass,\MessageBreak
      or \string\LoadClassWithOptions\space or before loading package
      `scrextend' using another\MessageBreak
      class.}%
    \@@@generatefontfile
  }{%
%    \end{macrocode}
% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
% Test for optional argument and use proper helper.
%    \begin{macrocode}
    \kernel@ifnextchar [{\@generatefontfile{#1}}{\@@generatefontfile{#1}}%
  }%
}
%    \end{macrocode}
% \begin{macro}{\@generatefontfile,\@@generatefontfile}
% \changes{v3.09}{2011/02/23}{added}
% The helper macros are needed, because we are not using \pkg{xparse} currently.
%    \begin{macrocode}
\newcommand*{\@generatefontfile}{}
\def\@generatefontfile#1[#2]#3{%
  \begingroup
    \@ifundefined{setparsizes}{\setlength{\parskip}{0pt}}%
                              {\setparsizes{0pt}{0pt}{0pt}}%
    \changefontsizes[{#2}]{#3}%
    \generate@fontfile{#1}{#3}%
  \endgroup
}
\newcommand\@@generatefontfile[2]{%
  \begingroup
    \@ifundefined{setparsizes}{\setlength{\parskip}{0pt}}%
                              {\setparsizes{0pt}{0pt}{0pt}}%
    \changefontsizes{#2}%
    \generate@fontfile{#1}{#2}%
  \endgroup
}
%    \end{macrocode}
% \end{macro}^^A \@generatefontfile,\@@generatefontfile
% \begin{macro}{\@@@generatefontfile}
% \changes{v3.09}{2011/02/23}{added}
% Dummy used in error case to eat an optional and a mandatory argument.
%    \begin{macrocode}
\newcommand*{\@@@generatefontfile}[2][]{}
%    \end{macrocode}
% \end{macro}^^A \@@@generatefontfile
% \begin{macro}{\@fontfile}
% \changes{v3.09}{2011/02/23}{added}
% Because \cs{generatefontfile} is allowed in the document preamble only, when
% the main aux file is not yet opened, we can use \cs{@mainaux} as temporary
% file handle.
%    \begin{macrocode}
\newcommand*{\@fontfile}{}
\let\@fontfile\@mainaux
%    \end{macrocode}
% \begin{macro}{\generate@fontfile}
% \changes{v3.09}{2011/02/23}{added}
% \changes{v3.16a}{2015/02/11}{\cs{footnotesize} fixed}
% \changes{v3.38}{2022/07/30}{define the macros robust as the \file{clo} files
%   from 2021/10/04}
% Output of the font size file using the current font setting. It has to be
% used inside a local group!
%    \begin{macrocode}
\newcommand*{\generate@fontfile}[2]{%
  \def\@ind{\space\space}%
  \immediate\openout\@fontfile #1#2.clo
  \immediate\write\@fontfile{\@percentchar^^J%
    \@percentchar\space This is file `#1#2.clo', generated with^^J%
    \@percentchar\space scrfontsizes
    \csname ver@scrfontsizes.\scr@pkgextension\endcsname,^^J%
    \@percentchar\space Copyright (c) Markus Kohm.^^J%
    \@percentchar^^J%
    \string\ProvidesFile{#1#2.clo}[%
    \the\year/\ifnum\month<10 0\fi\the\month/\ifnum\day<10 0\fi\the\day%
    \space generated font size class option (#2)]}%
  \immediate\write\@fontfile{%
    \string\let\string\normalsize\string\@undefined
    \string\DeclareRobustCommand\string\normalsize{\@percentchar^^J%
      \@ind\string\@setfontsize\string\normalsize{\f@size}{\f@baselineskip}%
      \@percentchar^^J%
      \@ind\string\abovedisplayskip\space \the\abovedisplayskip^^J%
      \@ind\string\abovedisplayshortskip\space \the\abovedisplayshortskip^^J%
      \@ind\string\belowdisplayskip\space \the\belowdisplayskip^^J%
      \@ind\string\belowdisplayshortskip\space \the\belowdisplayshortskip^^J%
      \@ind\string\let\string\@listi\string\@listI^^J%
    }\@percentchar%
  }%
  \begingroup\small\@listi
    \immediate\write\@fontfile{%
      \string\let\string\small\string\@undefined
      \string\DeclareRobustCommand\string\small{\@percentchar^^J%
        \@ind\string\@setfontsize\string\small{\f@size}{\f@baselineskip}%
        \@percentchar^^J%
        \@ind\string\abovedisplayskip\space \the\abovedisplayskip^^J%
        \@ind\string\abovedisplayshortskip\space \the\abovedisplayshortskip^^J%
        \@ind\string\belowdisplayskip\space \the\belowdisplayskip^^J%
        \@ind\string\belowdisplayshortskip\space \the\belowdisplayshortskip^^J%
        \@ind\string\def\string\@listi{\@percentchar^^J%
          \@ind\@ind\string\leftmargin\string\leftmargini^^J%
          \@ind\@ind\string\topsep \the\topsep^^J%
          \@ind\@ind\string\parsep \the\parsep^^J%
          \@ind\@ind\string\itemsep \string\parsep^^J%
        \@ind}\@percentchar^^J%
      }\@percentchar%
    }%
  \endgroup
  \begingroup\footnotesize\@listi
    \immediate\write\@fontfile{%
      \string\let\string\footnotesize\string\@undefined
      \string\DeclareRobustCommand\string\footnotesize{\@percentchar^^J%
        \@ind\string\@setfontsize\string\footnotesize{\f@size}{\f@baselineskip}%
        \@percentchar^^J%
        \@ind\string\abovedisplayskip\space \the\abovedisplayskip^^J%
        \@ind\string\abovedisplayshortskip\space \the\abovedisplayshortskip^^J%
        \@ind\string\belowdisplayskip\space \the\belowdisplayskip^^J%
        \@ind\string\belowdisplayshortskip\space \the\belowdisplayshortskip^^J%
        \@ind\string\def\string\@listi{\@percentchar^^J%
          \@ind\@ind\string\leftmargin\string\leftmargini^^J%
          \@ind\@ind\string\topsep \the\topsep^^J%
          \@ind\@ind\string\parsep \the\parsep^^J%
          \@ind\@ind\string\itemsep \string\parsep^^J%
        \@ind}\@percentchar^^J%
      }\@percentchar%
    }%
  \endgroup
  \begingroup\scriptsize
    \immediate\write\@fontfile{%
      \string\let\string\scriptsize\string\@undefined
      \string\DeclareRobustCommand\string\scriptsize{%
        \string\@setfontsize\string\scriptsize{\f@size}{\f@baselineskip}%
      }\@percentchar%
    }%
  \endgroup
  \begingroup\tiny
    \immediate\write\@fontfile{%
      \string\let\string\tiny\string\@undefined
      \string\DeclareRobustCommand\string\tiny{%
        \string\@setfontsize\string\tiny{\f@size}{\f@baselineskip}%
      }\@percentchar%
    }%
  \endgroup
  \begingroup\large
    \immediate\write\@fontfile{%
      \string\let\string\large\string\@undefined
      \string\DeclareRobustCommand\string\large{%
        \string\@setfontsize\string\large{\f@size}{\f@baselineskip}%
      }\@percentchar%
    }%
  \endgroup
  \begingroup\Large
    \immediate\write\@fontfile{%
      \string\let\string\Large\@undefined
      \string\DeclareRobustCommand\string\Large{%
        \string\@setfontsize\string\Large{\f@size}{\f@baselineskip}%
      }\@percentchar%
    }%
  \endgroup
  \begingroup\LARGE
    \immediate\write\@fontfile{%
      \string\let\string\LARGE\@undefined
      \string\DeclareRobustCommand\string\LARGE{%
        \string\@setfontsize\string\LARGE{\f@size}{\f@baselineskip}%
      }\@percentchar%
    }%
  \endgroup
  \begingroup\huge
    \immediate\write\@fontfile{%
      \string\let\string\huge\@undefined
      \string\DeclareRobustCommand\string\huge{%
        \string\@setfontsize\string\huge{\f@size}{\f@baselineskip}%
      }\@percentchar%
    }%
  \endgroup
  \begingroup\Huge
    \immediate\write\@fontfile{%
      \string\let\string\Huge\@undefined
      \string\DeclareRobustCommand\string\Huge{%
        \string\@setfontsize\string\Huge{\f@size}{\f@baselineskip}%
      }\@percentchar%
    }%
  \endgroup
  \immediate\write\@fontfile{\string\normalsize}%
  \immediate\write\@fontfile{%
    \string\setlength{\string\footnotesep}{\the\footnotesep}\@percentchar
  }%
  \immediate\write\@fontfile{%
    \string\setlength{\string\skip\string\footins}{\the\skip\footins}\@percentchar
  }%
  \immediate\write\@fontfile{%
    \string\setlength{\string\floatsep}{\the\floatsep}\@percentchar
  }%
  \immediate\write\@fontfile{%
    \string\setlength{\string\textfloatsep}{\the\textfloatsep}\@percentchar
  }%
  \immediate\write\@fontfile{%
    \string\setlength{\string\intextsep}{\the\intextsep}\@percentchar
  }%
  \immediate\write\@fontfile{%
    \string\setlength{\string\dblfloatsep}{\the\dblfloatsep}\@percentchar
  }%
  \immediate\write\@fontfile{%
    \string\setlength{\string\dbltextfloatsep}{\the\dbltextfloatsep}\@percentchar
  }%
  \immediate\write\@fontfile{%
    \string\setlength{\string\@fptop}{\the\@fptop}\@percentchar
  }%
  \immediate\write\@fontfile{%
    \string\setlength{\string\@fpsep}{\the\@fpsep}\@percentchar
  }%
  \immediate\write\@fontfile{%
    \string\setlength{\string\@fpbot}{\the\@fpbot}\@percentchar
  }%
  \immediate\write\@fontfile{%
    \string\setlength{\string\@dblfptop}{\the\@dblfptop}\@percentchar
  }%
  \immediate\write\@fontfile{%
    \string\setlength{\string\@dblfpsep}{\the\@dblfpsep}\@percentchar
  }%
  \immediate\write\@fontfile{%
    \string\setlength{\string\@dblfpbot}{\the\@dblfpbot}\@percentchar
  }%
  \immediate\write\@fontfile{%
    \string\setlength{\string\partopsep}{\the\partopsep}\@percentchar
  }%
  \begingroup
    \@listi
    \immediate\write\@fontfile{%
      \string\def\string\@listi{\@percentchar^^J%
        \@ind\string\leftmargin\string\leftmargini^^J%
        \@ind\string\topsep \the\topsep^^J%
        \@ind\string\parsep \the\parsep^^J%
        \@ind\string\itemsep \string\parsep^^J%
      }\@percentchar
    }%
  \endgroup
  \immediate\write\@fontfile{%
    \string\let\string\@listI\string\@listi
  }%
  \begingroup
    \@listii
    \immediate\write\@fontfile{%
      \string\def\string\@listii{\@percentchar^^J%
        \@ind\string\leftmargin\string\leftmarginii^^J%
        \@ind\string\labelwidth\string\leftmarginii^^J%
        \@ind\string\advance\string\labelwidth-\string\labelsep^^J%
        \@ind\string\topsep \the\topsep^^J%
        \@ind\string\parsep \the\parsep^^J%
        \@ind\string\itemsep \string\parsep^^J%
      }\@percentchar
    }%
  \endgroup
  \begingroup
    \@listiii
    \immediate\write\@fontfile{%
      \string\def\string\@listiii{\@percentchar^^J%
        \@ind\string\leftmargin\string\leftmarginiii^^J%
        \@ind\string\labelwidth\string\leftmarginiii^^J%
        \@ind\string\advance\string\labelwidth-\string\labelsep^^J%
        \@ind\string\topsep \the\topsep^^J%
        \@ind\string\parsep \the\parsep^^J%
        \@ind\string\partopsep \the\partopsep^^J%
       \@ind\string\itemsep \string\topsep^^J%
      }\@percentchar
    }%
  \endgroup
  \begingroup
    \@listiv
    \immediate\write\@fontfile{%
      \string\def\string\@listiv{\@percentchar^^J%
        \@ind\string\leftmargin\string\leftmarginiv^^J%
        \@ind\string\labelwidth\string\leftmarginiv^^J%
        \@ind\string\advance\string\labelwidth-\string\labelsep^^J%
      }\@percentchar
    }%
  \endgroup
  \begingroup
    \@listv
    \immediate\write\@fontfile{%
      \string\def\string\@listv{\@percentchar^^J%
        \@ind\string\leftmargin\string\leftmarginv^^J%
        \@ind\string\labelwidth\string\leftmarginv^^J%
        \@ind\string\advance\string\labelwidth-\string\labelsep^^J%
      }\@percentchar
    }%
  \endgroup
  \begingroup
    \@listvi
    \immediate\write\@fontfile{%
      \string\def\string\@listvi{\@percentchar^^J%
        \@ind\string\leftmargin\string\leftmarginvi^^J%
        \@ind\string\labelwidth\string\leftmarginvi^^J%
        \@ind\string\advance\string\labelwidth-\string\labelsep^^J%
      }\@percentchar
    }%
  \endgroup
  \immediate\write\@fontfile{%
    \string\@ifundefined{@list@extra}{}{\@percentchar^^J%
      \string\expandafter\string\ifnum\string\scr@v@is@ge{3.17}%
        \string\par@updaterelative\string\fi^^J%
      \@ind\string\l@addto@macro{\string\@listi}{\string\@list@extra}%
      \@percentchar^^J%
      \@ind\string\let\string\@listI=\string\@listi^^J%
      \@ind\string\l@addto@macro{\string\@listii}{\string\@list@extra}%
      \@percentchar^^J%
      \@ind\string\l@addto@macro{\string\@listiii}{\string\@list@extra}%
      \@percentchar^^J%
      \@ind\string\l@addto@macro{\string\footnotesize}{\string\protect
        \string\add@extra@listi{ftns}}\@percentchar^^J%
      \@ind\string\l@addto@macro{\string\small}{\string\protect
        \string\add@extra@listi{sml}}\@percentchar^^J%
    }\@percentchar^^J%
    \string\@listi^^J%
    \string\endinput^^J%
    \@percentchar^^J%
    \@percentchar\space End of file `#1#2.clo'.
  }
  \immediate\closeout\@fontfile
}
\@onlypreamble\generatefontfile
%</generator&body>
%    \end{macrocode}
% \end{macro}^^A \generate@fontfile
% \end{macro}^^A \@fontfile
% \end{command}^^A \generatefontfile
%
% Now, we want to initially load the font size file into the class. First we
% have to convert the \cs{@ptsize} to a length. Note, \cs{@ptsize} can already
% have a unit or the unit is \texttt{pt}. The original value is stored in
% \cs{@tempa} to be able to use a font size files with the original
% unit. \cs{@tempb} is the size in \texttt{pt} without the \texttt{pt} to be
% able to use a standard font size file. After this, \cs{@ptsize} is reduced
% by 10\,pt and the unit is cut off.
%    \begin{macrocode}
%<*class&body>
\expandafter\@defaultunits\expandafter\@tempdima\@ptsize pt\relax\@nnil
\edef\@tempa{\@ptsize}%
\setlength{\@tempdimb}{\@tempdima}%
\edef\@tempb{\strip@pt\@tempdimb}%
\addtolength{\@tempdimb}{-10\p@}%
\edef\@ptsize{\strip@pt\@tempdimb}%
%    \end{macrocode}
% Now, let's try to input a file
% ``\file{\cs{fontsizefilebase}\cs{@tempa}.clo}''. This is a file with the
% original unit.
%    \begin{macrocode}
\InputIfFileExists{\@fontsizefilebase\@tempa.clo}{%
  \ClassInfo{\KOMAClassName}{%
    File `\@fontsizefilebase\@tempa.clo' used to setup font sizes}%
  \KOMA@kav@removekey{.\KOMAClassFileName}{fontsize}%
  \KOMA@kav@xadd{.\KOMAClassFileName}{fontsize}{\@tempa}%
}{%
%    \end{macrocode}
% If this is not successful, try
% ``\file{\cs{fontsizefilebase}\cs{@tempb}pt.clo}''.
%    \begin{macrocode}
  \InputIfFileExists{\@fontsizefilebase\@tempb pt.clo}{%
    \ClassInfo{\KOMAClassName}{%
      File `\@fontsizefilebase\@tempb pt.clo' used instead of\MessageBreak
      file `\@fontsizefilebase\@tempa.clo' to setup font sizes}%
    \KOMA@kav@removekey{.\KOMAClassFileName}{fontsize}%
    \KOMA@kav@xadd{.\KOMAClassFileName}{fontsize}{\@tempb pt}%
  }{%
%    \end{macrocode}
% If this is still not successful try a font size file of the standard
% classes.
%    \begin{macrocode}
%<*book>
    \InputIfFileExists{bk\@tempb.clo}{%
      \ClassInfo{\KOMAClassName}{%
        File `bk\@tempb.clo' used to setup font sizes}%
      \KOMA@kav@removekey{.\KOMAClassFileName}{fontsize}%
      \KOMA@kav@xadd{.\KOMAClassFileName}{fontsize}{\@tempb}%
    }{%
%</book>
      \InputIfFileExists{size\@tempb.clo}{%
        \ClassInfo{\KOMAClassName}{%
          File `size\@tempb.clo' used to setup font sizes}%
        \KOMA@kav@removekey{.\KOMAClassFileName}{fontsize}%
        \KOMA@kav@xadd{.\KOMAClassFileName}{fontsize}{\@tempb}%
      }{%
%    \end{macrocode}
% If this is still not successful, use the fallback calculation.
%    \begin{macrocode}
        \edef\@tempa{%
          \noexpand\changefontsizes{\@tempa}%
          \noexpand\KOMA@kav@xadd{.\KOMAClassFileName}{fontsize}{\@tempa}%
        }\@tempa
      }%
%<book>    }%
  }%
}
%</class&body>
%    \end{macrocode}
% 
%
% \subsection{Deprecated old font selection commands}
%
% \begin{option}{enabledeprecatedfontcommands}
% \changes{v3.20}{2015/10/14}{added}
% \changes{v3.20}{2015/10/14}{deprecated}
% This option is deprecated by specification already when it has been defined
% first, because it is used to define deprecated old font selection commands,
% that should not be used any longer. So the usage of this options always
% results in a warning. It can be used at load time only.
% \begin{macro}{\scr@defineobsoletefonts}
% \changes{v3.20}{2015/10/14}{added}
% \changes{v3.20}{2015/10/14}{deprecated}
% Depending on this command
% \begin{itemize}
% \item[0] an internal error message,
% \item[1] a warning,
% \item[2] an info message,
% \item[3] no message
% \end{itemize}
% is added to the usage of any deprecated font command. Values less than 0
% result in not defining the commands anyhow.
%    \begin{macrocode}
%<*class&option>
\DeclareOption{enabledeprecatedfontcommands}{%
  \ClassWarningNoLine{\KOMAClassName}{%
    deprecated option `enabledeprecatedfontcommands'.\MessageBreak
    Note, that this option was already depreacted when\MessageBreak
    it has been defined. Support for old font commands\MessageBreak
    has been removed from KOMA-Script more than one\MessageBreak
    decade ago. It is not recommended to use them any\MessageBreak
    longer. Therefore usage of this class option also\MessageBreak
    is not recommended%
  }%
  \let\scr@defineobsoletefonts\@ne
}
\scr@ifundefinedorrelax{scr@defineobsoletefonts}{%
  \let\scr@defineobsoletefonts\z@
}{}
\BeforePackage{tex4ht}{%
  \let\scr@defineobsoletefonts\thr@@
}
%</class&option>
%    \end{macrocode}
% \end{macro}^^A \scr@degineobsoletefonts
% \end{option}^^A enabledeprecatedfontcommands
%
% \begin{macro}{\scr@DeclareOldFontCommand}
% \changes{v3.12}{2013/10/31}{added}
% \changes{v3.20}{2015/10/14}{deprecated escalation}
% \changes{v3.38}{2022/08/28}{deprecated definition delayed}
% The command is similar to \cs{DeclareOldFontCommand} but adds a warning,
% info, error to the commands and delays the definition until
% |\begin{document}|. The delay is done to allow users or package authors to
% define the commands in the document preamble if they are not yet defined. So
% (package) authors do not need to detect \KOMAScript{} but only existence.
%    \begin{macrocode}
%<*class&body>
\newcommand*{\scr@DeclareOldFontCommand}[3]{%
  \ifnum\scr@defineobsoletefonts<\z@\else
    \ifnum\scr@defineobsoletefonts>\tw@
      \DeclareOldFontCommand{#1}{#2}{#3}%
    \else
      \AtBeginDocument{%
        \ifdefined#1\else
          \DeclareOldFontCommand{#1}{%
            \scr@ErrorWarningInfo{#1}{#2}#2%
          }{%
            \scr@ErrorWarningInfo{#1}{#3}#3%
          }%
        \fi
      }%
    \fi
  \fi
}
%    \end{macrocode}
% \begin{macro}{\scr@ErrorWarningInfo}
% \changes{v3.20}{2015/10/14}{added}
% \changes{v3.22}{2016/09/28}{message fixed}
%    \begin{macrocode}
\DeclareRobustCommand*{\scr@ErrorWarningInfo}[2]{%
%    \end{macrocode}
% \cs{scr@defineobsoletefonts} = 0 means an error message:
%    \begin{macrocode}
  \ifnum \scr@defineobsoletefonts=\z@
    \ClassError{\KOMAClassName}{undefined old font command `\string#1'}{%
      You should note that since 1994 LaTeX2e provides a new font selection
      scheme\MessageBreak
      called NFSS2 with several new, combinable font commands.
      KOMA-Script\MessageBreak
      classes had defined the old font commands like `\string#1'
      only for compatibility\MessageBreak
      with old LaTeX 2.09 document styles of Script 2.0. Nevertheless,
      these\MessageBreak
      commands are deprecated and undocumented at least since 2003. Since
      2013\MessageBreak
      KOMA-Script classes warned about soon removement of these deprecated
      commands.\MessageBreak
      Now, after two decades of LaTeX2e and NFSS2, these commands will not
      work any\MessageBreak
      more. If loading a package results in this error message, you should
      contact\MessageBreak
      the author of that package and ask him to replace the deprecated font
      command\MessageBreak
      `\string#1', e.g., by `\detokenize{#2}`. Otherwise you should
      reconfigure\MessageBreak
      or replace the package. If you have used the old font command
      `\string#1' yourself,\MessageBreak
      you should replace it, e.g., by `\detokenize{#2}'.\MessageBreak
      To make it work for now, you can use the already also deprecated class
      option\MessageBreak
      `enabledeprecatedfontcommands'.%
    }%
  \else
    \ifcase \scr@defineobsoletefonts
%    \end{macrocode}
% \cs{scr@defineobsoletefonts} = 0 means a warning:
%    \begin{macrocode}
    \or
      \expandafter\ClassWarning
%    \end{macrocode}
% \cs{scr@defineobsoletefonts} = 0 means an info message:
%    \begin{macrocode}
    \or
      \expandafter\ClassInfo
%    \end{macrocode}
% All other values mean no message:
%    \begin{macrocode}
    \else
      \expandafter\@gobbletwo
    \fi
    {\KOMAClassName}{deprecated old font command `\string#1' used.\MessageBreak
      You should note, that since 1994 LaTeX2e provides a\MessageBreak
      new font selection scheme called NFSS2 with several\MessageBreak
      new, combinable font commands. New KOMA-Script classes\MessageBreak
      defined the old font commands like `\string#1' only for\MessageBreak
      compatibility with LaTeX 2.09 document styles of\MessageBreak
      Script 2.0. These commands are deprecated and\MessageBreak
      undocumented at least since 2003. Since 2013,\MessageBreak
      KOMA-Script classes warned about soon removement of\MessageBreak
      these deprecated commands. Now, after two decades of\MessageBreak
      LaTeX2e, NFSS2, and KOMA-Script these commands will\MessageBreak
      not work any longer. If loading a package results in\MessageBreak
      this message you should contact the author of that\MessageBreak
      package and ask him to replace the depracted font\MessageBreak
      command `\string#1', e.g., by `\detokenize{#2}'.\MessageBreak
      Otherwise you should reconfigure or replace the\MessageBreak
      package. If you have used the old font command\MessageBreak
      `\string #1' yourself you should replace it, e.g., by\MessageBreak
      `\detokenize{#2}'%
    }%
  \fi
}
%</class&body>
%    \end{macrocode}
% \end{macro}^^A \scr@OldFontErrorWarningInfo
% \end{macro}^^A \scr@DeclareOldFontCommand
%
% \begin{command}{\rm,\sf,\tt,\bf,\it,\sl,\sc}
% \changes{v3.12}{2013/10/13}{deprecated}
% \begin{command}{\sfb}
% \changes{v2.2c}{1995/05/25}{not in math mode}
% \changes{v2.3a}{1995/07/08}{independent from compatibility mode}
% \changes{v3.12}{2013/10/13}{deprecated}
% The old font selection commands from \LaTeX~2.09. They are not supported any
% more. The same for the \pkg*{Script 2.0} command \cs{sfb}.
%    \begin{macrocode}
%<*class&body>
\scr@DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\scr@DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\scr@DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\scr@DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\scr@DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
\scr@DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
\scr@DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
\scr@DeclareOldFontCommand{\sfb}{\normalfont\sffamily\bfseries}{%
  \@nomath\sfb}
%</class&body>
%    \end{macrocode}
% \end{command}
% \end{command}
%
% \begin{command}{\cal,\mit}
% \changes{v2.3}{1995/06/25}{here instead in the \LaTeX{} kernel}
% \changes{v2.3g}{1996/01/14}{not needed braces removed}
%    \begin{macrocode}
%<*class&body>
\DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal}
\DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal}
%</class&body>
%    \end{macrocode}
% \end{command}
%
%
% \subsection{Font elements}
%
%
% \begin{command}{\IfExistskomafont}
% \changes{v3.15}{2014/11/21}{added}
% Command
% \begin{quote}
%   \cs{IfExistskomafont}\marg{font element}\marg{then code}\marg{else code}
% \end{quote}
% executes \meta{then code} if the font element \meta{font element} exists
% either as a real font element or an alias. Otherwise \meta{else code} is used.
%    \begin{macrocode}
%<*scrkbase&body>
\newcommand*{\IfExistskomafont}[1]{%
  \scr@ifundefinedorrelax{scr@fnt@#1}{%
    \scr@ifundefinedorrelax{scr@fnt@instead@#1}{\@secondoftwo}{\@firstoftwo}%
  }{%
    \@firstoftwo
  }%
}
%    \end{macrocode}
% \end{command}^^A \IfExistskomafont
%
% \begin{command}{\IfIsAliaskomafont}
% \changes{v3.25}{2017/12/08}{added}
% Command
% \begin{quote}
%   \cs{IfIsAliaskomafont}\marg{font element}\marg{then code}\marg{else code}
% \end{quote}
% executes \meta{then code} if the font element \meta{font element} is an alias.
% Otherwise \meta{else code} is used.
%    \begin{macrocode}
\newcommand*{\IfIsAliaskomafont}[1]{%
  \scr@ifundefinedorrelax{scr@fnt@#1}{%
    \scr@ifundefinedorrelax{scr@fnt@instead@#1}{\@secondoftwo}{\@firstoftwo}%
  }{%
    \@secondoftwo
  }%
}
%    \end{macrocode}
% \end{command}^^A \IfIsAliaskomafont
%
% \begin{command}{\setkomafont}
% \changes{v2.8o}{2001/09/14}{added}
% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}}
% Command
% \begin{quote}
%   \cs{setkomafont}\marg{element}\marg{font settings}
% \end{quote}
% sets the \meta{font settings} of font element \meta{element}. Setting of an
% unknown font element results in an error. Setting of an alias font element
% results in an info an the setting of the real element. Note: \meta{font
% settings} should be only font selection commands.
%    \begin{macrocode}
\newcommand*{\setkomafont}[2]{%
  \@ifundefined{scr@fnt@#1}{%
    \@ifundefined{scr@fnt@instead@#1}{%
      \PackageError{scrkbase}{%
        font of element `#1' can't be set}{%
        You've told me to redefine the font selection of the
        element,\MessageBreak%
        but either no such element is known by
        KOMA-Script\MessageBreak%
        or the element does not use a special font selection%
      }%
    }{%
      \PackageInfo{scrkbase}{%
        You've told me to redefine the font selection of the\MessageBreak
        element `#1' that is an alias of element\MessageBreak
        `\csname scr@fnt@instead@#1\endcsname'%
      }%
      \expandafter\setkomafont\expandafter{%
        \csname scr@fnt@instead@#1\endcsname}{#2}%
    }%
  }{%
    \expandafter\expandafter\expandafter\def\csname scr@fnt@#1\endcsname{#2}%
  }%
  \@ifundefined{scr@fnt@wrn@#1}{}{%
    \PackageWarning{scrkbase}{%
      \csname scr@fnt@wrn@#1\endcsname{#1}%
    }%
  }%
}
%    \end{macrocode}
% \end{command}^^A \setkomafont
%
% \begin{command}{\addtokomafont}
% \changes{v2.8p}{2001/09/22}{added}
% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}}
% Command
% \begin{quote}
%   \cs{addtokomafont}\marg{element}\marg{font settings}
% \end{quote}
% adds the \meta{font settings} to the settings of font element
% \meta{element}. Setting of an unknown font element results in an
% error. Setting of an alias font element results in an info an the setting of
% the real element.
%    \begin{macrocode}
\newcommand*{\addtokomafont}[2]{%
  \@ifundefined{scr@fnt@#1}{%
    \@ifundefined{scr@fnt@instead@#1}{%
      \PackageError{scrkbase}{%
        font of element `#1' can't be extended%
      }{%
        You've told me to extend the font selection of the
        element,\MessageBreak
        but either no such element is known by
        KOMA-Script\MessageBreak
        or the element does not use a special font selection%
      }%
    }{%
      \PackageInfo{scrkbase}{%
        You've told me to extend the font selection of the\MessageBreak
        element `#1' that is an alias of element\MessageBreak
        `\csname scr@fnt@instead@#1\endcsname'%
      }%
      \expandafter\addtokomafont\expandafter{%
        \csname scr@fnt@instead@#1\endcsname}{#2}%
    }%
  }{%
    \expandafter\expandafter\expandafter\l@addto@macro
    \csname scr@fnt@#1\endcsname{#2}%
  }%
  \@ifundefined{scr@fnt@wrn@#1}{}{%
    \PackageWarning{scrkbase}{%
      \csname scr@fnt@wrn@#1\endcsname{#1}%
    }%
  }%
}
%    \end{macrocode}
% \end{command}^^A \addtokomafont
%
% \begin{command}{\usekomafont}
% \changes{v2.8p}{2001/09/28}{added}
% \changes{v2.96}{2006/08/18}{alias usage fixed}
% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}}
% Command
% \begin{quote}
%   \cs{usekomafont}\marg{element}
% \end{quote}
% activates the font settings of the font \meta{element}.
%    \begin{macrocode}
\newcommand*{\usekomafont}[1]{%
  \@ifundefined{scr@fnt@#1}{%
    \@ifundefined{scr@fnt@instead@#1}{%
      \PackageError{scrkbase}{%
        font of element `#1' can't be used%
      }{%
        You've told me to use the font selection of the
        element,\MessageBreak
        but either no such element is known by
        KOMA-Script\MessageBreak
        or the element does not use a special font selection%
      }%
    }{%
      \PackageInfo{scrkbase}{%
        You've told me to use the font selection of the
        element\MessageBreak
        `#1' that is an alias of element `\csname
        scr@fnt@instead@#1\endcsname'\MessageBreak
      }%
      \expandafter\expandafter\expandafter\usekomafont
      \expandafter\expandafter\expandafter{%
        \csname scr@fnt@instead@#1\endcsname}%
    }%
  }{%
    \@nameuse{scr@fnt@#1}%
  }%
}
%    \end{macrocode}
% \end{command}^^A \usekomafont
%
%
% \begin{command}{\usesizeofkomafont}
% \changes{v3.12}{2013/03/30}{new}
% \changes{v3.17}{2015/04/03}{new more robust implementation}
% \changes{v3.24}{2017/05/06}{new more robust implementation}
% \changes{v3.34}{2021/05/17}{new implementation due to \LaTeX{} kernel change}
% \begin{command}{\usefamilyofkomafont,\useseriesofkomafont}
% \changes{v3.12}{2013/03/30}{new}
% \changes{v3.17}{2015/04/03}{new more robust implementation}
% \changes{v3.24}{2017/05/06}{new more robust implementation}
% \begin{command}{\useshapeofkomafont}
% \changes{v3.12}{2013/03/30}{new}
% \changes{v3.16a}{2015/02/20}{fix of macro name}
% \changes{v3.17}{2015/04/03}{new more robust implementation}
% \changes{v3.24}{2017/05/06}{new more robust implementation}
% \begin{command}{\useencodingofkomafont}
% \changes{v3.12}{2013/03/30}{new}
% \changes{v3.17}{2015/04/03}{new more robust implementation}
% \changes{v3.24}{2017/05/06}{new more robust implementation}
% \begin{command}{\usefontofkomafont}
% \changes{v3.12}{2013/03/30}{new}
% \changes{v3.17}{2015/04/03}{new more robust implementation}
% \changes{v3.24}{2017/05/06}{new more robust implementation}
% \changes{v3.34}{2021/05/17}{new implementation due to \LaTeX{} kernel change}
% Sometimes not the whole font but only single elements of a font is
% wanted.
%    \begin{macrocode}
\newcommand*{\usesizeofkomafont}[1]{%
  \begingroup
    \scr@prepareforkomafont
    \sbox\@tempboxa{%
      \usekomafont{#1}{%
        \selectfont
        \global\let\g@scr@f@size\f@size
        \global\let\g@scr@f@baselineskip\f@baselineskip
        \global\let\g@scr@f@linespread\f@linespread
      }%
    }%
  \endgroup
  \linespread{\g@scr@f@linespread}%
  \fontsize{\g@scr@f@size}{\g@scr@f@baselineskip}%
  \selectfont
}
\newcommand*{\usefamilyofkomafont}{\use@ofkomafont{family}}
\newcommand*{\useseriesofkomafont}{\use@ofkomafont{series}}
\newcommand*{\useshapeofkomafont}{\use@ofkomafont{shape}}
\newcommand*{\useencodingofkomafont}{\use@ofkomafont{encoding}}
\newcommand*{\usefontofkomafont}[1]{%
  \begingroup
    \scr@prepareforkomafont
    \sbox\@tempboxa{%
      \usekomafont{#1}{%
        \selectfont
        \global\let\g@scr@f@encoding\f@encoding
        \global\let\g@scr@f@family\f@family
        \global\let\g@scr@f@series\f@series
        \global\let\g@scr@f@shape\f@shape
        \global\let\g@scr@f@size\f@size
        \global\let\g@scr@f@baselineskip\f@baselineskip
        \global\let\g@scr@f@linespread\f@linespread
      }%
    }%
  \endgroup
  \linespread{\g@scr@f@linespread}%
  \fontsize{\g@scr@f@size}{\g@scr@f@baselineskip}%
  \usefont{\g@scr@f@encoding}{\g@scr@f@family}{\g@scr@f@series}{\g@scr@f@shape}%
}%
%    \end{macrocode}
% \begin{macro}{\use@ofkomafont}
% \changes{v3.12}{2013/03/30}{new (internal)}
% \changes{v3.17}{2015/04/03}{new more robust implementation}
% \changes{v3.24}{2017/05/06}{new more robust implementation}
% \changes{v3.34}{2021/05/17}{new implementation due to \LaTeX{} kernel change}
% Helper macro for all commands above despite the first and the last one.
%    \begin{macrocode}
\newcommand*{\use@ofkomafont}[2]{%
  \begingroup
    \scr@prepareforkomafont
    \sbox\@tempboxa{%
      \usekomafont{#2}{%
        \selectfont
        \global\expandafter\let\csname g@scr@f@#1\expandafter\endcsname
                               \csname f@#1\endcsname
      }%
    }%
  \endgroup
  \@nameuse{font#1}{\csname g@scr@f@#1\endcsname}%
  \selectfont
}
%    \end{macrocode}
% \begin{macro}{\g@scr@usefont}
% \changes{v3.17}{2015/04/03}{added}
% \changes{v3.24}{2017/05/06}{removed}
% \end{macro}^^A \g@scr@usefont
% \begin{macro}{\g@scr@f@encoding,\g@scr@f@family,\g@scr@f@series,\g@scr@f@shape,
%               \g@scr@f@size,\g@scr@f@baselineskip,\g@scr@f@linespread}
% \changes{v3.24}{2017/05/06}{added}
%    \begin{macrocode}
\newcommand*{\g@scr@f@encoding}{}\let\g@scr@f@encoding\f@encoding
\newcommand*{\g@scr@f@family}{}\let\g@scr@f@family\f@family
\newcommand*{\g@scr@f@series}{}\let\g@scr@f@series\f@series
\newcommand*{\g@scr@f@shape}{}\let\g@scr@f@shape\f@shape
\newcommand*{\g@scr@f@size}{}\let\g@scr@f@size\f@size
\newcommand*{\g@scr@f@baselineskip}{}\let\g@scr@f@baselineskip\f@baselineskip
\newcommand*{\g@scr@f@linespread}{}\let\g@scr@f@linespread\f@linespread
%    \end{macrocode}
% \end{macro}^^A \g@scr@f@encoding … \g@scr@f@linespread
% \begin{macro}{\scr@komafontrelaxlist}
% \changes{v3.17}{2015/04/03}{added}
% \changes{v3.24}{2017/05/05}{\cs{uppercase} and \cs{lowercase} removed}
% \changes{v3.24}{2017/05/05}{\cs{MakeUppercase} and \cs{MakeLowercase} moved to
%     \cs{scr@komafontonearglist}}
% A \cs{do} list of all macros, that should become \cs{relax} in the previous
% commands.
%    \begin{macrocode}
\newcommand*{\scr@komafontrelaxlist}{%
  \do\normalcolor 
}
%    \end{macrocode}
% \end{macro}^^A \scr@komafontrelaxlist
% \begin{macro}{\scr@komafontgobblelist}
% \changes{v3.19}{2015/08/20}{added}
% Like \cs{scr@komafontrelaxlist} but with \cs{@gobble} instead of \cs{relax}.
%    \begin{macrocode}
\newcommand*{\scr@komafontgobblelist}{%
  \do\color
}
%    \end{macrocode}
% \end{macro}^^A \scr@komafontgobblelist
% \begin{macro}{\scr@komafontonearglist}
% \changes{v3.24}{2017/05/05}{added}
% Like \cs{scr@komafontgobblelist} but with \cs{@firstofone} instead of
% \cs{@gobble}.
%    \begin{macrocode}
\newcommand*{\scr@komafontonearglist}{%
  \do\MakeUppercase \do\MakeLowercase
}
%    \end{macrocode}
% \end{macro}^^A \scr@komafontonearglist
% \begin{macro}{\scr@prepareforkomafont}
% \changes{v3.17}{2015/04/03}{added}
% \changes{v3.19}{2015/08/20}{using \cs{scr@komafontgobblelist}}
% \changes{v3.24}{2017/05/05}{using \cs{scr@komafontonearglist}}
% Process all the \cs{do} lists. Note: Should be encapsulated into a local group.
%    \begin{macrocode}
\newcommand*{\scr@prepareforkomafont}{%
  \long\def\do##1{\let##1\relax}\scr@komafontrelaxlist
  \long\def\do##1{\let##1\@gobble}\scr@komafontgobblelist
  \long\def\do##1{\let##1\@firstofone}\scr@komafontonearglist
}
%    \end{macrocode}
% \end{macro}^^A \scr@prepareforkomafont
% \begin{command}{\addtokomafontrelaxlist}
% \changes{v3.17}{2015/04/03}{added}
% Adds exactly one macro/command to \cs{scr@komafontrelaxlist}.
%    \begin{macrocode}
\newcommand*{\addtokomafontrelaxlist}[1]{%
  \l@addto@macro\scr@komafontrelaxlist{\do#1}%
}
%    \end{macrocode}
% \end{command}^^A \addtokomafontrelaxlist
% \begin{command}{\addtokomafontgobblelist}
% \changes{v3.19}{2015/08/20}{added}
% Adds exactly one macro/command to \cs{scr@komafontgobblelist}.
%    \begin{macrocode}
\newcommand*{\addtokomafontgobblelist}[1]{%
  \l@addto@macro\scr@komafontgobblelist{\do#1}%
}
%    \end{macrocode}
% \end{command}^^A \addtokomafontgobblelist
% \begin{command}{\addtokomafontonearglist}
% \changes{v3.24}{2017/05/05}{added}
% Adds exactly one macro/command to \cs{scr@komafontonearglist}.
%    \begin{macrocode}
\newcommand*{\addtokomafontonearglist}[1]{%
  \l@addto@macro\scr@komafontonearglist{\do#1}%
}
%    \end{macrocode}
% \end{command}^^A \addtokonafontonearglist
% \end{macro}^^A \use@ofkomafont
% \end{command}^^A \usefontofkomafont
% \end{command}^^A \useencodingofkomafont
% \end{command}^^A \useshapeofkomafont
% \end{command}^^A \usefamilyofkomafont,\useseriesofkomafont
% \end{command}^^A \usesizeofkomafont
%
%
% \begin{command}{\newkomafont}
% \changes{v2.95}{2004/07/21}{added}
% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}}
% \changes{v3.11c}{2013/02/18}{the warning needs an argument}
% \changes{v3.25}{2017/12/08}{warn if already exists as an alias}
% Command
% \begin{quote}
%   \cs{newkomafont}\oarg{warning}\marg{element}\marg{font settings}
% \end{quote}
% defines a new font \meta{element} with the given \meta{font settings} as
% default. The optional \meta{warning} is shown whenever the font setting of
% the element is changed, but not when the element is used. Internally a macro
% \cs{@\meta{element}font} is defined with the \meta{font settings}. An
% additional macro \cs{scr@fnt@\meta{element}} is defined to just execute
% \cs{@meta{element}font}. But you also can define \cs{scr@fnt@\meta{element}}
% to use another internal font storage macro. So several elements can share
% the same font settings.
%    \begin{macrocode}
\newcommand*{\newkomafont}[3][\relax]{%
  \scr@ifundefinedorrelax{scr@fnt@instead@#2}{}{%
    \PackageWarning{scrkbase}{%
      Making stand-alone element `#2' from\MessageBreak
      alias to `\@nameuse{scr@fnt@instead@#2}'
    }%
    \expandafter\let\csname scr@fnt@instead@#2\endcsname\relax
  }%
  \expandafter\newcommand\expandafter*\csname @#2font\endcsname{#3}%
  \expandafter\expandafter\expandafter\newcommand
  \expandafter\expandafter\expandafter*%
  \expandafter\csname scr@fnt@#2\expandafter\endcsname\expandafter{%
    \csname @#2font\endcsname%
  }%
  \ifx\relax#1\relax\else
    \expandafter\newcommand\expandafter*\csname scr@fnt@wrn@#2\endcsname[1]{#1}%
  \fi
}
%    \end{macrocode}
% \begin{command}{\aliaskomafont}
% \changes{v2.95}{2004/07/21}{added}
% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}}
% \changes{v3.25}{2017/12/08}{warning if element is already defined}
% Another possibility to share fonts is to define an
% alias by defining \cs{scr@fnt@instead@\meta{element}} with the name of
% another element. This can be done using
% \begin{quote}
%   \cs{aliaskomafont}\marg{alias}\marg{element}
% \end{quote}
% It defines \marg{alias} to be an alias of \meta{element}.
%    \begin{macrocode}
\newcommand*{\aliaskomafont}[2]{%
  \scr@ifundefinedorrelax{scr@fnt@#1}{}{%
    \PackageWarning{scrkbase}{%
      Redefining stand alone element `#1' as\MessageBreak
      alias to `#2'%
    }
    \expandafter\let\csname scr@fnt@#1\endcsname\relax
  }%
  \scr@ifundefinedorrelax{scr@fnt@wrn@#1}{}{%
    \expandafter\let\csname scr@fnt@wrn@#1\encsname\relax
  }
  \expandafter\newcommand\expandafter*\csname scr@fnt@instead@#1\endcsname{%
    #2%
  }%
}
%</scrkbase&body>
%    \end{macrocode}
% \end{command}
% \end{command}
%
% \Finale
% \PrintChanges
% 
\endinput
% Local Variables:
% mode: doctex
% ispell-local-dictionary: "en_US"
% eval: (flyspell-mode 1)
% TeX-master: t
% TeX-engine: luatex-dev
% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
% End:
