Two \column's in a frame no longer cost a page break - #215
Merged
Conversation
beamer's \beamer@colclose is not just an \end{minipage}:
\def\beamer@colclose{\end{minipage}\hfill\end{actionenv}\ignorespaces}
(beamerbaseframecomponents.sty:283)
A body scanner that meets the next \column has honoured only its first half — the
\end{minipage} — but emptied the WHOLE macro, dropping the \end{actionenv} that
pairs with the \begin{actionenv} the column opened. Two columns then left an
environment group open, the \end{frame} that followed closed THAT instead of the
frame, and the next frame never began its own page. With material after
\end{columns} the pages even came out in the wrong order: the text that followed
the columns on the page BEFORE the frame's own content.
So only the honoured half is dropped now. This needed #214 first: the talk that
made the naive version look like a regression has an lstlisting in its first
column, and the listing was eating the column.
Measured against tectonic, with #214 in: beamer page error 40 → 38 over 79 talks,
62 → 63 exact — 0029f300 goes 5 → 7 pages against a reference of 7, and
039a234b02c5 keeps its 4 pages while drawing 1307 → 1493 glyphs. arXiv unchanged
at 583 over 157 papers.
Closes #205.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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@colcloseis not just an\end{minipage}:A body scanner that meets the next
\columnhas honoured only its first half — the\end{minipage}— but emptied the whole macro, dropping the\end{actionenv}that pairs with the
\begin{actionenv}the column opened. Two columns then left anenvironment group open, the
\end{frame}that followed closed that instead ofthe frame, and the next frame never began its own page. With material after
\end{columns}the pages even came out in the wrong order — the text following thecolumns landed on the page before the frame's own content.
Now only the honoured half is dropped.
Why this took two goes
The first attempt at this (branch
beamer-colclose, measured in #205) looked like aregression: it fixed the synthetic cases and one real talk while breaking another,
039a234b02c5, whose first column holds anlstlisting. That talk was not acounter-example to the fix — it was #214: the listing was reading its body from the
character buffer and eating the column. With #214 merged, the two compose.
Measured against tectonic
0029f300039a234b02c5Tests
colCloseAfterEndMinipageis unit-tested — the tail kept, a closer with no leading\end{minipage}left alone, an empty one left empty. The whole-document test needsthe real beamer class (the built-in emulation makes
\columna\parand neveropens an actionenv, so it cannot show the defect); it skips with a stated reason
where the tree is absent rather than passing for the wrong one.
Closes #205.
🤖 Generated with Claude Code