commit 8ddeed3a3c961c9d901136d00149b2475ca99d6e
parent a27d83444f054f974f9bcfab39c23b1d86cc6f3d
Author: Davide P. Cervone <dpvc@union.edu>
Date: Thu, 4 Sep 2014 05:55:18 -0400
Merge branch 'issue902' into develop. Issue #902.
Diffstat:
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js
@@ -296,7 +296,14 @@
}
this.row.push(mtd); this.data = []; this.hfill = [];
},
- EndRow: function () {this.table.push(MML.mtr.apply(MML,this.row)); this.row = []},
+ EndRow: function () {
+ var mtr = MML.mtr;
+ if (this.isNumbered && this.row.length === 3) {
+ this.row.unshift(this.row.pop()); // move equation number to first position
+ mtr = MML.mlabeledtr;
+ }
+ this.table.push(mtr.apply(MML,this.row)); this.row = [];
+ },
EndTable: function () {
if (this.data.length || this.row.length) {this.EndEntry(); this.EndRow()}
this.checkLines();
@@ -922,8 +929,8 @@
hline: ['HLine','solid'],
hdashline: ['HLine','dashed'],
// noalign: 'HandleNoAlign',
- eqalignno: ['Matrix',null,null,"right left right",MML.LENGTH.THICKMATHSPACE+" 3em",".5em",'D'],
- leqalignno: ['Matrix',null,null,"right left right",MML.LENGTH.THICKMATHSPACE+" 3em",".5em",'D'],
+ eqalignno: ['Matrix',null,null,"right left",MML.LENGTH.THICKMATHSPACE,".5em",'D',null,"right"],
+ leqalignno: ['Matrix',null,null,"right left",MML.LENGTH.THICKMATHSPACE,".5em",'D',null,"left"],
hfill: 'HFill',
hfil: 'HFill', // \hfil treated as \hfill for now
hfilll: 'HFill', // \hfilll treated as \hfill for now
@@ -1630,7 +1637,7 @@
}
},
- Matrix: function (name,open,close,align,spacing,vspacing,style,cases) {
+ Matrix: function (name,open,close,align,spacing,vspacing,style,cases,numbered) {
var c = this.GetNext();
if (c === "")
{TEX.Error(["MissingArgFor","Missing argument for %1",name])}
@@ -1643,6 +1650,7 @@
}
});
if (cases) {array.isCases = true}
+ if (numbered) {array.isNumbered = true; array.arraydef.side = numbered}
if (open || close) {array.open = open; array.close = close}
if (style === "D") {array.arraydef.displaystyle = true}
if (align != null) {array.arraydef.columnalign = align}