Fix MathML for binominals.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32717 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2009-12-31 21:22:04 +00:00
parent b129d5ebdc
commit 07aca7cccc
2 changed files with 18 additions and 8 deletions

View File

@ -56,8 +56,6 @@ Math
- Array
- Box: There is a general issue here with text mode nesting. See the FIXME attached
to the SetMode class.
- Binom (in Frac): None of these tags exist in MathML 2.0. We'll
just output a fraction with delimiters.
- Lefteqn
- Overset: Use <mover>.
- Par?

View File

@ -535,18 +535,30 @@ void InsetMathBinom::normalize(NormalStream & os) const
void InsetMathBinom::mathmlize(MathStream & os) const
{
char ldelim = ' ';
char rdelim = ' ';
switch (kind_) {
case BINOM:
os << MTag("mbinom") << cell(0) << cell(1) << ETag("mbinom");
break;
case TBINOM:
os << MTag("mtbinom") << cell(0) << cell(1) << ETag("mtbinom");
break;
case DBINOM:
default:
os << MTag("mdbinom") << cell(0) << cell(1) << ETag("mdbinom");
case CHOOSE:
ldelim = '(';
rdelim = ')';
break;
case BRACE:
ldelim = '{';
rdelim = '}';
break;
case BRACK:
ldelim = '[';
rdelim = ']';
break;
}
os << "<mo fence='true' stretchy='true' form='prefix'>" << ldelim << "</mo>"
<< "<mfrac linethickness='0'>"
<< cell(0) << cell(1)
<< "</mfrac>"
<< "<mo fence='true' stretchy='true' form='postfix'>" << rdelim << "</mo>";
}