Open henok-outlier opened 2 years ago
This is due to the fact that the explorer uses semantic-enrichment that modifies the underlying MathML for the expression, and that adds mrow
s around the parentheses, which in turn causes MathJax to interpret the parentheses as though they came from \left...\right
, which are spaced differently.
This was fixed in v3.1.3 via mathjax/MathJax-src#583, but the fix has not been back-ported to v2.7.
For now, you can use the following configuration to work around the issue:
MathJax.Hub.Register.StartupHook('MathML Jax Ready', function () {
var PARSE = MathJax.InputJax.MathML.Parse;
PARSE.Augment({
_AddChildren: PARSE.prototype.AddChildren,
AddChildren: function (mml, node) {
this._AddChildren(mml, node);
if (mml.type === "mrow" && (mml.open || mml.close)) {
if (mml.open && !mml.data[0].stretchy) delete mml.open;
if (mml.close && !mml.data[mml.data.length-1].stretchy) delete mml.close;
}
}
});
});
MathJax.Hub.Register.StartupHook('MathML Jax Ready', function () {
var PARSE = MathJax.InputJax.MathML.Parse;
PARSE.Augment({
_AddChildren: PARSE.prototype.AddChildren,
AddChildren: function (mml, node) {
this._AddChildren(mml, node);
if (mml.type === "mrow" && (mml.open || mml.close)) {
if (mml.open && !mml.data[0].stretchy) delete mml.open;
if (mml.close && !mml.data[mml.data.length-1].stretchy) delete mml.close;
}
}
});
});
@dpvc thanks, I'm thinking the last statement array call is stretchy
instead of sretchy
. And we don't need the 394
number.
Quite correct. Sorry about the typos and copy/paste artifact!
Issue Summary
When the accessibility explorer is activated, there's a spacing issue. The spaces after 'f', 'M', and 'cos' are way too big, and I can't figure out how to make them look right. It's important that those spaces are small for readability reasons, since (for instance) "M(x)" is a single object, not two separate things as "M (x)" might suggest.
Current behavior
Expected behavior
Steps to Reproduce:
When explorer is set to false the spacing is correct, but I also want the accessibility feature.
Technical details:
Supporting information:
https://jsbin.com/bohitetaka/edit?html,js,output