www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 4292f9ed6bd2b57ceb740bf475d0aafbd7a8cb63
parent 65937e6c4de7594140cb2fa1048bc682e60b09f7
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Mon, 20 Apr 2015 08:27:43 -0400

Don't insert mstyle in InternalMath() when not necessary.

Diffstat:
Munpacked/jax/input/TeX/jax.js | 9++++++---
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) {