From ecc8e7c35027fba9ccc64316c6573729514c6e9c Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sun, 25 Jan 2015 11:46:16 -0500 Subject: [PATCH] Change from setting form=infix to adding an empty , since MathML spacing and TeX spacing are slightly different. Issue #811. --- unpacked/extensions/TeX/AMSmath.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/unpacked/extensions/TeX/AMSmath.js b/unpacked/extensions/TeX/AMSmath.js index cc9d28401..bf11e6edf 100644 --- a/unpacked/extensions/TeX/AMSmath.js +++ b/unpacked/extensions/TeX/AMSmath.js @@ -462,19 +462,16 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { }, /* - * Set the initial to have form="infix", - * skipping any initial space or empty braces (TeXAtom with child - * being an empty inferred row). + * If the initial child, skipping any initial space or + * empty braces (TeXAtom with child being an empty inferred row), + * is an , preceed it by an empty to force the to + * be infix. */ fixInitialMO: function (data) { for (var i = 0, m = data.length; i < m; i++) { if (data[i] && (data[i].type !== "mspace" && (data[i].type !== "texatom" || (data[i].data[0] && data[i].data[0].data.length)))) { - if (data[i].isEmbellished()) { - var core = data[i].CoreMO(); - core.form = MML.FORM.INFIX; - core.useMMLspacing |= core.SPACE_ATTR.form; // use MathML space for this - } + if (data[i].isEmbellished()) data.unshift(MML.mi()); break; } }