From a4b6f413fdcd724002271a9cb39a5ef4d1b0813e Mon Sep 17 00:00:00 2001
From: "Davide P. Cervone" <dpvc@union.edu>
Date: Sat, 20 Jan 2018 17:13:42 -0500
Subject: [PATCH] Have \bigg and friends to trim spaces from their arguments. 
 Resolves issue #1819

---
 unpacked/jax/input/TeX/jax.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js
index 92ba99a9b..77bacb29a 100644
--- a/unpacked/jax/input/TeX/jax.js
+++ b/unpacked/jax/input/TeX/jax.js
@@ -2037,8 +2037,12 @@
       while (this.nextIsSpace()) {this.i++}
       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 (c == "\\") {
+          c += this.GetCS(name);
+        } else if (c === "{" && braceOK) {
+          this.i--;
+          c = this.GetArgument(name).replace(/^\s+/,'').replace(/\s+$/,'');
+        }
         if (TEXDEF.delimiter[c] != null) {return this.convertDelimiter(c)}
       }
       TEX.Error(["MissingOrUnrecognizedDelim",
-- 
GitLab