[WiP] Leavehorizontal#2798
Open
brucemiller wants to merge 24 commits into
Open
Conversation
dginev
approved these changes
Apr 23, 2026
… display-math mode; introduce a new pseudo-mode inline_internal_vertical which does NOT leaveHorizontal, for (essentially) inline blocks
… mode=inline_internal_vertical for those that are vertical inside, but do not leaveHorizontal; Remove the mistaken \par from the various itemization environments
…turn for later inclusion so that the items can be affected by later items or primitives
…eturn the list of boxes
…djust size to account for lines
…have reasonable sizing
…which does NOT rebind LaTeXML::LIST, which is needed for digesting T_BEGIN
…t gets all properties
…Make \multicolumn copy the new spec into the alignment, so properties preserved; when storing column data get data from correct column when it was spanned
…{}, and also process the contents with \hsize set for proper sizing
f347adb to
dda21ba
Compare
…|right|left); tweak debug feedback more informative, less noisy
…ing; support properties for padding, totalheight
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.
This PR corrects the mode of many commands and environments to
internal_vertical. When entering a vertical mode, we generally must "finish the paragraph being built", which means that$stomach->beginMode('internal_vertical');(ordisplay_math) should callleaveHorizontalin order to pack up any previously digested boxes into a horizontal (paragraph) list. However, a number of commands, notably\vbox, are actually vertical inside, but stay in the flow; that is they are inline-blocks. For these we introduce a variant modeinline_internal_vertical, which does not callleaveHorizontal.In the process of testing, it was discovered that hooks, which often cause material to be processed by
beforeDigestdaemons defer inserting them into the@LaTeXML::LIST, so that they fail to be collected by such repacking. So,beforeDigest,at the very least, should not be deferred but immediately pushed onto@LIST. It is probably the case that many other such deferred pushes should be immediate, but this will take some care.This PR is a preliminary to addressing the issues raised in #2789; it avoids the need for
$font->computeBoxesSizeto attempt to guess whether the boxes failed to be repacked into a paragraph. (This PR does not yet recover the sizing improvements of #2789, however; There are many other useful bits there!).