mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
Fix up MathML output of integrals.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32567 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2ae6331072
commit
c3fc67ef54
@ -124,6 +124,7 @@ void InsetMathExInt::mathematica(MathematicaStream & os) const
|
||||
|
||||
void InsetMathExInt::mathmlize(MathStream & os) const
|
||||
{
|
||||
InsetMathSymbol sym(symbol_);
|
||||
if (symbol_ == "sum") {
|
||||
bool const lower = !cell(1).empty();
|
||||
bool const upper = !cell(3).empty();
|
||||
@ -133,7 +134,9 @@ void InsetMathExInt::mathmlize(MathStream & os) const
|
||||
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);
|
||||
@ -154,11 +157,27 @@ void InsetMathExInt::mathmlize(MathStream & os) const
|
||||
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");
|
||||
|
@ -21,7 +21,11 @@
|
||||
|
||||
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 = ..."
|
||||
|
Loading…
Reference in New Issue
Block a user