summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/koma-script/scrlfile.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/scrlfile.dtx')
-rw-r--r--Master/texmf-dist/source/latex/koma-script/scrlfile.dtx45
1 files changed, 36 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/scrlfile.dtx b/Master/texmf-dist/source/latex/koma-script/scrlfile.dtx
index b9782c81e57..11809c20fea 100644
--- a/Master/texmf-dist/source/latex/koma-script/scrlfile.dtx
+++ b/Master/texmf-dist/source/latex/koma-script/scrlfile.dtx
@@ -1,7 +1,7 @@
% \iffalse^^A meta-comment
% ======================================================================
% scrlfile.dtx
-% Copyright (c) Markus Kohm, 2002-2020
+% Copyright (c) Markus Kohm, 2002-2021
%
% This file is part of the work `scrlfile' which is part of the LaTeX2e
% KOMA-Script bundle.
@@ -20,7 +20,7 @@
% This work consists of all files listed in manifest.txt.
% ----------------------------------------------------------------------
% scrlfile.dtx
-% Copyright (c) Markus Kohm, 2002-2020
+% Copyright (c) Markus Kohm, 2002-2021
%
% Diese Datei ist Teil des Werks `scrlfile', das wiederum Teil des
% LaTeX2e KOMA-Script Pakets ist.
@@ -40,12 +40,12 @@
% Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
% ======================================================================
%
-%%% From File: $Id: scrlfile.dtx 3537 2020-09-14 07:30:10Z kohm $
+%%% From File: $Id: scrlfile.dtx 3565 2021-02-16 10:43:38Z kohm $
%<*dtx>
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\begingroup
\def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2020-09-14 09:30:10 +0200 (Mon, 14 Sep 2020) $
+ \filedate$Date: 2021-02-16 11:43:38 +0100 (Tue, 16 Feb 2021) $
\def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
\filerevision$Revision: 2631 $
\edef\reserved@a{%
@@ -135,15 +135,42 @@
%
% \section{Implementation of \textsf{scrlfile}}
%
-% We either need to load one of these packages. We could do the decision by
-% testing the \LaTeX{} version. But the existence of macro \cs{AddToHook} is
-% easier and better.
+% We either need to load one of these packages.
+% \changes{v3.33}{2021/02/09}{do not test for existence of \cs{AddToHook} any
+% longer, but \cs{IfFormatAtLeastTF} and the format version}%
+% We cannot do the decision by testing the existence of macro \cs{AddToHook},
+% because package \textsf{latexrelease} does not rollback to prior format
+% versions good enough. Instead of undefining the macro an so really reverting
+% to the definition of \LaTeX{} kernels prior to 2020/10/01 it only redefines
+% it to a do-nothing macro. Because of this and similar issues with
+% \textsf{latexrelease} cannot (or only with provision) be used to simulate a
+% real old \LaTeX{} kernel, i.e. for testing. So the only valid test for the
+% existence of the wanted \cs{AddToHook} would be to test the definite
+% definition of \cs{AddToHook} and the existence of the hooks we are
+% using. But, because this is to much effort, we simply test the format
+% version. Nevertheless, we know, this may fail!
% \begin{macrocode}
-\@ifundefined{AddToHook}{%
+\@ifundefined{IfFormatAtLeastTF}{%
\RequirePackage{scrlfile-patcholdlatex}%
\RequirePackage{xparse}%
+% \end{macrocode}
+% \changes{v3.33}{2021/02/16}{workaround for \textsf{xparse} bug}
+% Explicitly switch of \textsf{expl} syntax because of a
+% \textsf{xparse-2020-10-01} bug in version 2020-02-02.
+% \begin{macrocode}
+ \ExplSyntaxOff
}{%
- \RequirePackage{scrlfile-hook}%
+ \IfFormatAtLeastTF{2020/10/01}{%
+ \RequirePackage{scrlfile-hook}%
+ }{%
+ \RequirePackage{scrlfile-patcholdlatex}%
+ \RequirePackage{xparse}%
+% \end{macrocode}
+% Explicitly switch of \textsf{expl} syntax because of a
+% \textsf{xparse-2020-10-01} bug in version 2020-02-02.
+% \begin{macrocode}
+ \ExplSyntaxOff
+ }%
}
% \end{macrocode}
%