Merge branch 'issue902' into develop. Issue #902.

This commit is contained in:
Davide P. Cervone 2014-09-04 05:55:18 -04:00
commit 8ddeed3a3c

View File

@ -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}