Use \bigg or \big for the delimiters for \binom and other such constructs, rather than stretchy delimiters, as is done in TeX. Resolves isue #776.
This commit is contained in:
parent
58c20a9a4c
commit
89c6f10cea
|
@ -266,7 +266,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
var den = this.ParseArg(name);
|
||||
var frac = MML.mfrac(num,den);
|
||||
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 !== "") {
|
||||
var STYLE = (["D","T","S","SS"])[style];
|
||||
if (STYLE == null)
|
||||
|
|
|
@ -186,7 +186,7 @@
|
|||
if (this.open || this.close) {
|
||||
mml.texClass = MML.TEXCLASS.INNER;
|
||||
mml.texWithDelims = true;
|
||||
mml = TEX.fenced(this.open,mml,this.close);
|
||||
mml = TEX.fixedFence(this.open,mml,this.close);
|
||||
}
|
||||
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}))}
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user