summaryrefslogtreecommitdiff
path: root/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx')
-rw-r--r--macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx127
1 files changed, 120 insertions, 7 deletions
diff --git a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
index 1ce357d6d3..7eb108418c 100644
--- a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
+++ b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
@@ -1,6 +1,7 @@
% \iffalse meta-comment
%
-%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020
+%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020-2021
+%%
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%
@@ -111,7 +112,7 @@
%
% \begin{macrocode}
\def\LaTeXFirstAidDate{2021/03/15}
-\def\LaTeXFirstAidVersion{v1.0j}
+\def\LaTeXFirstAidVersion{v1.0l}
% \end{macrocode}
%
% \begin{macrocode}
@@ -183,7 +184,7 @@
%\end{verbatim}
%
% \begin{macrocode}
-%<*filehook>
+%<*filehook-ltx>
% \end{macrocode}
%
% \begin{macrocode}
@@ -273,7 +274,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-%</filehook>
+%</filehook-ltx>
% \end{macrocode}
%
%
@@ -306,7 +307,7 @@
\AddToHook{file/after/biditools.sty}[firstaid]{%
\FirstAidNeededT{biditools}{sty}%
{2020/05/13 v2 Programming tools for bidi package}%
- {
+ {%
% \end{macrocode}
% \pkg{bidi} adds some code to the beginning of \cs{document} which
% contains \cs{endgroup} and \cs{begingroup} which is no longer
@@ -327,7 +328,7 @@
\AddToHook{enddocument/info}%
{\let\bidi@AfterEndDocumentCheckLabelsRerun\@firstofone
\bidi@afterenddocumentchecklabelsrerunhook}%
- }
+ }%
}
% \end{macrocode}
%
@@ -397,6 +398,119 @@
% \end{macrocode}
%
%
+% \begin{macrocode}
+%</kernel>
+% \end{macrocode}
+%
+%
+%
+%
+%
+% \subsection{The \pkg{everysel} package first aid}
+%
+%
+% The \cs{selectfont} command got a hook (with the 2021/05 release) which
+% was originally provided by the \pkg{everysel}
+% package. Now that it is in the kernel this package is no longer
+% needed (or only in a simplified manner).
+%
+% If it is requested we replace it with a simplified package
+% (until) it gets updated at which point this line can be removed.
+% \changes{v2.2k}{2020/12/04}{Emulate everysel package}
+% \begin{macrocode}
+%<*kernel>
+% this has been updated
+%\declare@file@substitution{everysel.sty}{everysel-ltx.sty}
+%</kernel>
+% \end{macrocode}
+%
+%
+%
+% \begin{macrocode}
+%<*everysel-ltx>
+\ProvidesPackage{everysel-ltx}
+ [2020/12/04 v1.0a
+ Emulation of the original everysel^^Jpackage with kernel methods]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand*{\EverySelectfont}[1]
+ {\AddToHook{selectfont}{#1}}
+\newcommand*{\AtNextSelectfont}[1]
+ {\AddToHookNext{selectfont}{#1}}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+%</everysel-ltx>
+% \end{macrocode}
+%
+%
+%
+%
+%
+% \subsection{The \pkg{CJK} package first aid}
+%
+% \begin{macrocode}
+%<*kernel>
+% \end{macrocode}
+%
+% The package redefines \cs{selectfont} to add some code but
+% otherwise uses the old definition. So we make a copy of the
+% newer kernel definition and restore it after the package got
+% loaded. The extra code that the package needs can go into the
+% newly provided hook instead.
+%
+% \begin{macrocode}
+\DeclareCommandCopy\CJK@selectfont\selectfont
+% \end{macrocode}
+%
+% \begin{macrocode}
+\AddToHook{file/after/CJK.sty}[firstaid]{%
+ \FirstAidNeededT{CJK}{sty}%
+ {2015/04/18 4.8.4}%
+ {%
+ \DeclareCommandCopy\selectfont\CJK@selectfont
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \AddToHook{selectfont}[CJK]{%
+ \expandafter\ifx\csname CJK@\curr@fontshape\endcsname \relax
+ \else
+ \CJK@bold@false
+ \csname CJK@\curr@fontshape\endcsname
+ \fi
+ }%
+ }%
+}
+% \end{macrocode}
+%
+%
+%
+% \subsection{\cs{footref} first aid}
+%
+% A few classes unconditionally define \cs{footref}. Until that has
+% changed we provide some first aid to let them do this.
+%
+% \begin{macrocode}
+\AddToHook{file/after/scrkbase.sty}[firstaid]{%
+ \FirstAidNeededT{scrkbase}{sty}%
+ {2020/09/21 v3.32 KOMA-Script package (KOMA-Script-dependent basics and keyval usage)}%
+ {\let\footref\@undefined}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\AddToHook{class/before/memoir}[firstaid]{%
+ % for version {2020/10/04 v3.7n configurable book, report, article document class}%
+ \let\footref\@undefined
+}
+% \end{macrocode}
+%
+%
+%
+%
+%
% \subsection{The \pkg{bigfoot} first aid}
%
% The \pkg{bigfoot} packages makes the assumption that two
@@ -432,7 +546,6 @@
%
%
%
-%
% \subsection[Temporary fixes for the kernel (until the next
% patch-level release)]
% {Temporary fixes for the kernel \\