% \iffalse meta-comment % ====================================================================== % scrkernel-compatibility.dtx % Copyright (c) Markus Kohm, 2006-2023 % % This file is part of the LaTeX2e KOMA-Script bundle. % % This work may be distributed and/or modified under the conditions of % the LaTeX Project Public License, version 1.3c of the license. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3c or later is part of all distributions of LaTeX % version 2005/12/01 or later and of this work. % % This work has the LPPL maintenance status "author-maintained". % % The Current Maintainer and author of this work is Markus Kohm. % % This work consists of all files listed in MANIFEST.md. % ====================================================================== %%% From File: $Id: scrkernel-compatibility.dtx 4133 2024-10-24 09:54:28Z kohm $ %%%% (run: identify) %%%% (run: init) % %<*option> \KOMA@key{version}[last]{% \scr@ifundefinedorrelax{scr@v@#1}{% \def\scr@compatibility{0}% % \ClassWarningNoLine{\KOMAClassName}{% %<*package> \PackageWarningNoLine{% % scrextend% % typearea% % scrletter% }{% % 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{% % \KOMAClassFileName % scrextend.\scr@pkgextension % typearea.\scr@pkgextension % scrletter.\scr@pkgextension }{version}{first}% }{% % \ClassInfoNoLine{\KOMAClassName}{% %<*package> \PackageInfoNoLine{% % scrextend% % typearea% % scrletter% }{% % Switching compatibility level to `#1'% }% % \edef\scr@compatibility{\@nameuse{scr@v@#1}}% % \edef\scr@ta@compatibility{\@nameuse{scr@v@#1}}% \FamilyKeyStateProcessed \KOMA@kav@xreplacevalue{% % \KOMAClassFileName % scrextend.\scr@pkgextension % typearea.\scr@pkgextension % scrletter.\scr@pkgextension }{version}{#1}% \ifnum\scr@compatibility<\scr@v@last % \ClassWarningNoLine{\KOMAClassName}{% %<*package> \PackageWarningNoLine{% % scrextend% % typearea% % scrletter% }{% % 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 Please 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 }% } %\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} %\AtEndOfClass{% %\AtEndOfPackage{% \KOMA@key{version}[]{% % \ClassError{\KOMAClassName}{% %<*package> \PackageError{% % scrextend% % typearea% % scrletter% }{% % Option `version' too late% }{% Option `version' may be set only while loading the % class.\MessageBreak % package.\MessageBreak But you've tried to set it up later.% }% \FamilyKeyStateProcessed }% } % % \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} % \changes{v3.37}{2022/05/04}{added} % \begin{macro}{\scr@v@3.38} % \changes{v3.38}{2022/07/06}{added} % \begin{macro}{\scr@v@3.39} % \changes{v3.39}{2022/10/13}{added} % \begin{macro}{\scr@v@3.40} % \changes{v3.40}{2023/04/17}{added} % \begin{macro}{\scr@v@3.41} % \changes{v3.41}{2023/04/24}{added} % \begin{macro}{\scr@v@3.42} % \changes{v3.42}{2023/07/13}{added} % \begin{macro}{\scr@v@3.43} % \changes{v3.43}{2024/10/22}{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}{20} \@namedef{scr@v@3.38}{20} \@namedef{scr@v@3.39}{20} \@namedef{scr@v@3.40}{20} \@namedef{scr@v@3.41}{21} \@namedef{scr@v@3.42}{21} \@namedef{scr@v@3.43}{3430} \@namedef{scr@v@last}{3430} % \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{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{option} % \begin{macrocode} % % \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} } % % \end{macrocode} % \end{macro} % % \begin{macro}{\scr@v@is@eq} % \changes{v3.39}{2022/10/25}{added} % Similar to the above for equality test. % \begin{macrocode} %<*option&(class|extend)> \newcommand*{\scr@v@is@eq}[1]{% \scr@compatibility=\@nameuse{scr@v@#1} } % % \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} } % % \end{macrocode} % \end{macro} % % \begin{macrocode} % % \end{macrocode} % % \subsection{Compatibility with used \LaTeX{} kernel version} % \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}{% % \ClassWarningNoLine{\KOMAClassName}{% % \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 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}{}{% % \ClassWarningNoLine{\KOMAClassName}{% % \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 % }% }% }% \endgroup } % % \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} %<*!v4> %<*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 % % % \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: