www

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

commit 239cfe33e5cdb9c22b75c5d417d5116d7047d979
parent defe996cf74b73097963269806892d256a98a944
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Wed,  9 Apr 2014 15:59:43 -0400

Fix a few bugs with scaling in HTML-CS mode.

Diffstat:
Munpacked/jax/output/HTML-CSS/autoload/mmultiscripts.js | 4+++-
Munpacked/jax/output/HTML-CSS/autoload/multiline.js | 2+-
Munpacked/jax/output/HTML-CSS/jax.js | 3++-
3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/unpacked/jax/output/HTML-CSS/autoload/mmultiscripts.js b/unpacked/jax/output/HTML-CSS/autoload/mmultiscripts.js @@ -46,10 +46,12 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { var BOX = this.HTMLgetScripts(stack,s); var sub = BOX[0], sup = BOX[1], presub = BOX[2], presup = BOX[3]; + // // <mmultiscripts> children other than the base can be <none/>, // <mprescripts/>, <mrow></mrow> etc so try to get HTMLgetScale from the // first element with a spanID. See issue 362. - var sscale = this.HTMLgetScale(); + // + var sscale = scale; for (var i = 1; i < this.data.length; i++) { if (this.data[i] && this.data[i].spanID) { sscale = this.data[i].HTMLgetScale(); diff --git a/unpacked/jax/output/HTML-CSS/autoload/multiline.js b/unpacked/jax/output/HTML-CSS/autoload/multiline.js @@ -92,7 +92,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { var stack = HTMLCSS.createStack(span); var state = { n: 0, Y: 0, - scale: this.HTMLgetScale(), + scale: this.scale, isTop: isTop, values: {}, VALUES: VALUES diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js @@ -2391,6 +2391,7 @@ style.marginLeft = style.marginRight = HTMLCSS.Em(space); span.bbox.w += 2*space; span.bbox.r += 2*space; } + this.SUPER(arguments).HTMLhandleSpace.call(this,span); } }); @@ -2551,7 +2552,7 @@ if (stretch[i]) {box.bbox = this.data[i].HTMLstretchH(box,W).bbox} if (box.bbox.w > WW) {WW = box.bbox.w} }} - var t = HTMLCSS.TeX.rule_thickness, factor = HTMLCSS.FONTDATA.TeX_factor; + var t = HTMLCSS.TeX.rule_thickness * this.mscale, factor = HTMLCSS.FONTDATA.TeX_factor; var base = boxes[this.base] || {bbox: this.HTMLzeroBBox()}; var x, y, z1, z2, z3, dw, k, delta = 0; if (base.bbox.ic) {delta = 1.3*base.bbox.ic + .05} // adjust faked IC to be more in line with expeted results