www

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

commit cbdfa18ad16df52d561d2229edcb5c45cf97380c
parent 964a9e0c59a5c9ab168214f5dff4684de1ba0057
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Mon, 17 Aug 2015 14:06:58 -0400

More improvements to mmultiscripts in mhchem.

Diffstat:
Munpacked/extensions/TeX/mhchem.js | 16++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/unpacked/extensions/TeX/mhchem.js b/unpacked/extensions/TeX/mhchem.js @@ -303,12 +303,16 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { // FinishAtom: function (force) { if (this.sup || this.sub || this.presup || this.presub) { - if (!force && !this.atom && (this.tex === "" || this.tex === "{" || - (this.tex === "}" && this.TEX.substr(-1) === "{"))) { - this.presup = this.sup, this.presub = this.sub; // save for later - this.sub = this.sup = ""; - this.TEX += this.tex; this.tex = ""; - return; + if (!force && !this.atom) { + if (this.tex === "" && !this.sup && !this.sub) return; + if (!this.presup && !this.presub && + (this.tex === "" || this.tex === "{" || + (this.tex === "}" && this.TEX.substr(-1) === "{"))) { + this.presup = this.sup, this.presub = this.sub; // save for later + this.sub = this.sup = ""; + this.TEX += this.tex; this.tex = ""; + return; + } } if (this.sub && !this.sup) {this.sup = "\\Space{0pt}{0pt}{.2em}"} // forces subscripts to align properly if ((this.presup || this.presub) && this.tex !== "{") {