Skip to content

[WiP] Leavehorizontal#2798

Open
brucemiller wants to merge 24 commits into
masterfrom
leavehorizontal
Open

[WiP] Leavehorizontal#2798
brucemiller wants to merge 24 commits into
masterfrom
leavehorizontal

Conversation

@brucemiller
Copy link
Copy Markdown
Owner

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'); (or display_math) should call leaveHorizontal in 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 mode inline_internal_vertical, which does not call leaveHorizontal.

In the process of testing, it was discovered that hooks, which often cause material to be processed by beforeDigest daemons 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->computeBoxesSize to 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!).

@brucemiller brucemiller requested a review from dginev as a code owner April 23, 2026 21:24
… 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
…which does NOT rebind LaTeXML::LIST, which is needed for digesting T_BEGIN
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants