Skip to content

Fix: if the outer mrow has a intent - #27

Open
pablgonz wants to merge 1 commit into
latex3:mainfrom
pablgonz:main
Open

pablgonz wants to merge 1 commit into
latex3:mainfrom
pablgonz:main

Conversation

@pablgonz

@pablgonz pablgonz commented Aug 5, 2026

Copy link
Copy Markdown

Closes #26

Single condition added in to_math (luamml-convert.lua line 676):

-- before:
if root[0] == 'mrow' then
  root[0] = 'math'

-- after:
if root[0] == 'mrow' and not has_relevant_attributes(root) then
  root[0] = 'math'
else
  root = {[0] = 'math', root}
end

The current behavior was introduced on 2025-05-30 (tagging-project#856) to fix Firefox rendering of <math><mrow>...</mrow></math>. This fix may reintroduce that issue for formulas where the root <mrow> carries attributes.

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.

to_math renames <mrow> with relevant attributes (intent) to <math>, losing correct nesting

1 participant