commit 094e9e516db8c4daa00d2b98d90a6d360d89b962
Author: Koji Yokota <[email protected]>
Date:   Sat May 10 22:37:45 2025 +0900

    Add support for DocBook/ePub export
---
 src/mathed/InsetMathIntertext.cpp | 14 ++++++++++++++
 src/mathed/InsetMathIntertext.h   |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/src/mathed/InsetMathIntertext.cpp 
b/src/mathed/InsetMathIntertext.cpp
index 4d054ed14b..62ab98b322 100644
--- a/src/mathed/InsetMathIntertext.cpp
+++ b/src/mathed/InsetMathIntertext.cpp
@@ -15,6 +15,7 @@
 #include "Buffer.h"
 #include "BufferView.h"
 #include "Dimension.h"
+#include "InsetMathChar.h"
 #include "LaTeXFeatures.h"
 #include "MathData.h"
 #include "MathFactory.h"
@@ -79,6 +80,19 @@ docstring InsetMathIntertext::name() const
 }
 
 
+void InsetMathIntertext::mathmlize(MathMLStream & ms) const
+{
+       ms << MTagInline("mtext", "style=\"position:absolute;left:0px\"");
+       for (size_type i=0; i<cell(0).size(); ++i)
+               ms << cell(0)[i]->asCharInset()->getChar();
+       ms << ETagInline("mtext");
+       // make a new line
+       ms << ETag("mtd") << ETag("mtr")
+          << MTag("mtr", "style=\"height:3ex\"") << ETag("mtr")
+          << MTag("mtr") << MTag("mtd");
+}
+
+
 void InsetMathIntertext::infoize(odocstream & os) const
 {
        os << "Intertext ";
diff --git a/src/mathed/InsetMathIntertext.h b/src/mathed/InsetMathIntertext.h
index 79f05bf32f..41274c97e0 100644
--- a/src/mathed/InsetMathIntertext.h
+++ b/src/mathed/InsetMathIntertext.h
@@ -37,6 +37,8 @@ public:
        ///
        void write(TeXMathStream & os) const override;
        ///
+       void mathmlize(MathMLStream & ms) const override;
+       ///
        void infoize(odocstream & os) const override;
        ///
        InsetCode lyxCode() const override { return MATH_INTERTEXT_CODE; }
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to