Merge branch 'issue776' into develop. Issue #776.
This commit is contained in:
commit
2864aeed75
|
@ -266,7 +266,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
var den = this.ParseArg(name);
|
var den = this.ParseArg(name);
|
||||||
var frac = MML.mfrac(num,den);
|
var frac = MML.mfrac(num,den);
|
||||||
if (thick !== "") {frac.linethickness = thick}
|
if (thick !== "") {frac.linethickness = thick}
|
||||||
if (left || right) {frac = TEX.fenced(left,frac,right)}
|
if (left || right) {frac = TEX.fixedFence(left,frac.With({texWithDelims:true}),right)}
|
||||||
if (style !== "") {
|
if (style !== "") {
|
||||||
var STYLE = (["D","T","S","SS"])[style];
|
var STYLE = (["D","T","S","SS"])[style];
|
||||||
if (STYLE == null)
|
if (STYLE == null)
|
||||||
|
|
|
@ -186,7 +186,7 @@
|
||||||
if (this.open || this.close) {
|
if (this.open || this.close) {
|
||||||
mml.texClass = MML.TEXCLASS.INNER;
|
mml.texClass = MML.TEXCLASS.INNER;
|
||||||
mml.texWithDelims = true;
|
mml.texWithDelims = true;
|
||||||
mml = TEX.fenced(this.open,mml,this.close);
|
mml = TEX.fixedFence(this.open,mml,this.close);
|
||||||
}
|
}
|
||||||
return [STACKITEM.mml(mml), item];
|
return [STACKITEM.mml(mml), item];
|
||||||
}
|
}
|
||||||
|
@ -2146,6 +2146,20 @@
|
||||||
if (close) {mrow.Append(MML.mo(close).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.CLOSE}))}
|
if (close) {mrow.Append(MML.mo(close).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.CLOSE}))}
|
||||||
return mrow;
|
return mrow;
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
|
* Create an mrow that has \mathchoice using \bigg and \big for the delimiters
|
||||||
|
*/
|
||||||
|
fixedFence: function (open,mml,close) {
|
||||||
|
var mrow = MML.mrow().With({open:open, close:close, texClass:MML.TEXCLASS.INNER});
|
||||||
|
if (open) {mrow.Append(this.mathPalette(open,"l"))}
|
||||||
|
if (mml.type === "mrow") {mrow.Append.apply(mrow,mml.data)} else {mrow.Append(mml)}
|
||||||
|
if (close) {mrow.Append(this.mathPalette(close,"r"))}
|
||||||
|
return mrow;
|
||||||
|
},
|
||||||
|
mathPalette: function (fence,side) {
|
||||||
|
var D = '{\\bigg'+side+' '+fence+'}', T = '{\\big'+side+' '+fence+'}';
|
||||||
|
return TEX.Parse('\\mathchoice'+D+T+T+T).mml();
|
||||||
|
},
|
||||||
|
|
||||||
//
|
//
|
||||||
// Combine adjacent <mo> elements that are relations
|
// Combine adjacent <mo> elements that are relations
|
||||||
|
|
Loading…
Reference in New Issue
Block a user