Skip to content

Commit ecc8e7c

Browse files
committed
Change from setting form=infix to adding an empty <mi>, since MathML spacing and TeX spacing are slightly different. Issue #811.
1 parent 1bb9758 commit ecc8e7c

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

unpacked/extensions/TeX/AMSmath.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -462,19 +462,16 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
462462
},
463463

464464
/*
465-
* Set the initial <mo> to have form="infix",
466-
* skipping any initial space or empty braces (TeXAtom with child
467-
* being an empty inferred row).
465+
* If the initial child, skipping any initial space or
466+
* empty braces (TeXAtom with child being an empty inferred row),
467+
* is an <mo>, preceed it by an empty <mi> to force the <mo> to
468+
* be infix.
468469
*/
469470
fixInitialMO: function (data) {
470471
for (var i = 0, m = data.length; i < m; i++) {
471472
if (data[i] && (data[i].type !== "mspace" &&
472473
(data[i].type !== "texatom" || (data[i].data[0] && data[i].data[0].data.length)))) {
473-
if (data[i].isEmbellished()) {
474-
var core = data[i].CoreMO();
475-
core.form = MML.FORM.INFIX;
476-
core.useMMLspacing |= core.SPACE_ATTR.form; // use MathML space for this
477-
}
474+
if (data[i].isEmbellished()) data.unshift(MML.mi());
478475
break;
479476
}
480477
}

0 commit comments

Comments
 (0)