Merge branch 'issue389' into develop. Issue #389.
This commit is contained in:
commit
d26490a4db
|
@ -438,6 +438,24 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
}
|
}
|
||||||
delete global.tag; delete global.tagID; delete global.label;
|
delete global.tag; delete global.tagID; delete global.label;
|
||||||
return tag;
|
return tag;
|
||||||
|
},
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set the initial <mo> to have form="infix" and lspace="0",
|
||||||
|
* skipping any initial space or empty braces (TeXAtom with child
|
||||||
|
* being an empty inferred row).
|
||||||
|
*/
|
||||||
|
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.lspace = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -453,6 +471,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
stack.global.tagged = !numbered && !stack.global.forcetag; // prevent automatic tagging in starred environments
|
stack.global.tagged = !numbered && !stack.global.forcetag; // prevent automatic tagging in starred environments
|
||||||
},
|
},
|
||||||
EndEntry: function () {
|
EndEntry: function () {
|
||||||
|
if (this.table.length) {this.fixInitialMO(this.data)}
|
||||||
var mtd = MML.mtd.apply(MML,this.data);
|
var mtd = MML.mtd.apply(MML,this.data);
|
||||||
if (this.data.shove) {mtd.columnalign = this.data.shove}
|
if (this.data.shove) {mtd.columnalign = this.data.shove}
|
||||||
this.row.push(mtd);
|
this.row.push(mtd);
|
||||||
|
@ -499,6 +518,11 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
stack.global.notags = (taggable ? null : name);
|
stack.global.notags = (taggable ? null : name);
|
||||||
stack.global.tagged = !numbered && !stack.global.forcetag; // prevent automatic tagging in starred environments
|
stack.global.tagged = !numbered && !stack.global.forcetag; // prevent automatic tagging in starred environments
|
||||||
},
|
},
|
||||||
|
EndEntry: function () {
|
||||||
|
if (this.row.length) {this.fixInitialMO(this.data)}
|
||||||
|
this.row.push(MML.mtd.apply(MML,this.data));
|
||||||
|
this.data = [];
|
||||||
|
},
|
||||||
EndRow: function () {
|
EndRow: function () {
|
||||||
var mtr = MML.mtr;
|
var mtr = MML.mtr;
|
||||||
if (!this.global.tag && this.numbered) {this.autoTag()}
|
if (!this.global.tag && this.numbered) {this.autoTag()}
|
||||||
|
|
|
@ -59,7 +59,7 @@ MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function () {
|
||||||
if (!this.attrNames) {
|
if (!this.attrNames) {
|
||||||
if (this.type === "mstyle") {defaults = MML.math.prototype.defaults}
|
if (this.type === "mstyle") {defaults = MML.math.prototype.defaults}
|
||||||
for (var id in defaults) {if (!skip[id] && defaults.hasOwnProperty(id)) {
|
for (var id in defaults) {if (!skip[id] && defaults.hasOwnProperty(id)) {
|
||||||
var force = (id === "open" || id === "close");
|
var force = (id === "open" || id === "close" || id === "form");
|
||||||
if (this[id] != null && (force || this[id] !== defaults[id])) {
|
if (this[id] != null && (force || this[id] !== defaults[id])) {
|
||||||
var value = this[id]; delete this[id];
|
var value = this[id]; delete this[id];
|
||||||
if (force || this.Get(id) !== value)
|
if (force || this.Get(id) !== value)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user