diff --git a/src/mathed/InsetMathExInt.cpp b/src/mathed/InsetMathExInt.cpp index 5313f0adc3..bc26c05f53 100644 --- a/src/mathed/InsetMathExInt.cpp +++ b/src/mathed/InsetMathExInt.cpp @@ -124,11 +124,41 @@ void InsetMathExInt::mathematica(MathematicaStream & os) const void InsetMathExInt::mathmlize(MathStream & os) const { + if (symbol_ == "sum") { + bool const lower = !cell(1).empty(); + bool const upper = !cell(3).empty(); + if (lower && upper) + os << MTag("msubsup"); + else if (lower) + os << MTag("msub"); + else if (upper) + os << MTag("msup"); + os << MTag("mrow") << MTag("mo") << "∑" << ETag("mo") << ETag("mrow"); + if (lower) { + os << MTag("mrow"); + os << cell(1); + if (!cell(2).empty()) + os << MTag("mo") << "=" << ETag("mo") + << cell(2); + os << ETag("mrow"); + } + if (upper) + os << MTag("mrow") << cell(3) << ETag("mrow"); + if (lower && upper) + os << ETag("msubsup"); + else if (lower) + os << ETag("msub"); + else if (upper) + os << ETag("msup"); + os << cell(0); + return; + } + // some kind of integral InsetMathSymbol sym(symbol_); //if (hasScripts()) // mathmlize(sym, os); //else - sym.mathmlize(os); + sym.mathmlize(os); os << cell(0) << "" << MTag("mrow") << "" << cell(1) << ETag("mrow");