diff options
Diffstat (limited to 'macros/latex/base/ltfilehook.dtx')
-rw-r--r-- | macros/latex/base/ltfilehook.dtx | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/macros/latex/base/ltfilehook.dtx b/macros/latex/base/ltfilehook.dtx index 8b5e982591..c8503de891 100644 --- a/macros/latex/base/ltfilehook.dtx +++ b/macros/latex/base/ltfilehook.dtx @@ -31,8 +31,8 @@ %%% From File: ltfilehook.dtx % % \begin{macrocode} -\providecommand\ltfilehookversion{v1.0m} -\providecommand\ltfilehookdate{2022/04/01} +\providecommand\ltfilehookversion{v1.0n} +\providecommand\ltfilehookdate{2022/08/18} % \end{macrocode} % %<*driver> @@ -1513,10 +1513,25 @@ \global\@namedef{@pkg-disable@#1.\@pkgextension}{#2}} % \end{macrocode} % +% \changes{v1.0n}{2022/08/18}{Inhibit checking the loaded version when +% package is load-disabled, and write to the .log (gh/888)} +% Here we check if a control sequence named +% \cs[no-index]{@pkg-disable@\meta{name}.sty} is defined, and if so +% don't use the package loading code |#2|, but use the replacement +% code stored in that control sequence, write something to the log, +% and then prevent \cs{@onefilewithoptions} from sanity-checking the +% requested package date (the \tn{expandafter} here triggers one in +% \cs{@onefilewithoptions} that ends a conditional there, and the +% \tn{@gobbletwo} removes the date checking code from the input +% stream). % \begin{macrocode} \def\@disable@packageload@do#1#2{% - \@ifundefined{@pkg-disable@#1}{#2}% - {\@nameuse{@pkg-disable@#1}}} + \@ifundefined{@pkg-disable@#1}% + {#2}% + {\@nameuse{@pkg-disable@#1}% + \@latex@info{Package '#1' has been disabled.% + \MessageBreak Load request ignored}% + \expandafter\@gobbletwo}} % \end{macrocode} % % \cs{reenable@package@load} undefines |