commit 993715cc03241e3fb00a627980568f4968b01d2d
parent e35dd5fd43bfb336021b0d221f036958eb8a2518
Author: Davide P. Cervone <dpvc@union.edu>
Date: Mon, 20 Apr 2015 08:56:34 -0400
Merge remote-tracking branch 'dpvc/hotfix-2.5.2' into hotfix-2.5.2
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js
@@ -1679,7 +1679,7 @@
}
var text = string.substr(this.i,i-this.i);
if (!text.match(/^\s*\\text[^a-zA-Z]/)) {
- this.Push.apply(this,this.InternalMath(text));
+ this.Push.apply(this,this.InternalMath(text,0));
this.i = i;
}
}
@@ -2054,8 +2054,11 @@
if (match !== '') TEX.Error(["MathNotTerminated","Math not terminated in text box"]);
}
if (k < text.length) mml.push(this.InternalText(text.slice(k),def));
- var mml = [MML.mstyle.apply(MML,mml).With({displaystyle:false})];
- if (level != null) mml[0].scriptlevel = level;
+ if (level != null) {
+ mml = [MML.mstyle.apply(MML,mml).With({displaystyle:false,scriptlevel:level})];
+ } else if (mml.length > 1) {
+ mml = [MML.mrow.apply(MML,mml)];
+ }
return mml;
},
InternalText: function (text,def) {