Change from setting form=infix to adding an empty <mi>, since MathML spacing and TeX spacing are slightly different. Issue #811.

This commit is contained in:
Davide P. Cervone 2015-01-25 11:46:16 -05:00
parent 1bb9758dc8
commit ecc8e7c350

View File

@ -462,19 +462,16 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
}, },
/* /*
* Set the initial <mo> to have form="infix", * If the initial child, skipping any initial space or
* skipping any initial space or empty braces (TeXAtom with child * empty braces (TeXAtom with child being an empty inferred row),
* being an empty inferred row). * is an <mo>, preceed it by an empty <mi> to force the <mo> to
* be infix.
*/ */
fixInitialMO: function (data) { fixInitialMO: function (data) {
for (var i = 0, m = data.length; i < m; i++) { for (var i = 0, m = data.length; i < m; i++) {
if (data[i] && (data[i].type !== "mspace" && if (data[i] && (data[i].type !== "mspace" &&
(data[i].type !== "texatom" || (data[i].data[0] && data[i].data[0].data.length)))) { (data[i].type !== "texatom" || (data[i].data[0] && data[i].data[0].data.length)))) {
if (data[i].isEmbellished()) { if (data[i].isEmbellished()) data.unshift(MML.mi());
var core = data[i].CoreMO();
core.form = MML.FORM.INFIX;
core.useMMLspacing |= core.SPACE_ATTR.form; // use MathML space for this
}
break; break;
} }
} }