Fix MathML output of sums.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32566 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2009-12-17 15:54:49 +00:00
parent 019ffdd5f5
commit 2ae6331072

View File

@ -124,6 +124,36 @@ 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") << "&sum;" << 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);