From b85d23d9a511b492592528296582ead8090a269f Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Fri, 14 Feb 2014 11:04:15 -0500 Subject: [PATCH] Fix incorrect index in mtable (issue #468 wasn't fixed for SVG), and make bounding box information correct for stretched character. Resolves issue #619. --- unpacked/jax/output/SVG/autoload/mtable.js | 4 ++-- unpacked/jax/output/SVG/jax.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/unpacked/jax/output/SVG/autoload/mtable.js b/unpacked/jax/output/SVG/autoload/mtable.js index 4f4662c15..d7133210a 100644 --- a/unpacked/jax/output/SVG/autoload/mtable.js +++ b/unpacked/jax/output/SVG/autoload/mtable.js @@ -72,8 +72,8 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { HD = mo.SVGdata.h + mo.SVGdata.d; if (HD) { min = SVG.length2em(min,mu,HD); - if (min*mo.SVGdata.h/HD > H[j]) {H[j] = min*mo.SVGdata.h/HD} - if (min*mo.SVGdata.d/HD > D[j]) {D[j] = min*mo.SVGdata.d/HD} + if (min*mo.SVGdata.h/HD > H[i]) {H[i] = min*mo.SVGdata.h/HD} + if (min*mo.SVGdata.d/HD > D[i]) {D[i] = min*mo.SVGdata.d/HD} } } else if (mo.SVGcanStretch("Horizontal")) { min = SVG.length2em(min,mu,mo.SVGdata.w); diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js index 0ab43bf26..a2c980559 100644 --- a/unpacked/jax/output/SVG/jax.js +++ b/unpacked/jax/output/SVG/jax.js @@ -1039,6 +1039,7 @@ if (!this.SVGdata) {this.SVGdata = {}} this.SVGdata.w = svg.w, this.SVGdata.x = svg.x; this.SVGdata.h = svg.h, this.SVGdata.d = svg.d; + if (svg.y) {this.SVGdata.h += svg.y; this.SVGdata.d -= svg.y} if (svg.X != null) {this.SVGdata.X = svg.X} if (this["class"]) {svg.removeable = false; SVG.Element(svg.element,{"class":this["class"]})} // FIXME: if an element is split by linebreaking, the ID will be the same on both parts