[latex3-commits] [git/LaTeX3-latex3-latex2e] stocksize: Set up firstaid for memoir (4e9f5bd6)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Aug 26 23:32:14 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : stocksize
Link       : https://github.com/latex3/latex2e/commit/4e9f5bd6c0d43d90877fc190e5bb5eb373807a65

>---------------------------------------------------------------

commit 4e9f5bd6c0d43d90877fc190e5bb5eb373807a65
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Jun 23 13:59:18 2022 +0100

    Set up firstaid for memoir


>---------------------------------------------------------------

4e9f5bd6c0d43d90877fc190e5bb5eb373807a65
 .../latex2e-first-aid-for-external-files.dtx       | 25 ++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/required/firstaid/latex2e-first-aid-for-external-files.dtx b/required/firstaid/latex2e-first-aid-for-external-files.dtx
index 1e6e286a..2a1e2a8d 100644
--- a/required/firstaid/latex2e-first-aid-for-external-files.dtx
+++ b/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/06/23}
+\def\LaTeXFirstAidVersion{v1.0s}
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -586,6 +586,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 at stockheight{\expandafter\@tempa\meaning\stockheight}%
+  \edef\kernel at stockwidth{\expandafter\@tempa\meaning\stockwidth}%
+  \let\stockheight\@undefined
+  \let\stockwidth\@undefined
+}
+\AddToHook{file/memoir.cls/after}[firstaid]{%
+  \dimen\kernel at stockheight=\stockheight
+  \dimen\kernel at stockwidth=\stockwidth
+  \dimendef\stockheight=\kernel at stockheight
+  \dimendef\stockwidth=\kernel at stockwidth
+}
+%    \end{macrocode}
+%
 %
 % \subsection[Temporary fixes for the kernel (until the next
 %             patch-level release)]





More information about the latex3-commits mailing list.