Skip to content

feat(html): retain common presentation MathML without TeX annotations - #4833

Draft
Afloat16 wants to merge 1 commit into
Unstructured-IO:mainfrom
Afloat16:Afloat16/html-presentation-mathml-20261121
Draft

Afloat16 wants to merge 1 commit into
Unstructured-IO:mainfrom
Afloat16:Afloat16/html-presentation-mathml-20261121

Conversation

@Afloat16

@Afloat16 Afloat16 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

HTML containing presentation MathML often has neither a TeX annotation nor alttext. The current parser drops such formulas completely. Add a structural fallback for common tokens, grouping, fractions, roots, scripts, over/under expressions, fences and matrices.

Existing TeX annotations and alttext keep priority. Unsupported nodes, malformed argument counts and unhandled fraction-line semantics reject the expression as a whole so paired KaTeX visual output remains available. Inline tails, display boundaries and page metadata retain their existing behavior. This is a bounded set of presentation constructs rather than a general MathML layout engine.

Validation

Fifteen new extraction cases fail on main and pass after the change. The new tests and complete HTML partition/parser suites pass: 364 passed. Existing fallback fixtures now use unsupported maction, since their former simple mi expressions are now supported; the former raw-expression omission assertion is updated to the new extraction behavior. Full repository tests remain pending, so this is a draft.

Reference: https://www.w3.org/TR/MathML3/chapter3.html

This branch has not been deployed

No deployments
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.

1 participant