commit 72159fbf281201f5f1d5669d417073c7175da333
Author: Koji Yokota <yok...@lyx.org>
Date:   Sun Jun 8 10:46:33 2025 +0900

    Accommodate \ensuremath in MathML export of \intertext
    
    Also, fix possible inconsistency of <mrow>
---
 src/mathed/InsetMathIntertext.cpp | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/mathed/InsetMathIntertext.cpp 
b/src/mathed/InsetMathIntertext.cpp
index 8b9003b268..5d100eb53d 100644
--- a/src/mathed/InsetMathIntertext.cpp
+++ b/src/mathed/InsetMathIntertext.cpp
@@ -81,12 +81,18 @@ docstring InsetMathIntertext::name() const
 
 void InsetMathIntertext::mathmlize(MathMLStream & ms) const
 {
-       ms << MTagInline("mtext", "style=\"position:absolute;left:0px\"");
+       ms << MTag("mrow");
+
+       SetMode textmode(ms, true);
+       ms << MTagInline("mtext", "style=\"position:absolute;left:10px\"");
+
        for (size_type i=0; i<cell(0).size(); ++i)
-               ms << cell(0)[i]->asCharInset()->getChar();
+               ms << cell(0)[i];
+
        ms << ETagInline("mtext");
+
        // make a new line
-       ms << ETag("mtd") << ETag("mtr")
+       ms << ETag("mrow") << ETag("mtd") << ETag("mtr")
           << MTag("mtr", "style=\"height:3ex\"") << ETag("mtr")
           << MTag("mtr") << MTag("mtd");
 }
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to