diff options
Diffstat (limited to 'macros/latex/contrib/koma-script/source/scrlfile-hook.dtx')
-rw-r--r-- | macros/latex/contrib/koma-script/source/scrlfile-hook.dtx | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/macros/latex/contrib/koma-script/source/scrlfile-hook.dtx b/macros/latex/contrib/koma-script/source/scrlfile-hook.dtx index 9ebbd46ee4..7dc937a5df 100644 --- a/macros/latex/contrib/koma-script/source/scrlfile-hook.dtx +++ b/macros/latex/contrib/koma-script/source/scrlfile-hook.dtx @@ -45,9 +45,9 @@ \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2021-03-02 08:40:05 +0100 (Tue, 02 Mar 2021) $ + \filedate$Date: 2021-04-21 12:11:38 +0200 (Wed, 21 Apr 2021) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 3574 $ + \filerevision$Revision: 3593 $ \edef\reserved@a{% \noexpand\endgroup \noexpand\ProvidesFile{scrlfile-hook.dtx}% @@ -147,19 +147,35 @@ %<@@=scrlfile> % \end{macrocode} % -% Test whether the uses \LaTeX{} provides all commands we need. +% Test whether the used \LaTeX{} provides all commands we need. +% \changes{v3.34}{2021/04/21}{make it more robust agains not recommended +% direct usage} % \begin{macrocode} -\@ifundefined{AddToHook}{% - \PackageError{scrlfile-hook}{LaTeX too old for this package}{% - \string\AddToHook\space of LaTeX 2020-10-01 or newer is - needed.\MessageBreak - Please update LaTeX or use package scrlfile-patch instead of\MessageBreak - scrlfile-hook.\MessageBreak - If you would continue, I will try to load scrlfile-patch +\@ifundefined{IfFormatAtLeastTF}{% + \PackageError{scrlfile-hook}{not recommended usage of package}{% + It seems this package has been loaded directly using a LaTeX + version\MessageBreak + prior to 2020-10-01. This is not recommend. Please always load + package\MessageBreak + scrlfile instead of scrlfile-hook.\MessageBreak + If you would continue, I will try to load scrlfile-patcholdlatex% }% - \RequirePackage{scrlfile-patch}% + \RequirePackage{scrlfile-patcholdlatex}% \endinput -}{} +}{% + \IfFormatAtLeastTF{2020/10/01}{}{% + \PackageError{scrlfile-hook}{LaTeX too old for this package}{% + It seems this package has been loaded directly using a LaTeX + version\MessageBreak + prior to 2020-10-01. This is not recommend. Please always load + package\MessageBreak + scrlfile instead of scrlfile-hook.\MessageBreak + If you would continue, I will try to load scrlfile-patcholdlatex% + }% + \RequirePackage{scrlfile-patcholdlatex}% + \endinput + }{}% +} % \end{macrocode} % % |