Handle movablelimits on TeXAtom of class OP in toMathML, NativeMML, and MathML input.
This commit is contained in:
parent
b69e0a63b1
commit
b11a9b1b65
|
@ -78,7 +78,10 @@ MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function () {
|
|||
var CLASS = []; if (this["class"]) {CLASS.push(this["class"])}
|
||||
if (this.isa(MML.TeXAtom) && SETTINGS.texHints) {
|
||||
var TEXCLASS = ["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER","VCENTER"][this.texClass];
|
||||
if (TEXCLASS) {CLASS.push("MJX-TeXAtom-"+TEXCLASS)}
|
||||
if (TEXCLASS) {
|
||||
CLASS.push("MJX-TeXAtom-"+TEXCLASS)
|
||||
if (TEXCLASS === "OP" && !this.movablelimits) CLASS.push("MJX-fixedlimits");
|
||||
}
|
||||
}
|
||||
if (this.mathvariant && this.toMathMLvariants[this.mathvariant])
|
||||
{CLASS.push("MJX"+this.mathvariant)}
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
var mml, type = node.nodeName.toLowerCase().replace(/^[a-z]+:/,"");
|
||||
var match = (CLASS.match(/(^| )MJX-TeXAtom-([^ ]*)/));
|
||||
if (match) {
|
||||
mml = this.TeXAtom(match[2]);
|
||||
mml = this.TeXAtom(match[2],!CLASS.match(/MJX-fixedlimits/));
|
||||
} else if (!(MML[type] && MML[type].isa && MML[type].isa(MML.mbase))) {
|
||||
MathJax.Hub.signal.Post(["MathML Jax - unknown node type",type]);
|
||||
return MML.Error(_("UnknownNodeType","Unknown node type: %1",type));
|
||||
|
@ -88,9 +88,9 @@
|
|||
if (MATHML.config.useMathMLspacing) {mml.useMMLspacing = 0x08}
|
||||
return mml;
|
||||
},
|
||||
TeXAtom: function (mclass) {
|
||||
TeXAtom: function (mclass,movablelimits) {
|
||||
var mml = MML.TeXAtom().With({texClass:MML.TEXCLASS[mclass]});
|
||||
if (mml.texClass === MML.TEXCLASS.OP) {mml.movesupsub = mml.movablelimits = true}
|
||||
if (movablelimits) {mml.movesupsub = mml.movablelimits = true}
|
||||
return mml;
|
||||
},
|
||||
CheckClass: function (mml,CLASS) {
|
||||
|
|
|
@ -533,7 +533,10 @@
|
|||
var CLASS = []; if (this["class"]) {CLASS.push(this["class"])}
|
||||
if (this.isa(MML.TeXAtom)) {
|
||||
var TEXCLASS = ["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER","VCENTER"][this.texClass];
|
||||
if (TEXCLASS) {CLASS.push("MJX-TeXAtom-"+TEXCLASS)}
|
||||
if (TEXCLASS) {
|
||||
CLASS.push("MJX-TeXAtom-"+TEXCLASS)
|
||||
if (TEXCLASS === "OP" && !this.movablelimits) CLASS.push("MJX-fixedlimits");
|
||||
}
|
||||
}
|
||||
if (this.mathvariant && this.NativeMMLvariants[this.mathvariant])
|
||||
{CLASS.push("MJX"+this.mathvariant)}
|
||||
|
|
Loading…
Reference in New Issue
Block a user