Keep end-of-block diamond glued to its content across page breaks#103
Merged
Conversation
\Exercise / \Theorem / \Example / \Problem all close with a \endblock diamond. Previously \leftbar always emitted two breakable medskips of trailing glue, so when the closing diamond followed inline content (review-mode solution, \Theorem proof, review-mode example, review-mode problem) it could land on a fresh page detached from the block above. Adds a \LeftbarOpen flag set by callers just before \leftbar when inline content follows in the same logical block; \leftbar then emits a single \nobreak\kern\medskipamount\nobreak instead of the breakable medskips, forbidding a page break between the bar and the diamond. Default tail behavior is unchanged.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
\Exercise/\Theorem/\Example/\Problemall close with an\endblockdiamond. Previously\leftbaralways emitted two breakable medskips of trailing glue, so when the closing diamond followed inline content (review-mode solution,\Theoremproof, review-mode example, review-mode problem) it could land on a fresh page detached from the block above.\LeftbarOpenflag set by callers just before\leftbarwhen inline content follows in the same logical block;\leftbarthen emits a single\nobreak\kern\medskipamount\nobreakinstead of the breakable medskips, forbidding a page break between the bar and the diamond.\leftbarcalls.