]> git.lyx.org Git - features.git/commit
InsetMathBox: split the boxed text into <mtext> and other tags, while boxing the...
authorThibaut Cuvelier <tcuvelier@lyx.org>
Sun, 8 Jan 2023 01:27:36 +0000 (02:27 +0100)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Sun, 8 Jan 2023 01:36:48 +0000 (02:36 +0100)
commite70cdfd3a222f12ab25a8c7296b180018bc06381
tree7983db4f24e3e054e92d6e528f2e8d8689493e0c
parentd3c81eb2cbdf1c233042c35fe493cc789cc93647
InsetMathBox: split the boxed text into <mtext> and other tags, while boxing the whole inset within an <mrow>.

Rationales:
- previously, <mstyle> was used, but it's being deprecated for MathML 4 Core in favour of CSS and <mrow> (not a big deal in itself)
- the whole box cannot be hosted within the same tag, because neither <mstyle> nor <mrow> can have text, they need an intermediate container, <mtext> (which cannot hold anything else that pure text)
- new behaviour: always output a container for the whole box that has the right attributes, i.e. an <mrow>; split the content of the cell to have text and other tags set apart (text in <mtext>, other tags left as they were)

Old behaviour, invalid MathML (2 to 4):
<mstyle XXX>text<mn>.</mn></mstyle>

New behaviour, valid MathML:
<mrow XXX><mtext>text</mtext><mn>.</mn></mrow>
src/mathed/InsetMathBox.cpp