www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit ecc8e7c35027fba9ccc64316c6573729514c6e9c
parent 1bb9758dc8d75b10d7d6c65c1c9271c596bbf4d2
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Sun, 25 Jan 2015 11:46:16 -0500

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

Diffstat:
Munpacked/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 @@ -462,19 +462,16 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { }, /* - * Set the initial <mo> 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 <mo>, preceed it by an empty <mi> to force the <mo> 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; } }