% \iffalse meta-comment
% ======================================================================
% scrkernel-compatibility.dtx
% Copyright (c) Markus Kohm, 2006-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-compatibility.dtx 3896 2022-06-21 09:06:07Z kohm $
%<identify>%%%            (run: identify)
%<init>%%%            (run: init)
%<option>%%%            (run: option)
%<body>%%%            (run: body)
%<*dtx>
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\begingroup
  \def\filedate$#1: #2-#3-#4 #5${\def\filedate{#2/#3/#4}}
  \filedate$Date: 2022-06-21 11:06:07 +0200 (Di, 21. Jun 2022) $
  \def\filerevision$#1: #2 ${\def\filerevision{r#2}}
  \filerevision$Revision: 3896 $
  \edef\reserved@a{%
    \noexpand\endgroup
    \noexpand\ProvidesFile{scrkernel-compatibility.dtx}%
                          [\filedate\space\filerevision\space
                           KOMA-Script source
                           (compatibility)]
  }%
\reserved@a
\documentclass[USenglish]{koma-script-source-doc}
\usepackage{babel}
\usepackage{hvlogos}
\setcounter{StandardModuleDepth}{2}
\begin{document}
\DocInput{scrkernel-compatibility.dtx}
\end{document}
%</dtx>
% \fi^^A meta-comment
%
% \changes{v2.95}{2006/03/16}{new by splitting \file{scrclass.dtx}}
% \changes{v3.36}{2022/02/21}{switch over from \cls*{scrdoc} to
%   \cls*{koma-script-source-doc}}
% \changes{v3.36}{2022/02/21}{whole implementation documentation in English}
%
% \GetFileInfo{scrkernel-compatibility.dtx}
% \title{Compatibility with prior Versions of
%   \href{https://komascript.de}{\KOMAScript}}
% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
% \date{Revision \fileversion{} of \filedate}
% \maketitle
% \begin{abstract}
%   \KOMAScript{} has been designed to be as much compatible with the user
%   interface of the standard classes as possible. Compatibility with internal
%   commands of the standard classes is not possible and therefore sometimes
%   given, but mostly not. Compatibility with the lookalike of the standard
%   classes is not a main purpose of \KOMAScript{}, however with option
%   \opt{emulatestandardclasses} several layout elements can be changed to
%   look similar to the standard classes.
%
%   Another compatibility topic is compatibility of \KOMAScript{} to prior
%   version of \KOMAScript. Sometimes, \KOMAScript{} has been changed to
%   improve the typography. In most of these cases you can switch back to the
%   results of prior versions with option \opt{version}.
%
%   All those features are implemented in \file{scrkernel-compatibility.dtx}.
% \end{abstract}
% \tableofcontents
%
% \section{User Manual}
%
% You can find the user documentation of the commands implemented in
% \file{scrkernel-compatibility.dtx} in the \KOMAScript{} manual, either the
% German \file{scrguide} or the English \file{scrguien}.
% 
%
% \MaybeStop{\PrintIndex}
%
%
% \section{Implementation of Compatibility Selection}
%
% \subsection{Options for compatibility with the standard classes}
% There is only one such option, which can only be used while loading a
% \KOMAScript{} class.
%
% \begin{option}{emulatestandardclasses}
% \changes{v3.12}{2013/11/11}{added}
% \changes{v3.20}{2016/02/16}{\opt{headings\quotechar=standardclasses} also for
%   \cls*{scrartcl}}
% Because this option has to change several defaults, it should be used as
% early as possible. The earliest time is the load time. So it has been
% defined as a classic option.
% \begin{macro}{\@scr@emulatestandardclassesfalse,\@scr@emulatestandardclassestrue,
%               \if@scr@emulatestandardclasses}
% \changes{v3.12}{2013/11/11}{added}
% We need a boolean switch, but it should be a kind of constant, so the
% default changing macros are deactivated.
%    \begin{macrocode}
%<*option&class&!letter>
\newif\if@scr@emulatestandardclasses
\let\scr@emulatestandardclassestrue\relax
\let\scr@emulatestandardclassesfalse\relax
\DeclareOption{emulatestandardclasses}{%
  \let\if@scr@emulatestandardclasses\iftrue
  \KOMAExecuteOptions{%
    fontsize=10pt,%
%<article|book|report>    headings=standardclasses,%
    cleardoublepage=current
  }%
  \newcommand*{\defaultpapersize}{letter}%
  \AtEndOfClass{%
    \setkomafont{descriptionlabel}{\bfseries}%
    \setkomafont{dictum}{\normalfont\small}%
    \setkomafont{caption}{}%
    \setkomafont{captionlabel}{}%
    \setcapindent{0pt}%
    \RequirePackage[pagestyleset=standard,markcase=upper]{scrlayer-scrpage}%
    \PreventPackageFromLoading{scrpage2}%
    \setkomafont{pagenumber}{\normalfont}%
    \setkomafont{pageheadfoot}{\normalfont}%
    \cfoot[\pagemark]{}%
%<article|report>    \pagestyle{plain}%
  }%
}
%</option&class&!letter>
%    \end{macrocode}
% \end{macro}
% \end{option}
%
%
% \subsection{Options for compatibility with prior versions of \KOMAScript}
% There is also a single option to select compatibility with exactly one
% \KOMAScript{} version. The compatibility changes are limited to feature
% changes. Bug changes are not affected. So you would never be able to get
% exactly the result of the given version using this option. However falling
% back to compatibility with a prior version usually also deactivates other
% features of the current version.
%
% \changes{v3.01b}{2008/12/09}{compatibility definitions in packages only, if
% not yet defined}
%
% \begin{option}{version}
% \changes{v2.9u}{2005/03/05}{added}
% \changes{v2.95}{2006/03/16}{can be used while loading only}
% \begin{macro}{\scr@compatibility}
% \changes{v2.9u}{2005/03/05}{added}
% \changes{v3.01a}{2008/11/20}{default is \opt{\quotechar=last}}
% \begin{macro}{\scr@ta@compatibility}
% \changes{v3.01b}{2008/12/09}{added}
% Depending on \opt{version=\meta{version}} \cs{scr@compatibility}
% resp. \cs{scr@ta@compatibility} will be set to an integer. The mapping from
% \meta{version} to the integer is done with several macros
% \cs{scr@v@\meta{version}}.
%    \begin{macrocode}
%<*init>
%<class>\newcommand*
%<package>\providecommand*
  {\scr@compatibility}{\scr@v@last}
%<typearea>\newcommand*{\scr@ta@compatibility}{\scr@compatibility}
%</init>
%<*option>
\KOMA@key{version}[last]{%
  \scr@ifundefinedorrelax{scr@v@#1}{%
    \def\scr@compatibility{0}%
%<class>    \ClassWarningNoLine{\KOMAClassName}{%
%<*package>
    \PackageWarningNoLine{%
%<extend>      scrextend%
%<typearea>      typearea%
%<letter>      scrletter%
    }{%
%</package>
      You have set option `version' to value `#1', but\MessageBreak
      this value of version is not supported.\MessageBreak
      Because of this, version was set to `first'%
    }%
    \FamilyKeyStateProcessed
    \KOMA@kav@replacevalue{.%
%<class>      \KOMAClassFileName
%<package&extend>      scrextend.\scr@pkgextension
%<package&typearea>      typearea.\scr@pkgextension
%<package&letter>      scrletter.\scr@pkgextension
    }{version}{first}%
  }{%
%<class>    \ClassInfoNoLine{\KOMAClassName}{%
%<*package>
    \PackageInfoNoLine{%
%<extend>      scrextend%
%<typearea>      typearea%
%<letter>      scrletter%
    }{%
%</package>
      Switching compatibility level to `#1'%
    }%
%<class|extend|letter> \edef\scr@compatibility{\@nameuse{scr@v@#1}}%
%<typearea>    \edef\scr@ta@compatibility{\@nameuse{scr@v@#1}}%
    \FamilyKeyStateProcessed
    \KOMA@kav@xreplacevalue{.%
%<class>      \KOMAClassFileName
%<package&extend>      scrextend.\scr@pkgextension
%<package&typearea>      typearea.\scr@pkgextension
%<package&letter>      scrletter.\scr@pkgextension
    }{version}{#1}%
    \ifnum\scr@compatibility<\scr@v@last
%<class>      \ClassWarningNoLine{\KOMAClassName}{%
%<*package>
      \PackageWarningNoLine{%
%<extend>        scrextend%
%<typearea>        typearea%
%<letter>        scrletter%
      }{%
%</package>
        Switching back to an old KOMA-Script release does\MessageBreak
        not mean, that KOMA-Script is fully compatible with\MessageBreak
        the old release. If you need full compatibility\MessageBreak
        to an old KOMA-Script release, you should use that\MessageBreak
        old KOMA-Script release. However, in that case you\MessageBreak
        could also need old releases of other packages and\MessageBreak
        even of the LaTeX kernel.\MessageBreak
        You should also note, that the KOMA-Script developers\MessageBreak
        refuse support for documents using `version=#1'.\MessageBreak
        We recommend to eliminate all deprecated options\MessageBreak
        and commands. We also recommend to not use option\MessageBreak
        `version', i.e., with other values than `last'%
      }%    
    \fi
  }%
}
%<class>\KOMA@kav@add{.\KOMAClassFileName}{version}{last}
%    \end{macrocode} 
% We do not use \cs{FamilyKeyState} if the option is set to late, but
% immediately report an error.
%    \begin{macrocode}
%<class>\AtEndOfClass{%
%<package>\AtEndOfPackage{%
  \KOMA@key{version}[]{%
%<class>    \ClassError{\KOMAClassName}{%
%<*package>
    \PackageError{%
%<extend>      scrextend%
%<typearea>      typearea%
%<letter>      scrletter%
    }{%
%</package>
      Option `version' too late%
    }{%
      Option `version' may be set only while loading the 
%<class>      class.\MessageBreak
%<package>      package.\MessageBreak
      But you've tried to set it up later.%
    }%
    \FamilyKeyStateProcessed
  }%
}
%</option>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*init>
%    \end{macrocode}
% \begin{macro}{\scr@v@first}
% \changes{v2.9u}{2005/03/05}{added}
% \begin{macro}{\scr@v@2.9}
% \changes{v2.9u}{2005/03/05}{added}
% \begin{macro}{\scr@v@2.9t}
% \changes{v2.9u}{2005/03/05}{added}
% \begin{macro}{\scr@v@2.95}
% \changes{v2.95}{2006/03/23}{added}
% \begin{macro}{\scr@v@2.95a}
% \changes{v2.96a}{2006/11/27}{added}
% \begin{macro}{\scr@v@2.95b}
% \changes{v2.96a}{2006/11/27}{added}
% \begin{macro}{\scr@v@2.96}
% \changes{v2.96a}{2006/11/27}{added}
% \begin{macro}{\scr@v@2.96a}
% \changes{v2.96a}{2006/11/27}{added}
% \begin{macro}{\scr@v@2.97}
% \changes{v2.97}{2007/03/02}{added}
% \begin{macro}{\scr@v@2.97a}
% \changes{v2.97a}{2007/03/07}{added}
% \begin{macro}{\scr@v@2.97b}
% \changes{v2.97b}{2007/03/25}{added}
% \begin{macro}{\scr@v@2.97c}
% \changes{v2.97c}{2007/05/12}{added}
% \changes{v2.97d}{2007/10/09}{Wert geändert}%^^A
% \begin{macro}{\scr@v@2.97d}
% \changes{v2.97d}{2007/10/03}{added}
% \changes{v2.97d}{2007/10/09}{Wert geändert}%^^A
% \begin{macro}{\scr@v@2.97e}
% \changes{v2.97e}{2007/11/27}{added}
% \begin{macro}{\scr@v@2.98}
% \changes{v2.98}{2007/12/24}{added}
% \begin{macro}{\scr@v@2.98a}
% \changes{v2.98a}{2008/01/08}{added}
% \begin{macro}{\scr@v@2.98b}
% \changes{v2.98b}{2008/01/30}{added}
% \begin{macro}{\scr@v@2.98c}
% \changes{v2.98c}{2008/02/01}{added}
% \begin{macro}{\scr@v@3.00}
% \changes{v3.00}{2008/11/04}{added}
% \begin{macro}{\scr@v@3.01}
% \changes{v3.01}{2008/11/14}{added}
% \begin{macro}{\scr@v@3.01a}
% \changes{v3.01a}{2008/11/20}{added}
% \begin{macro}{\scr@v@3.01b}
% \changes{v3.01b}{2008/11/24}{added}
% \begin{macro}{\scr@v@3.01c}
% \changes{v3.01c}{2008/12/09}{added}
% \begin{macro}{\scr@v@3.02}
% \changes{v3.02}{2009/01/01}{added}
% \begin{macro}{\scr@v@3.02b}
% \changes{v3.02b}{2009/01/24}{added}
% \begin{macro}{\scr@v@3.02c}
% \changes{v3.02c}{2009/01/28}{added}
% \begin{macro}{\scr@v@3.03}
% \changes{v3.03}{2009/04/01}{added}
% \begin{macro}{\scr@v@3.03a}
% \changes{v3.03a}{2009/04/02}{added}
% \begin{macro}{\scr@v@3.03b}
% \changes{v3.03b}{2009/04/12}{added}
% \begin{macro}{\scr@v@3.04}
% \changes{v3.04}{2009/07/07}{added}
% \begin{macro}{\scr@v@3.05}
% \changes{v3.05}{2009/07/08}{added}
% \begin{macro}{\scr@v@3.04a}
% \changes{v3.04a}{2009/07/24}{added}
% \begin{macro}{\scr@v@3.05a}
% \changes{v3.05a}{2010/03/10}{added}
% \begin{macro}{\scr@v@3.06}
% \changes{v3.06}{2010/06/17}{added}
% \begin{macro}{\scr@v@3.07}
% \changes{v3.07}{2010/09/14}{added}
% \begin{macro}{\scr@v@3.08}
% \changes{v3.08}{2010/10/28}{added}
% \begin{macro}{\scr@v@3.08a}
% \changes{v3.08a}{2011/01/25}{added}
% \begin{macro}{\scr@v@3.08b}
% \changes{v3.08b}{2011/02/22}{added}
% \begin{macro}{\scr@v@3.09}
% \changes{v3.09}{2011/04/02}{added}
% \begin{macro}{\scr@v@3.09a}
% \changes{v3.09a}{2011/04/12}{added}
% \begin{macro}{\scr@v@3.10}
% \changes{v3.10}{2011/08/30}{added}
% \begin{macro}{\scr@v@3.10a}
% \changes{v3.10a}{2012/03/08}{added}
% \begin{macro}{\scr@v@3.10b}
% \changes{v3.10b}{2012/03/13}{added}
% \begin{macro}{\scr@v@3.11}
% \changes{v3.11}{2012/05/15}{added}
% \begin{macro}{\scr@v@3.11a}
% \changes{v3.11a}{2012/05/25}{added}
% \begin{macro}{\scr@v@3.11b}
% \changes{v3.11b}{2012/07/29}{added}
% \begin{macro}{\scr@v@3.12}
% \changes{v3.12}{2013/03/05}{added}
% \begin{macro}{\scr@v@3.13}
% \changes{v3.13}{2014/03/19}{added}
% \begin{macro}{\scr@v@3.13a}
% \changes{v3.13a}{2014/08/07}{added}
% \begin{macro}{\scr@v@3.14}
% \changes{v3.14}{2014/10/28}{added}
% \begin{macro}{\scr@v@3.15}
% \changes{v3.15}{2014/11/20}{added}
% \begin{macro}{\scr@v@3.16}
% \changes{v3.16}{2015/02/08}{added}
% \begin{macro}{\scr@v@3.17}
% \changes{v3.17}{2015/02/08}{added}
% \begin{macro}{\scr@v@3.17a}
% \changes{v3.17a}{2015/05/06}{added}
% \begin{macro}{\scr@v@3.17c}
% \changes{v3.17c}{2015/05/13}{added}
% \begin{macro}{\scr@v@3.18}
% \changes{v3.18}{2015/05/14}{added}
% \begin{macro}{\scr@v@3.18a}
% \changes{v3.18a}{2015/07/03}{added}
% \begin{macro}{\scr@v@3.19}
% \changes{v3.19}{2015/07/26}{added}
% \begin{macro}{\scr@v@3.19a}
% \changes{v3.19a}{2015/10/03}{added}
% \begin{macro}{\scr@v@3.20}
% \changes{v3.20}{2015/10/06}{added}
% \begin{macro}{\scr@v@3.21}
% \changes{v3.21}{2016/05/19}{added}
% \begin{macro}{\scr@v@3.22}
% \changes{v3.22}{2016/07/29}{added}
% \begin{macro}{\scr@v@3.23}
% \changes{v3.23}{2017/02/04}{added}
% \begin{macro}{\scr@v@3.23}
% \changes{v3.24}{2017/04/22}{added}
% \begin{macro}{\scr@v@3.25}
% \changes{v3.25}{2017/09/07}{added}
% \begin{macro}{\scr@v@3.26}
% \changes{v3.26}{2018/03/31}{added}
% \begin{macro}{\scr@v@3.26a}
% \changes{v3.26a}{2018/12/30}{added}
% \begin{macro}{\scr@v@3.26b}
% \changes{v3.26b}{2018/12/30}{added}
% \begin{macro}{\scr@v@3.27}
% \changes{v3.27}{2019/02/02}{added}
% \begin{macro}{\scr@v@3.27a}
% \changes{v3.27a}{2019/10/13}{added}
% \begin{macro}{\scr@v@3.28}
% \changes{v3.28}{2019/11/20}{added}
% \begin{macro}{\scr@v@3.29}
% \changes{v3.29}{2020/01/06}{added}
% \begin{macro}{\scr@v@3.30}
% \changes{v3.30}{2020/02/24}{added}
% \begin{macro}{\scr@v@3.31}
% \changes{v3.31}{2020/04/26}{added}
% \begin{macro}{\scr@v@3.32}
% \changes{v3.32}{2020/08/06}{added}
% \begin{macro}{\scr@v@3.33}
% \changes{v3.33}{2021/01/01}{added}
% \begin{macro}{\scr@v@3.34}
% \changes{v3.34}{2021/03/22}{added}
% \begin{macro}{\scr@v@3.35}
% \changes{v3.35}{2021/10/12}{added}
% \begin{macro}{\scr@v@3.36}
% \changes{v3.36}{2021/11/17}{added}
% \begin{macro}{\scr@v@3.37 BETA}
% \changes{v3.37 BETA}{2022/05/04}{added}
% \begin{macro}{\scr@v@last}
% \changes{v2.9u}{2005/03/05}{added}
% Nun die unterschiedlichen möglichen Werte (|\scr@v@last| ist jeweils die
% höchste vorhandene Nummer):
%    \begin{macrocode}
\@namedef{scr@v@first}{0}
\@namedef{scr@v@2.9}{0}
\@namedef{scr@v@2.9t}{0}
\@namedef{scr@v@2.9u}{1}
\@namedef{scr@v@2.95}{2}
\@namedef{scr@v@2.95a}{2}
\@namedef{scr@v@2.95b}{2}
\@namedef{scr@v@2.96}{2}
\@namedef{scr@v@2.96a}{3}
\@namedef{scr@v@2.97}{3}
\@namedef{scr@v@2.97a}{3}
\@namedef{scr@v@2.97b}{3}
\@namedef{scr@v@2.97c}{4}
\@namedef{scr@v@2.97d}{5}
\@namedef{scr@v@2.97e}{6}
\@namedef{scr@v@2.98}{6}
\@namedef{scr@v@2.98a}{6}
\@namedef{scr@v@2.98b}{6}
\@namedef{scr@v@2.98c}{7}
\@namedef{scr@v@3.00}{8}
\@namedef{scr@v@3.01}{8}
\@namedef{scr@v@3.01a}{8}
\@namedef{scr@v@3.01b}{9}
\@namedef{scr@v@3.01c}{9}
\@namedef{scr@v@3.02}{9}
\@namedef{scr@v@3.02b}{9}
\@namedef{scr@v@3.02c}{10}
\@namedef{scr@v@3.03}{10}
\@namedef{scr@v@3.03a}{10}
\@namedef{scr@v@3.03b}{10}
\@namedef{scr@v@3.04}{10}
\@namedef{scr@v@3.04a}{10}
\@namedef{scr@v@3.05}{10}
\@namedef{scr@v@3.05a}{10}
\@namedef{scr@v@3.06}{10}
\@namedef{scr@v@3.07}{10}
\@namedef{scr@v@3.08}{10}
\@namedef{scr@v@3.08a}{10}
\@namedef{scr@v@3.08b}{10}
\@namedef{scr@v@3.09}{10}
\@namedef{scr@v@3.09a}{10}
\@namedef{scr@v@3.10}{10}
\@namedef{scr@v@3.10a}{10}
\@namedef{scr@v@3.10b}{10}
\@namedef{scr@v@3.11}{10}
\@namedef{scr@v@3.11a}{10}
\@namedef{scr@v@3.11b}{10}
\@namedef{scr@v@3.12}{11}
\@namedef{scr@v@3.13}{12}
\@namedef{scr@v@3.13a}{13}
\@namedef{scr@v@3.14}{13}
\@namedef{scr@v@3.15}{14}
\@namedef{scr@v@3.16}{14}
\@namedef{scr@v@3.17}{15}
\@namedef{scr@v@3.17a}{15}
\@namedef{scr@v@3.17c}{15}
\@namedef{scr@v@3.18}{15}
\@namedef{scr@v@3.18a}{15}
\@namedef{scr@v@3.19}{15}
\@namedef{scr@v@3.19a}{15}
\@namedef{scr@v@3.20}{15}
\@namedef{scr@v@3.21}{15}
\@namedef{scr@v@3.22}{16}
\@namedef{scr@v@3.23}{16}
\@namedef{scr@v@3.24}{16}
\@namedef{scr@v@3.25}{17}
\@namedef{scr@v@3.26}{17}
\@namedef{scr@v@3.26a}{17}
\@namedef{scr@v@3.26b}{17}
\@namedef{scr@v@3.27}{17}
\@namedef{scr@v@3.27a}{17}
\@namedef{scr@v@3.28}{17}
\@namedef{scr@v@3.29}{17}
\@namedef{scr@v@3.30}{17}
\@namedef{scr@v@3.31}{18}
\@namedef{scr@v@3.32}{18}
\@namedef{scr@v@3.33}{18}
\@namedef{scr@v@3.34}{18}
\@namedef{scr@v@3.35}{19}
\@namedef{scr@v@3.36}{20}
\@namedef{scr@v@3.37 BETA}{20}
\@namedef{scr@v@last}{20}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{option}
%    \begin{macrocode}
%</init>
%    \end{macrocode}
%
% \begin{macro}{\scr@v@is@lt,\scr@v@is@gt,\scr@v@is@le,\scr@v@is@ge}
% \changes{v3.17}{2015/03/10}{added}
% All these macros are to be used as condition for \cs{ifnum} and compare the
% currently selected version with a given \meta{version}, e.g.:
% \begin{quote}
%   \cs{expandafter}\cs{ifnum}\cs{scr@v@is@lt}\marg{version} \meta{true code}
%   \cs{else} \meta{false code} \cs{fi}
% \end{quote}
% The conditions are:
% \begin{quote}\raggedright
%   \cs{scr@v@is@lt} --- current version less than \meta{version} \\
%   \cs{scr@v@is@gt} --- current version greater than \meta{version} \\
%   \cs{scr@v@is@le} --- current version less than or equal to \meta{version} \\
%   \cs{scr@v@is@ge} --- current version greater than or equal to \meta{version} \\
% \end{quote}
%    \begin{macrocode}
%<*option&(class|extend)>
\newcommand*{\scr@v@is@lt}[1]{%
  \scr@compatibility<\@nameuse{scr@v@#1}
}
\newcommand*{\scr@v@is@gt}[1]{%
  \scr@compatibility>\@nameuse{scr@v@#1}
}
\newcommand*{\scr@v@is@le}[1]{%
  \numexpr\scr@compatibility-\@ne\relax<\@nameuse{scr@v@#1}
}
\newcommand*{\scr@v@is@ge}[1]{%
  \numexpr\scr@compatibility+\@ne\relax>\@nameuse{scr@v@#1}
}
%</option&(class|extend)>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\scr@ta@v@is@lt,\scr@ta@v@is@gt,\scr@ta@v@is@le,\scr@ta@v@is@ge}
% \changes{v3.17}{2015/03/10}{Neu (intern)}
% The same conditions are defined for \pkg*{typearea}.
%    \begin{macrocode}
%<*option&package&typearea>
\newcommand*{\scr@ta@v@is@lt}[1]{%
  \scr@ta@compatibility<\@nameuse{scr@v@#1}
}
\newcommand*{\scr@ta@v@is@gt}[1]{%
  \scr@ta@compatibility>\@nameuse{scr@v@#1}
}
\newcommand*{\scr@ta@v@is@le}[1]{%
  \numexpr\scr@ta@compatibility-\@ne <\@nameuse{scr@v@#1}
}
\newcommand*{\scr@ta@v@is@ge}[1]{%
  \numexpr\scr@ta@compatibility+\@ne >\@nameuse{scr@v@#1}
}
%</option&package&typearea>
%    \end{macrocode}
% \end{macro}
%
% \changes{v3.37}{2022/06/21}{version test added}
% We also do some version tests at |\begin{document}| because of the extremely
% high speed of \LaTeX{} kernel development.
%    \begin{macrocode}
%<*body&(class|extend)>
\AtBeginDocument{%
  \begingroup
    \def\reserved@a#1/#2/#3 #4\@nil{\@tempcnta=#1\relax\@tempcntb=#2\relax}%
    \expandafter\reserved@a\KOMAScriptVersion\@nil
    \edef\reserved@a{\the\numexpr\@tempcnta+2\relax/%
      \ifnum\@tempcntb<10 0\fi\the\@tempcntb/01}%
    \expandafter\IfLTXAtLeastTF\expandafter{\reserved@a}{%
%<class>      \ClassWarningNoLine{\KOMAClassName}{%
%<package>      \PackageWarningNoLine{scrextend}{%
        Your are using a KOMA-Script version, that has not\MessageBreak
        been tested with your more than one year newer\MessageBreak
        LaTeX release `\fmtversion'.\MessageBreak
        Because of the high speed of LaTeX kernel development,\MessageBreak
        this could result in a lot of issues.\MessageBreak
        Please have a look at\MessageBreak
        <http://www.ctan.org/pkg/koma-script> and if this\MessageBreak
        shows a newer KOMA-Script version than\MessageBreak
        `\KOMAScriptVersion', we suggest to do\MessageBreak
        an update of KOMA-Script or maybe even the whole\MessageBreak
        TeX distribution%
      }%
    }{%
      \edef\reserved@a{\the\numexpr\@tempcnta-4\relax/%
        \ifnum\@tempcntb<10 0\fi\the\@tempcntb/01}%
      \expandafter\IfLTXAtLeastTF\expandafter{\reserved@a}{}{%
%<class>        \ClassWarningNoLine{\KOMAClassName}{%
%<package>        \PackageWarningNoLine{scrextend}{%
          You are using a KOMA-Script version, that has not been\MessageBreak
          tested with your more than four years older LaTeX\MessageBreak
          release `\fmtversion'.\MessageBreak
          Because of the high speed of LaTeX kernel development,\MessageBreak
          KOMA-Script releases cannot be tested with all past\MessageBreak
          LaTeX releases.\MessageBreak
          \ifnum\scr@compatibility<\scr@v@last
            So even if you are using option `version' implicitly\MessageBreak
            or explicitly, this
          \else
            So this
          \fi
          could result in a lot of issues.\MessageBreak
          We recommend, to update the whole TeX distribution.\MessageBreak
          If this could not be done, we suggest to use at\MessageBreak
          least an older KOMA-Script release, e.g., from\MessageBreak
          <https://komascript.de/current>%
        }%
      }%
    }%
  \endgroup
}
%</body&(class|extend)>
%    \end{macrocode}
%
%
% \subsection{Compatibility with early versions of \cls*{scrlttr2}}
% Early version of \cls*{scrlttr2} have had another macro. Because, there may
% still be \file{lco} files, that use is, it is also defined if compatibility
% to version before 2.95 has been selected.
%
% \begin{macro}{\@setif}
% \changes{v2.8q}{2001/10/08}{added}
% \changes{v2.95}{2006/03/31}{only for version settings before 2.95}
% The deprecated command has been used to set a boolean switch to true or
% false using one of the values |true|, |false|, |on|, or |off|.
%    \begin{macrocode}
%<*class&letter&body>
\expandafter\ifnum \@nameuse{scr@v@2.95}>\scr@compatibility\relax
  \newcommand*{\@setif}[2][]{%
    \begingroup
      \edef\@tempa{#1}\ifx\@tempa\@empty
        \def\@tempa{\KOMA@set@ifkey{#2}{@#2}}%
      \else
        \def\@tempa{\KOMA@set@ifkey{#2}{#1}}%
      \fi
    \expandafter\endgroup\@tempa
  }%
\fi
%</class&letter&body>
%    \end{macrocode}
% \end{macro}
%
% \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:
