[LyX/master] DocBook: for MathML, mrow removal for more cases
Thibaut Cuvelier
tcuvelier at lyx.org
Tue May 25 01:44:58 UTC 2021
commit a579128c06a27659313987d0d04e92b564fa8896
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date: Tue May 25 03:29:20 2021 +0200
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
---
src/mathed/InsetMathChar.cpp | 2 --
src/mathed/InsetMathExInt.cpp | 4 ++--
src/mathed/InsetMathScript.cpp | 2 +-
src/mathed/InsetMathSpace.cpp | 7 ++++---
4 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/mathed/InsetMathChar.cpp b/src/mathed/InsetMathChar.cpp
index a02f54b..febc7c8 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 ba8eaa3..4812eec 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 831bc79..36e7ea7 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 fcef36c..f4c4d25 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);
}
More information about the lyx-cvs
mailing list