From 2281af8ba8fd52341e706f3979712f3280fcfdad Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Wed, 2 Nov 2022 03:09:43 +0000
Subject: CTAN sync 202211020309

---
 .../latex2e-first-aid-for-external-files.dtx       | 33 +++++++++++++++++++---
 1 file changed, 29 insertions(+), 4 deletions(-)

(limited to 'macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx')

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 1e6e286a73..9bc4969b2c 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
@@ -111,8 +111,8 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\def\LaTeXFirstAidDate{2022/02/20}
-\def\LaTeXFirstAidVersion{v1.0r}
+\def\LaTeXFirstAidDate{2022/10/29}
+\def\LaTeXFirstAidVersion{v1.0u}
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -340,8 +340,6 @@
 %  }%
 %}
 %    \end{macrocode}
-%    
-%
 %
 % \subsection{The \pkg{dinbrief} class first aid}
 %
@@ -406,6 +404,12 @@
 \ExplSyntaxOff
 %    \end{macrocode}
 %
+% \subsection{The \pkg{babel} package}
+%
+% Turn off the \pkg{babel} hack.
+%    \begin{macrocode}
+\AddToHook{file/babel.sty/before}[firstaid]{\def\BabelCaseHack{}}
+%    \end{macrocode}
 %
 %    \begin{macrocode}
 %</kernel>
@@ -586,6 +590,27 @@
 %    \end{macrocode}
 %
 %
+% \subsection{First aid for \pkg{memoir}}
+%
+%  The introduction of \cs{stockheight} and \cs{stockwidth} into the
+%  kernel requires some first aid. This has to go in \emph{before}
+%  loading the class, so we cannot check the version string here.
+%    \begin{macrocode}
+\AddToHook{file/memoir.cls/before}[firstaid]{%
+  \expandafter\def\expandafter\@tempa\string\dimen{}%
+  \edef\kernel@stockheight{\expandafter\@tempa\meaning\stockheight}%
+  \edef\kernel@stockwidth{\expandafter\@tempa\meaning\stockwidth}%
+  \let\stockheight\@undefined
+  \let\stockwidth\@undefined
+}
+\AddToHook{file/memoir.cls/after}[firstaid]{%
+  \dimen\kernel@stockheight=\stockheight
+  \dimen\kernel@stockwidth=\stockwidth
+  \dimendef\stockheight=\kernel@stockheight
+  \dimendef\stockwidth=\kernel@stockwidth
+}
+%    \end{macrocode}
+%
 %
 % \subsection[Temporary fixes for the kernel (until the next
 %             patch-level release)]
-- 
cgit v1.2.3

