diff --git a/src/mathed/InsetMathClass.cpp b/src/mathed/InsetMathClass.cpp index 0c22d478c7..2bfea82ce0 100644 --- a/src/mathed/InsetMathClass.cpp +++ b/src/mathed/InsetMathClass.cpp @@ -11,6 +11,7 @@ #include #include "InsetMathClass.h" +#include "MathStream.h" #include "support/docstream.h" @@ -56,6 +57,16 @@ void InsetMathClass::write(TeXMathStream & os) const } +void InsetMathClass::mathmlize(MathMLStream & ms) const +{ + // Skip the \mathXXX macro, the MathML processor is supposed to handle + // spacing down the line. + for (size_t i = 0; i < nargs(); ++i) { + ms << cell(i); + } +} + + docstring InsetMathClass::name() const { return class_to_string(math_class_); diff --git a/src/mathed/InsetMathClass.h b/src/mathed/InsetMathClass.h index 89189f2b0d..f4308beb9b 100644 --- a/src/mathed/InsetMathClass.h +++ b/src/mathed/InsetMathClass.h @@ -43,6 +43,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_CLASS_CODE; } diff --git a/src/mathed/MathClass.h b/src/mathed/MathClass.h index 169bfdb51a..af4f884cca 100644 --- a/src/mathed/MathClass.h +++ b/src/mathed/MathClass.h @@ -40,7 +40,7 @@ class MetricsBase; * + Vcent: a vbox to be centered, produced by \vcenter. * * Over, Under, Acc, Rad and Vcent are not considered in the enum - * below. The relvant elements will be considered as Ord. + * below. The relevant elements will be considered as Ord. */ enum MathClass { MC_ORD,