Page MenuHomePhabricator

Ugly rendering of <math>n \choose k</math> and <math>{n \choose k}</math>
Closed, ResolvedPublicBUG REPORT

Description

Enable "MathML (experimental; no images)" in Special:Preferences → Apperance → Math. Then preview a page with the contents <math>{n \choose k}</math>. The parentheses of the binomial coefficient are too small (see image below). If you omit the braces (i.e. <math>n \choose k</math>) then "k" is too small.

image.png (576×533 px, 33 KB)

(screenshot from bottom of https://www.mediawiki.org/wiki/Extension:Math/Native_MathML/Reported_Cases)

Contrast this with <math>\binom{n}{k}</math>, which always looks good. I would expect that all three ({n \choose k}, n \choose k, and \binom{n}{k}) generate the same MathML code.

Event Timeline

See T375340 which looks at rendering of binomals in MathML.

I don't know if the relation can be expressed natively in MathML, but at least right now but MediaWiki MathML rendering and the MathJax rendering use the same approach of setting the height manually on these parenthesis. And the MediaWiki one is indeed not tall enough cover the height of the expression.

The MathJax MathML seems to render correctly in Firefox/Safari/Chrome, so this is something we can fix on our end rather than a browser bug.

Screenshot 2026-02-16 at 17.42.06.png (1×1 px, 302 KB)

Hello @Dexxor
hello @Krinkle ,
hello @Physikerwelt ,

ich think this bug was solved in T418144 . Do you agree?

Physikerwelt claimed this task.