www

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

commit 930e35a39daf88b6207d766d3519e93b7bff01c6
parent 16476f8d4436062652efde6c3aea0ae9863d0966
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Sun,  2 Aug 2015 08:55:52 -0400

Merge branch 'issue1225' into develop.  Issue #1225.

Diffstat:
Munpacked/extensions/TeX/AMSmath.js | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/unpacked/extensions/TeX/AMSmath.js b/unpacked/extensions/TeX/AMSmath.js @@ -99,6 +99,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { DeclareMathOperator: 'HandleDeclareOp', operatorname: 'HandleOperatorName', + SkipLimits: 'SkipLimits', genfrac: 'Genfrac', frac: ['Genfrac',"","","",""], @@ -210,7 +211,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { * Handle \DeclareMathOperator */ HandleDeclareOp: function (name) { - var limits = (this.GetStar() ? "" : "\\nolimits"); + var limits = (this.GetStar() ? "" : "\\nolimits\\SkipLimits"); var cs = this.trimSpaces(this.GetArgument(name)); if (cs.charAt(0) == "\\") {cs = cs.substr(1)} var op = this.GetArgument(name); @@ -219,13 +220,18 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { }, HandleOperatorName: function (name) { - var limits = (this.GetStar() ? "" : "\\nolimits"); + var limits = (this.GetStar() ? "" : "\\nolimits\\SkipLimits"); var op = this.trimSpaces(this.GetArgument(name)); op = op.replace(/\*/g,'\\text{*}').replace(/-/g,'\\text{-}'); this.string = '\\mathop{\\rm '+op+'}'+limits+" "+this.string.slice(this.i); this.i = 0; }, + SkipLimits: function (name) { + var c = this.GetNext(), i = this.i; + if (c === "\\" && ++this.i && this.GetCS() !== "limits") this.i = i; + }, + /* * Record presence of \shoveleft and \shoveright */