]> git.lyx.org Git - features.git/commitdiff
DocBook: for MathML, mrow removal for more cases
authorThibaut Cuvelier <tcuvelier@lyx.org>
Tue, 25 May 2021 01:29:20 +0000 (03:29 +0200)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Tue, 25 May 2021 01:29:20 +0000 (03:29 +0200)
By lynx: https://www.lyx.org/trac/attachment/ticket/12221/0003-tag-insertion-unification-for-bold-char-delim-dots-exfunc-.patch

src/mathed/InsetMathChar.cpp
src/mathed/InsetMathExInt.cpp
src/mathed/InsetMathScript.cpp
src/mathed/InsetMathSpace.cpp

index a02f54b43ac376f73f69894b0bb4c16c96d903f5..febc7c8a31626cfdc7f8c059da8dfb1cfe4c2513 100644 (file)
@@ -36,8 +36,6 @@ using namespace std;
 
 namespace lyx {
 
-extern bool has_math_fonts;
-
 
 namespace {
 latexkeys const * makeSubstitute(char_type c)
index ba8eaa30b94b377fa0e670871f91e0d078a33236..4812eec997eaf89f4bd779dfa869e78ec36bd0f5 100644 (file)
@@ -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)
index 831bc797eab8124ed2271bb9d3758fa0a03d1d7a..36e7ea70eaf7cb440d5c13b4333613d4672c54a3 100644 (file)
@@ -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");
index fcef36c1a1ca50eb829661e2ac099e66f8f063ed..f4c4d25f1ce117ab5fdbe58df7b9e7b0ea3109a2 100644 (file)
@@ -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);
 }