From e57f18e4efd59b6dfa590000b4edf3cd61afc546 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 30 Oct 2020 21:00:46 +0000 Subject: firstaid (30oct20) git-svn-id: svn://tug.org/texlive/trunk@56812 c570f23f-e606-0410-a88d-b1316a301751 --- .../latex2e-first-aid-for-external-files.dtx | 54 +++++++++++++++++++++- 1 file changed, 52 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/source/latex/firstaid') diff --git a/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx b/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx index 09c32101be9..384242e82c1 100644 --- a/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx +++ b/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx @@ -110,8 +110,8 @@ % \end{macrocode} % % \begin{macrocode} -\def\LaTeXFirstAidDate{2020/10/25} -\def\LaTeXFirstAidVersion{v1.0g} +\def\LaTeXFirstAidDate{2020/10/29} +\def\LaTeXFirstAidVersion{v1.0h} % \end{macrocode} % % \begin{macrocode} @@ -346,6 +346,56 @@ % % % +% +% \subsection{The \pkg{pgfpages} and \pkg{pgfmorepages} first aid} +% +% \pkg{pgfpages} alters the \cs{shipout} primitive to support +% multiple page up scenarios. If used together with \pkg{atbegshi} +% that worked because the alterations done by \pkg{atbegshi} came +% later and so used the new definition provide by +% \pkg{pgfpages}. Now that the code from \pkg{atbegshi} is already +% in the kernel this further redefinition doesn't happen with the +% result that the change to \cs{shipout} comes to late and +% breaks the kernel processes. +% +% \begin{macrocode} +\ExplSyntaxOn +\AddToHook{file/after/pgfpages.sty}[firstaid]{% +% \end{macrocode} +% Undo overwriting \cs{shipout}: +% \begin{macrocode} + \cs_gset_eq:NN \shipout \pgfpages@originalshipout +% \end{macrocode} +% Instead overwrite the L3 programming layer name of the +% primitive. This is really an absolute no-go, but for now the +% simplest solution to keep the original code running. +% +% It will be replaced when the ``configuration points'' interface +% for \LaTeX{} becomes available. At that point the package will be +% able to set up a different strategy for doing shipouts and +% without the need to overrite a primitive (which it did in the +% past and which we do below) and then this code here can be taken +% out again. +% \begin{macrocode} + \cs_set_eq:NN \pgfpages@originalshipout \tex_shipout:D + \cs_set_eq:NN \tex_shipout:D \pgfpages@interceptshipout +} +\ExplSyntaxOff +% \end{macrocode} +% +% Same issue with \pkg{pgfmorepages}. +% +% \begin{macrocode} +\ExplSyntaxOn +\AddToHook{file/after/pgfmorepages.sty}[firstaid]{% + \cs_gset_eq:NN \shipout \pgfpages@originalshipout + \cs_set_eq:NN \pgfpages@originalshipout \tex_shipout:D + \cs_set_eq:NN \tex_shipout:D \pgfpages@interceptshipout +} +\ExplSyntaxOff +% \end{macrocode} +% +% % \subsection[Temporary fixes for the kernel (until the next % patch-level release)] % {Temporary fixes for the kernel \\ -- cgit v1.2.3