# MathJax rendering bug

In this formula:

$$\frac{1}{\binom{n}{1}}+\frac{1}{\binom{n}{2}}+\frac{1}{\binom{n}{3}}+\cdots+\frac{1}{\binom{n}{n}}=？$$

The $\binom{n}{3}$ renders much larger than the other \binom expressions. If I change the 3 to a 2 it looks correct.

Screenshot:

Here's my browser version information:

• Google Chrome: 19.0.1084.46 (Official Build 135956)
• OS: Linux
• WebKit: 536.5 (@116441)
• JavaScript: V8 3.9.24.21
• I get the same effect (OS X 10.6.8, FF 12.0) when I right click on the math and choose SVG under Math Settings -> Math Renderer. With HTML-CSS and MathML it looks fine. It has likely to do with the fact that the glyph of 3 larger than the ones of 1,2 and n.
– t.b.
May 30, 2012 at 13:26
• I didn't know that one could right-click a formula, thanks! I was using HTML_CSS; switching my renderer to SVG does not fix the problem. Screenshot on request.
– MJD
May 30, 2012 at 13:31
• I can reproduce on Debian linux, IceWeasel version 10.0.4. The chosen renderer is already HTML-CSS. May 30, 2012 at 13:38
• @t.b. While the MathML corrects the problem it does not look fine! :-)
– Asaf Karagila Mod
May 30, 2012 at 13:38

The problem is with the digit; neither 1 nor 2 cause the problem, but switch it to 3, 5, 6, 7, 8, 9, or 0 (in any denominator) and it looks similar; e.g., $$\frac{1}{\binom{n}{1}}+\frac{1}{\binom{n}{3}}+\frac{1}{\binom{n}{2}}+\cdots+\frac{1}{\binom{n}{8}}=?$$

A workaround is to use \smash on the 3 (or any items that cause the issue), so force $\LaTeX$ to think the box with the 3 is "standard" size. Thus,

\frac{1}{\binom{n}{1}}+\frac{1}{\binom{n}{2}}+\frac{1}{\binom{n}{\smash{3}}}+\cdots+\frac{1}{\binom{n}{n}}=?

produces $$\frac{1}{\binom{n}{1}}+\frac{1}{\binom{n}{2}}+\frac{1}{\binom{n}{\smash{3}}}+\cdots+\frac{1}{\binom{n}{n}}=?$$

Note that the problem is not related to the denominators, but rather to the rendering of the binomial coefficient when not in displaymode. For example, $\binom{n}{1}\binom{n}{2}\binom{n}{3}\binom{n}{4}\binom{n}{5}\binom{n}{6}\binom{n}{7}\binom{n}{8}\binom{n}{9}\binom{n}{0}$ gives

$\binom{n}{1}\binom{n}{2}\binom{n}{3}\binom{n}{4}\binom{n}{5}\binom{n}{6}\binom{n}{7}\binom{n}{8}\binom{n}{9}\binom{n}{0}$

• Thanks. I seem to remember that DEK guaranteed that all digit symbols would be the same height, to avoid problems like this. I don't know how MathJax chooses box heights. Do you suppose it ought to enforce a similar rule?
– MJD
May 30, 2012 at 20:00
• @Mark What's DEK? Just curious. May 30, 2012 at 23:57
• Donald E. Knuth, inventor of $\TeX$.
– MJD
May 31, 2012 at 0:38
• I was remembering wrong anyway; the digits usually not always) have the same width. Of course they often don't have the same height; for example.
– MJD
May 31, 2012 at 0:49