Treat initial <mo> of split and multline (and other related environments) as infix (but remove initial space). Not sure this exactly matches LaTeX, but is closer than current behavior. Resolves issue #389.
This commit is contained in:
parent
2afb80176c
commit
5b1655a2fe
|
@ -453,6 +453,15 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
stack.global.tagged = !numbered && !stack.global.forcetag; // prevent automatic tagging in starred environments
|
||||
},
|
||||
EndEntry: function () {
|
||||
for (var i = 0, m = this.data.length; i < m; i++) {
|
||||
if (this.data[i] && this.data[i].type !== "mspace") {
|
||||
if (this.data[i].isEmbellished()) {
|
||||
var core = this.data[i].CoreMO();
|
||||
core.form = MML.FORM.INFIX; core.lspace = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
var mtd = MML.mtd.apply(MML,this.data);
|
||||
if (this.data.shove) {mtd.columnalign = this.data.shove}
|
||||
this.row.push(mtd);
|
||||
|
@ -499,6 +508,21 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
stack.global.notags = (taggable ? null : name);
|
||||
stack.global.tagged = !numbered && !stack.global.forcetag; // prevent automatic tagging in starred environments
|
||||
},
|
||||
EndEntry: function () {
|
||||
if (this.row.length > 0) {
|
||||
for (var i = 0, m = this.data.length; i < m; i++) {
|
||||
if (this.data[i] && this.data[i].type !== "mspace") {
|
||||
if (this.data[i].isEmbellished()) {
|
||||
var core = this.data[i].CoreMO();
|
||||
core.form = MML.FORM.INFIX; core.lspace = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.row.push(MML.mtd.apply(MML,this.data));
|
||||
this.data = [];
|
||||
},
|
||||
EndRow: function () {
|
||||
var mtr = MML.mtr;
|
||||
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.type === "mstyle") {defaults = MML.math.prototype.defaults}
|
||||
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])) {
|
||||
var value = this[id]; delete this[id];
|
||||
if (force || this.Get(id) !== value)
|
||||
|
|
Loading…
Reference in New Issue
Block a user