From 00864b06356044980a4e77831cb290aa3cd51146 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 7 Jun 2016 10:14:51 -0400 Subject: [PATCH] surround \middle with OPEN and CLOSE TeXAtoms, so that the spacing will be consistent with TeX's version (e.g., \mathrel{}\middle|\mathrel{} will produce the right spacing). As a side effect, this resolves the problem with the quotes, sot this resolves issue #1023. --- unpacked/jax/input/TeX/jax.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js index 8463c8be36..4b36326af3 100644 --- a/unpacked/jax/input/TeX/jax.js +++ b/unpacked/jax/input/TeX/jax.js @@ -1335,9 +1335,11 @@ Middle: function (name) { var delim = this.GetDelimiter(name); + this.Push(MML.TeXAtom().With({texClass:MML.TEXCLASS.CLOSE})); if (this.stack.Top().type !== "left") {TEX.Error(["MisplacedMiddle","%1 must be within \\left and \\right",name])} this.Push(MML.mo(delim).With({stretchy:true})); + this.Push(MML.TeXAtom().With({texClass:MML.TEXCLASS.OPEN})); }, NamedFn: function (name,id) {