commit 6eddcc8f5def2f000a7d5e65503e8a3c22a56a24
parent 3ba60663dfc6efd0269b1aab5250549e6fe5f5e8
Author: Davide P. Cervone <dpvc@union.edu>
Date: Sun, 24 Jan 2016 15:25:36 -0500
Don't pass font to math inside text boxes. Resolves issue #1321.
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js
@@ -2021,7 +2021,6 @@
/*
* Break up a string into text and math blocks
- * @@@ FIXME: pass environment to TEX.Parse? @@@
*/
InternalMath: function (text,level) {
var def = (this.stack.env.font ? {mathvariant: this.stack.env.font} : {});
@@ -2031,7 +2030,7 @@
c = text.charAt(i++);
if (c === '$') {
if (match === '$' && braces === 0) {
- mml.push(MML.TeXAtom(TEX.Parse(text.slice(k,i-1),{}).mml().With(def)));
+ mml.push(MML.TeXAtom(TEX.Parse(text.slice(k,i-1),{}).mml()));
match = ''; k = i;
} else if (match === '') {
if (k < i-1) mml.push(this.InternalText(text.slice(k,i-1),def));
@@ -2057,7 +2056,7 @@
if (k < i-2) mml.push(this.InternalText(text.slice(k,i-2),def));
match = ')'; k = i;
} else if (c === ')' && match === ')' && braces === 0) {
- mml.push(MML.TeXAtom(TEX.Parse(text.slice(k,i-2),{}).mml().With(def)));
+ mml.push(MML.TeXAtom(TEX.Parse(text.slice(k,i-2),{}).mml()));
match = ''; k = i;
} else if (c.match(/[${}\\]/) && match === '') {
i--; text = text.substr(0,i-1) + text.substr(i); // remove \ from \$, \{, \}, or \\