Skip to content

Commit b9863ce

Browse files
committed
Merge remote-tracking branch 'dpvc/issue475' into v2.2-latest
Resolves issue #475
2 parents 90cd96c + 4e01303 commit b9863ce

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

unpacked/extensions/TeX/AMSmath.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
265265
var den = this.ParseArg(name);
266266
var frac = MML.mfrac(num,den);
267267
if (thick !== "") {frac.linethickness = thick}
268-
if (left || right) {frac = TEX.mfenced(left,frac,right)}
268+
if (left || right) {frac = TEX.fenced(left,frac,right)}
269269
if (style !== "") {
270270
var STYLE = (["D","T","S","SS"])[style];
271271
if (STYLE == null)

unpacked/jax/input/TeX/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
MathJax.InputJax.TeX = MathJax.InputJax({
2929
id: "TeX",
30-
version: "2.2",
30+
version: "2.2.1",
3131
directory: MathJax.InputJax.directory + "/TeX",
3232
extensionDir: MathJax.InputJax.extensionDir + "/TeX",
3333

unpacked/jax/input/TeX/jax.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
if (this.open || this.close) {
187187
mml.texClass = MML.TEXCLASS.INNER;
188188
mml.texWithDelims = true;
189-
mml = TEX.mfenced(this.open,mml,this.close);
189+
mml = TEX.fenced(this.open,mml,this.close);
190190
}
191191
return [STACKITEM.mml(mml), item];
192192
}
@@ -200,7 +200,7 @@
200200
stopError: /*_()*/ ["ExtraLeftMissingRight", "Extra \\left or missing \\right"],
201201
checkItem: function (item) {
202202
if (item.type === "right")
203-
{return STACKITEM.mml(TEX.mfenced(this.delim,this.mmlData(),item.delim))}
203+
{return STACKITEM.mml(TEX.fenced(this.delim,this.mmlData(),item.delim))}
204204
return this.SUPER(arguments).checkItem.call(this,item);
205205
}
206206
});
@@ -276,7 +276,7 @@
276276
if ((this.arraydef.columnlines||"none") != "none" ||
277277
(this.arraydef.rowlines||"none") != "none") {mml.padding = 0} // HTML-CSS jax implements this
278278
}
279-
if (this.open || this.close) {mml = TEX.mfenced(this.open,mml,this.close)}
279+
if (this.open || this.close) {mml = TEX.fenced(this.open,mml,this.close)}
280280
mml = STACKITEM.mml(mml);
281281
if (this.requireClose) {
282282
if (item.type === 'close') {return mml}
@@ -2122,14 +2122,14 @@
21222122
},
21232123

21242124
/*
2125-
* Create an mrow that represents the equivalent of an mfenced
2125+
* Create an mrow that has stretchy delimiters at either end, as needed
21262126
*/
2127-
mfenced: function (open,mml,close) {
2127+
fenced: function (open,mml,close) {
21282128
var mrow = MML.mrow();
21292129
mrow.open = open; mrow.close = close;
2130-
if (open) {mrow.Append(MML.mo(open).With({fence:true, texClass:MML.TEXCLASS.OPEN}))}
2130+
if (open) {mrow.Append(MML.mo(open).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.OPEN}))}
21312131
if (mml.type === "mrow") {mrow.Append.apply(mrow,mml.data)} else {mrow.Append(mml)}
2132-
if (close) {mrow.Append(MML.mo(close).With({fence:true, texClass:MML.TEXCLASS.CLOSE}))}
2132+
if (close) {mrow.Append(MML.mo(close).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.CLOSE}))}
21332133
return mrow;
21342134
},
21352135

0 commit comments

Comments
 (0)