void InsetMathFrac::mathmlize(MathStream & os) const
{
- switch (kind_) {
- case DFRAC:
- os << MTag("mdfrac") << cell(0) << cell(1) << ETag("mdfrac");
- break;
- case TFRAC:
- os << MTag("mtfrac") << cell(0) << cell(1) << ETag("mtfrac");
- break;
- case FRAC:
- default:
- os << MTag("mfrac") << cell(0) << cell(1) << ETag("mfrac");
- break;
- }
+ os << MTag("mfrac")
+ << MTag("mrow") << cell(0) << ETag("mrow")
+ << MTag("mrow") << cell(1) << ETag("mrow")
+ << ETag("mfrac");
}
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>";
}