[latex3-commits] [git/LaTeX3-latex3-latex2e] marks: handle \@outputbox as hbox (ae0e9f7b)

Frank Mittelbach frank.mittelbach at latex-project.org
Sun Apr 3 21:20:06 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : marks
Link       : https://github.com/latex3/latex2e/commit/ae0e9f7b96c8e5bb34c40be15a49b7ece5af25b0

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

commit ae0e9f7b96c8e5bb34c40be15a49b7ece5af25b0
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Sun Apr 3 21:20:06 2022 +0200

    handle \@outputbox as hbox


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

ae0e9f7b96c8e5bb34c40be15a49b7ece5af25b0
 base/ltmarks.dtx | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/base/ltmarks.dtx b/base/ltmarks.dtx
index 9282141b..82666833 100644
--- a/base/ltmarks.dtx
+++ b/base/ltmarks.dtx
@@ -1204,8 +1204,20 @@
 %    \end{macrocode}
 %    First we update the \texttt{page} region (which also updates the
 %    \texttt{previous-page}.
-%    \begin{macrocode}
-  \@@_update_structure:nn {page}{ \unvcopy\@outputbox }
+  %    \begin{macrocode}
+  \@@_update_structure:nn {page}
+     {
+%    \end{macrocode}
+%    The \cs{@outputbox} is normally in \cs{vbox} in \LaTeX{} but we
+%    can't take that for granted (an \textt{amsmath} test document
+%    changed it to an \cs{hbox} just to trip me up) so we are a little
+%    careful with unpack now.
+%    \begin{macrocode}
+       \box_if_vertical:NTF \@outputbox
+           { \vbox_unpack:N }
+           { \hbox_unpack:N }
+       \@outputbox
+     }
 %    \end{macrocode}
 %    The we provide the necessary updates for the aliases.
 %    \begin{macrocode}





More information about the latex3-commits mailing list.