[latex3-commits] [git/LaTeX3-latex3-latex2e] shipout-lastpage: fix logic (7302ea3a)

Frank Mittelbach frank.mittelbach at latex-project.org
Sun May 8 16:04:04 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : shipout-lastpage
Link       : https://github.com/latex3/latex2e/commit/7302ea3a3022786790d5a19f396d92dc2cd1824e

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

commit 7302ea3a3022786790d5a19f396d92dc2cd1824e
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Sun May 8 16:04:04 2022 +0200

    fix logic


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

7302ea3a3022786790d5a19f396d92dc2cd1824e
 base/ltshipout.dtx | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/base/ltshipout.dtx b/base/ltshipout.dtx
index 2daf1c0a..dcc09307 100644
--- a/base/ltshipout.dtx
+++ b/base/ltshipout.dtx
@@ -1014,8 +1014,14 @@
                       \_@@_add_foreground_box:n
                           { \UseHook{shipout/lastpage}
                             \@kernel at after@shipout at lastpage }
+                      \bool_gset_true:N \g_@@_lastpage_handled_bool
+%    \end{macrocode}
+%    We record that we have handled the \hook{shipout/lastpage} hook
+%    but only if we really did.
+% \changes{v1.0m}{2022/05/08}{Handle case where shipout/lastpage is
+%    run too early (gh/813)}
+%    \begin{macrocode}
                     }
-                    \bool_gset_true:N \g_@@_lastpage_handled_bool
                 }
               \@@_finalize_box:
 %    \end{macrocode}





More information about the latex3-commits mailing list.