Here's what's going on: \genfrac uses \mathchoice to set up the delimiters (more on this below), and \sum uses the MathML tag <munderover> to put the subscript under the sigma. The \mathchoice macro needs to know the MathML displaystyle and scriptlevel before it can choose which of the four alternatives it should use, and these are determined by the parent element of the \mathchoice, which is the <munderover>. But <munderover> needs to know its children's core <mo> element (if any) in order to determine its child's scriptlevel (if is different if the <mo> has the attribute accent="true" rather than accent="false"). But \mathchoice can't give <munderover> its core <mo> until it knows the scriptlevel. That leads to an infinite loop when \mathchoice is used in the under of over position of munderover. That infinite loop is what is causing the Math Processing Error (the browser eventually throws an error when the call-stack size is exceeded).
I've started an issue tracker for this at
I have a patch that will break the loop. For now, you can use the following patch on your page:
<script type="text/x-mathjax-config">
MathJax.Hub.Register.StartupHook("TeX mathchoice Ready",function () {
MathJax.ElementJax.mml.TeXmathchoice.Augment({
choice: function () {
if (this.selection != null) return this.selection;
if (this.choosing) return 2; // prevent infinite loops: see issue #1151
this.choosing = true;
var selection = 0, values = this.getValues("displaystyle","scriptlevel");
if (values.scriptlevel > 0) {selection = Math.min(3,values.scriptlevel+1)}
else {selection = (values.displaystyle ? 0 : 1)}
// only cache the result if we are actually in place in a <math> tag.
var node = this.inherit; while (node && node.type !== "math") node = node.inherit;
if (node) this.selection = selection;
this.choosing = false;
return selection;
}
});
});
</script>
Thanks for reporting the error.
Note that the 3rd and 4th equations in your test file are SUPPOSED to look different, as they look different in actual LaTeX. Here is a screen shot of the test code from actual LaTeX:
Hope that helps.