From: Richard Heck Date: Thu, 31 Dec 2009 21:22:04 +0000 (+0000) Subject: Fix MathML for binominals. X-Git-Tag: 2.0.0~4636 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=07aca7ccccb44193c611a0b4e679633597c9327f;p=lyx.git Fix MathML for binominals. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32717 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/HTML/HTML.notes b/development/HTML/HTML.notes index 8d6420d12a..2db751d81d 100644 --- a/development/HTML/HTML.notes +++ b/development/HTML/HTML.notes @@ -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 . - Par? diff --git a/src/mathed/InsetMathFrac.cpp b/src/mathed/InsetMathFrac.cpp index 11d24469db..9a244eaa34 100644 --- a/src/mathed/InsetMathFrac.cpp +++ b/src/mathed/InsetMathFrac.cpp @@ -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 << "" << ldelim << "" + << "" + << cell(0) << cell(1) + << "" + << "" << rdelim << ""; }