DocBook: for MathML, mrow removal from decoration, script, frac

By lynx: https://www.lyx.org/trac/attachment/ticket/12221/0002-mrow-removal-from-decoration-script-frac.patch
This commit is contained in:
Thibaut Cuvelier 2021-05-25 03:15:48 +02:00
parent e4996026b7
commit 1cbac6fcb4
3 changed files with 12 additions and 10 deletions

View File

@ -246,7 +246,7 @@ void InsetMathDecoration::mathmlize(MathMLStream & ms) const
char const * const outag = cur->second.over ? "mover" : "munder";
std::string decoration = ms.xmlMode() ? cur->second.entity : cur->second.tag;
ms << MTag(outag)
<< MTag("mrow") << cell(0) << ETag("mrow")
<< cell(0)
<< "<" << from_ascii(ms.namespacedTag("mo")) << " stretchy=\"true\">"
<< from_ascii(decoration)
<< "</" << from_ascii(ms.namespacedTag("mo")) << ">"

View File

@ -521,15 +521,15 @@ void InsetMathFrac::mathmlize(MathMLStream & ms) const
case CFRACRIGHT:
case AASTEX_CASE:
ms << MTag("mfrac")
<< MTag("mrow") << cell(0) << ETag("mrow")
<< MTag("mrow") << cell(1) << ETag("mrow")
<< cell(0)
<< cell(1)
<< ETag("mfrac");
break;
case NICEFRAC:
ms << MTag("mfrac", "bevelled='true'")
<< MTag("mrow") << cell(0) << ETag("mrow")
<< MTag("mrow") << cell(1) << ETag("mrow")
<< cell(0)
<< cell(1)
<< ETag("mfrac");
break;
@ -537,8 +537,8 @@ void InsetMathFrac::mathmlize(MathMLStream & ms) const
if (nargs() == 3)
ms << cell(2);
ms << MTag("mfrac", "bevelled='true'")
<< MTag("mrow") << cell(0) << ETag("mrow")
<< MTag("mrow") << cell(1) << ETag("mrow")
<< cell(0)
<< cell(1)
<< ETag("mfrac");
break;

View File

@ -617,7 +617,7 @@ void InsetMathScript::mathmlize(MathMLStream & ms) const
ms << MTag(l ? "munder" : "msub");
if (!nuc().empty())
ms << MTag("mrow") << nuc() << ETag("mrow");
ms << nuc();
else
ms << "<" << from_ascii(ms.namespacedTag("mrow")) << " />";
@ -626,9 +626,11 @@ void InsetMathScript::mathmlize(MathMLStream & ms) const
<< MTag("mrow") << up() << ETag("mrow")
<< ETag(l ? "munderover" : "msubsup");
else if (u)
ms << MTag("mrow") << up() << ETag("mrow") << ETag(l ? "mover" : "msup");
ms << MTag("mrow") << up() << ETag("mrow")
<< ETag(l ? "mover" : "msup");
else if (d)
ms << MTag("mrow") << down() << ETag("mrow") << ETag(l ? "munder" : "msub");
ms << MTag("mrow") << down() << ETag("mrow")
<< ETag(l ? "munder" : "msub");
}