From: Thibaut Cuvelier Date: Tue, 25 May 2021 01:29:20 +0000 (+0200) Subject: DocBook: for MathML, mrow removal for more cases X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a579128c06a27659313987d0d04e92b564fa8896;p=features.git DocBook: for MathML, mrow removal for more cases By lynx: https://www.lyx.org/trac/attachment/ticket/12221/0003-tag-insertion-unification-for-bold-char-delim-dots-exfunc-.patch --- diff --git a/src/mathed/InsetMathChar.cpp b/src/mathed/InsetMathChar.cpp index a02f54b43a..febc7c8a31 100644 --- a/src/mathed/InsetMathChar.cpp +++ b/src/mathed/InsetMathChar.cpp @@ -36,8 +36,6 @@ using namespace std; namespace lyx { -extern bool has_math_fonts; - namespace { latexkeys const * makeSubstitute(char_type c) diff --git a/src/mathed/InsetMathExInt.cpp b/src/mathed/InsetMathExInt.cpp index ba8eaa30b9..4812eec997 100644 --- a/src/mathed/InsetMathExInt.cpp +++ b/src/mathed/InsetMathExInt.cpp @@ -142,9 +142,9 @@ void InsetMathExInt::mathmlize(MathMLStream & ms) const sym.mathmlize(ms); ms << ETag("mrow"); if (lower) - ms << MTag("mrow") << cell(2) << ETag("mrow"); + ms << cell(2); if (upper) - ms << MTag("mrow") << cell(3) << ETag("mrow"); + ms << cell(3); if (lower && upper) ms << ETag("msubsup"); else if (lower) diff --git a/src/mathed/InsetMathScript.cpp b/src/mathed/InsetMathScript.cpp index 831bc797ea..36e7ea70ea 100644 --- a/src/mathed/InsetMathScript.cpp +++ b/src/mathed/InsetMathScript.cpp @@ -624,7 +624,7 @@ void InsetMathScript::mathmlize(MathMLStream & ms) const if (!nuc().empty()) ms << nuc(); else - ms << "<" << from_ascii(ms.namespacedTag("mrow")) << " />"; + ms << CTag("mrow"); if (d) ms << MTag("mrow") << down() << ETag("mrow"); diff --git a/src/mathed/InsetMathSpace.cpp b/src/mathed/InsetMathSpace.cpp index fcef36c1a1..f4c4d25f1c 100644 --- a/src/mathed/InsetMathSpace.cpp +++ b/src/mathed/InsetMathSpace.cpp @@ -209,10 +209,11 @@ void InsetMathSpace::mathmlize(MathMLStream & ms) const l = ss.str() + "px"; } - ms << "<" << from_ascii(ms.namespacedTag("mspace")); + std::string attr; if (!l.empty()) - ms << " width=\"" << from_ascii(l) << "\""; - ms << " />"; + attr = "width=\"" + l + "\""; + + ms << CTag("mspace", attr); }