engine: a column's \end{minipage} arrives through \column and \end{columns} - #176
Merged
Conversation
…lumns}
beamer opens a column's minipage and defers its \end into \beamer@colclose
(beamerbaseframecomponents.sty:281-283):
\newcommand<>\beamer@columncom[2][\beamer@colmode]{%
\beamer@colclose
\def\beamer@colclose{\end{minipage}\hfill\end{actionenv}\ignorespaces}%
\begin{actionenv}#3…\begin{minipage}…}
so the \end this scan hunts arrives through the NEXT \column, or through
\end{columns} (:237, \endcolumns begins with \beamer@colclose). A raw scan sees
neither: \column takes arguments where the narrow expandsToEnd rule only reaches
parameterless macros, and \end{columns} is stored as somebody else's \end.
Read raw, the first column swallowed its sibling and everything after the frame. A
talk with two columns in a [fragile] frame rendered ONE page of its seven; issue #127
found this and #129 caught only the case where the frame's own file ends there.
Both are now read as what they are: at \column the body ends and \beamer@colclose is
emptied, its \end{minipage} having just been honoured (which is what beamer itself
does after running it, :269); at \end{columns} the \end<columns> body is pushed so
\beamer@colclose, and then its \end{minipage}, surface for the depth bookkeeping.
Measured over 200 beamer talks and 200 arXiv papers: 5 talks change, two of them
moving CLOSER to tectonic and none further — one 1 -> 5 pages (tectonic 7, +2268
glyphs), one 2 -> 4, exactly tectonic's. beamer gains 2885 glyphs and its page error
against the 80 tectonic renders falls 48 -> 42, with one more exact match. arXiv does
not move by one glyph.
This was referenced Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
beamer opens a column's minipage and defers its
\endinto\beamer@colclose:so the
\endthis scan hunts arrives through the next\column, or through\end{columns}(:237 —\endcolumnsbegins with\beamer@colclose). A raw scan sees neither:\columntakes arguments where the narrowexpandsToEndrule only reaches parameterless macros, and\end{columns}is stored as somebody else's\end.Read raw, the first column swallowed its sibling and everything after the frame. A talk with two columns in a
[fragile]frame rendered one page of its seven. Issue #127 found this; #129 caught only the case where the frame's own file ends there, which is why it came back.Both are now read as what they are:
\column, the body ends and\beamer@colcloseis emptied — its\end{minipage}has just been honoured, which is what beamer itself does after running it (:269,\beamer@colclose\def\beamer@colclose{});\end{columns},\end<columns>'s body is pushed so\beamer@colclose, and then its\end{minipage}, surface for the depth bookkeeping.Measured — 200 beamer talks, 200 arXiv papers
5 talks change, two closer to tectonic and none further:
beamer gains +2885 glyphs and its page error against the 80 tectonic renders falls 48 → 42, with one more exact match (62/80). arXiv does not move by one glyph.
Test
columnclosesminipage_test.go: two columns in a[fragile]frame, with a frame on either side — three pages, and the last frame's text must be on the page. Onmainit is one page carrying only the first frame.