summaryrefslogtreecommitdiff
path: root/macros/latex/required/firstaid
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/required/firstaid')
-rw-r--r--macros/latex/required/firstaid/changes.txt7
-rw-r--r--macros/latex/required/firstaid/firstaid.ins13
-rw-r--r--macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx127
-rw-r--r--macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdfbin205202 -> 228448 bytes
4 files changed, 135 insertions, 12 deletions
diff --git a/macros/latex/required/firstaid/changes.txt b/macros/latex/required/firstaid/changes.txt
index c97129e31f..d7823c21a1 100644
--- a/macros/latex/required/firstaid/changes.txt
+++ b/macros/latex/required/firstaid/changes.txt
@@ -6,6 +6,13 @@
We also fix \FN@allmarks which can blow as it loops using the
wrong counter (so the loops runs a random number of times)
+2021-01-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx:
+ Add replacement code for everysel package.
+ Add first aid for CJK (as it overwrite \selectfont with an
+ old definition).
+
2020-12-14 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
* latex2e-first-aid-for-external-files.dtx:
diff --git a/macros/latex/required/firstaid/firstaid.ins b/macros/latex/required/firstaid/firstaid.ins
index 9965480f20..cd5ea2006d 100644
--- a/macros/latex/required/firstaid/firstaid.ins
+++ b/macros/latex/required/firstaid/firstaid.ins
@@ -3,8 +3,8 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright (C) 2020
-%% The LaTeX3 Project and any individual authors listed elsewhere
+%% Copyright (C) 2020-2021
+%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
%% This file is part of the Standard LaTeX `First Aid Bundle'.
@@ -44,8 +44,8 @@ reports for it can be opened at https://latex-project.org/bugs/
(but please observe conditions on bug reports sent to that address!)
-Copyright (C) 2020
-The LaTeX3 Project and any individual authors listed elsewhere
+Copyright (C) 2020-2021
+The LaTeX Project and any individual authors listed elsewhere
in this file.
This file was generated from file(s) of the Standard LaTeX `First Aid Bundle'.
@@ -70,6 +70,9 @@ without such generated files.
{\from{latex2e-first-aid-for-external-files.dtx}{kernel}}}
\generate{\file{filehook-ltx.sty}
- {\from{latex2e-first-aid-for-external-files.dtx}{filehook}}}
+ {\from{latex2e-first-aid-for-external-files.dtx}{filehook-ltx}}}
+
+\generate{\file{everysel-ltx.sty}
+ {\from{latex2e-first-aid-for-external-files.dtx}{everysel-ltx}}}
\endbatchfile
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 \\
diff --git a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
index 1bf28e4760..2e9c812fd0 100644
--- a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
+++ b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
Binary files differ