void InsetMathExInt::mathmlize(MathStream & os) const
{
+ InsetMathSymbol sym(symbol_);
if (symbol_ == "sum") {
bool const lower = !cell(1).empty();
bool const upper = !cell(3).empty();
os << MTag("msub");
else if (upper)
os << MTag("msup");
- os << MTag("mrow") << MTag("mo") << "∑" << ETag("mo") << ETag("mrow");
+ os << MTag("mrow");
+ sym.mathmlize(os);
+ os << ETag("mrow");
if (lower) {
os << MTag("mrow");
os << cell(1);
return;
}
// some kind of integral
- InsetMathSymbol sym(symbol_);
- //if (hasScripts())
- // mathmlize(sym, os);
- //else
+ bool const lower = !cell(2).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");
sym.mathmlize(os);
+ os << ETag("mrow");
+ if (lower)
+ os << MTag("mrow") << cell(2) << 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) << "<mo> ⁢ </mo>"
<< MTag("mrow") << "<mo> ⅆ </mo>"
<< cell(1) << ETag("mrow");
namespace lyx {
-// for integrals, cell(0) is stuff before the 'd', cell(1) the stuff after
+// for integrals:
+// cell(0) is stuff before the 'd'
+// cell(1) is the stuff after the 'd'
+// cell(2) is the lower bound
+// cell(3) is the upper bound
// for sums:
// cell(0) is the main body
// cell(1) is the index (e.g., i), if the lower bound is "i = ..."