[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/pgfpages: first aid for pgfpages (74232f1d)

Frank Mittelbach frank.mittelbach at latex-project.org
Wed Oct 28 15:35:09 CET 2020


Repository : https://github.com/latex3/latex2e
On branch  : hotfix/pgfpages
Link       : https://github.com/latex3/latex2e/commit/74232f1d53e115cdd0d62c49a769459e27476dee

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

commit 74232f1d53e115cdd0d62c49a769459e27476dee
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Wed Oct 28 15:35:09 2020 +0100

    first aid for pgfpages


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

74232f1d53e115cdd0d62c49a769459e27476dee
 required/firstaid/changes.txt                      |  6 +++
 .../latex2e-first-aid-for-external-files.dtx       | 44 +++++++++++++++++++++-
 2 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/required/firstaid/changes.txt b/required/firstaid/changes.txt
index b4fef50c..83edcb96 100644
--- a/required/firstaid/changes.txt
+++ b/required/firstaid/changes.txt
@@ -1,3 +1,9 @@
+2020-10-28  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* latex2e-first-aid-for-external-files.dtx:
+	Add temporary aid for pgfpages. To be replaced when LaTeX offers
+	configuration point interfaces.
+
 2020-10-25  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* latex2e-first-aid-for-external-files.dtx
diff --git a/required/firstaid/latex2e-first-aid-for-external-files.dtx b/required/firstaid/latex2e-first-aid-for-external-files.dtx
index 09c32101..4c89a9aa 100644
--- a/required/firstaid/latex2e-first-aid-for-external-files.dtx
+++ b/required/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/28}
+\def\LaTeXFirstAidVersion{v1.0h}
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -346,6 +346,46 @@
 %
 %
 %
+%
+% \subsection{The \pkg{pgfpages} package 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]{%
+  \FirstAidNeededT{pgfpages}{sty}{2011/01/05~ ver~ 0.02}{%
+%    \end{macrocode}
+%    Undo overwriting \cs{shipout}:
+%    \begin{macrocode}
+    \cs_gset_eq:NN \shipout \pgfpages at 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 at originalshipout \tex_shipout:D
+    \cs_set_eq:NN \tex_shipout:D \pgfpages at interceptshipout
+  }%
+}
+\ExplSyntaxOff
+%    \end{macrocode}
+%
+%
 % \subsection[Temporary fixes for the kernel (until the next
 %             patch-level release)]
 %    {Temporary fixes for the kernel \\





More information about the latex3-commits mailing list.