commit 5e3fe174617221755bcad3785949bf4aa5523670
parent 126bd1c3736b6ed1a2645b8cb64ec0ffa4253a58
Author: Davide P. Cervone <dpvc@union.edu>
Date: Thu, 13 Feb 2014 12:58:51 -0500
Allow \Big and its brethren to have the delimiter in braces. Resolves issue #632.
Diffstat:
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js
@@ -1535,7 +1535,7 @@
MakeBig: function (name,mclass,size) {
size *= TEXDEF.p_height;
size = String(size).replace(/(\.\d\d\d).+/,'$1')+"em";
- var delim = this.GetDelimiter(name);
+ var delim = this.GetDelimiter(name,true);
this.Push(MML.TeXAtom(MML.mo(delim).With({
minsize: size, maxsize: size,
fence: true, stretchy: true, symmetric: true
@@ -1890,11 +1890,12 @@
/*
* Get the name of a delimiter (check it in the delimiter list).
*/
- GetDelimiter: function (name) {
+ GetDelimiter: function (name,braceOK) {
while (this.nextIsSpace()) {this.i++}
- var c = this.string.charAt(this.i);
- if (this.i < this.string.length) {
- this.i++; if (c == "\\") {c += this.GetCS(name)}
+ var c = this.string.charAt(this.i); this.i++;
+ if (this.i <= this.string.length) {
+ if (c == "\\") {c += this.GetCS(name)}
+ else if (c === "{" && braceOK) {this.i--; c = this.GetArgument(name)}
if (TEXDEF.delimiter[c] != null) {return this.convertDelimiter(c)}
}
TEX.Error(["MissingOrUnrecognizedDelim",