From 49ede41339eb2d6efc6d4d6d2d53965541ecb05e Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sun, 4 May 2014 17:46:34 -0400 Subject: [PATCH] Handle MSIE padding bug properly when linebreaking mmultiscripts and when adding nulldelimiterspace wround fractions. --- unpacked/jax/output/HTML-CSS/autoload/multiline.js | 5 ++++- unpacked/jax/output/HTML-CSS/jax.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/unpacked/jax/output/HTML-CSS/autoload/multiline.js b/unpacked/jax/output/HTML-CSS/autoload/multiline.js index 2c8584a8c..a81a86dc5 100644 --- a/unpacked/jax/output/HTML-CSS/autoload/multiline.js +++ b/unpacked/jax/output/HTML-CSS/autoload/multiline.js @@ -571,7 +571,10 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { HTMLmoveLine: function (start,end,span,state,values) { var SPAN = this.HTMLspanElement(), data = SPAN.bbox, base = data, - stack = SPAN.firstChild, box = stack.firstChild, dx, BOX = {}; + stack = SPAN.firstChild,dx, BOX = {}; + if (HTMLCSS.msiePaddingWidthBug) {stack = stack.nextSibling} + var box = stack.firstChild; + // // Get the boxes for the scripts (if any) // diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js index 71aca8a81..ccb64156c 100644 --- a/unpacked/jax/output/HTML-CSS/jax.js +++ b/unpacked/jax/output/HTML-CSS/jax.js @@ -2460,7 +2460,7 @@ // (TeXBook pg 150 and Appendix G rule 15e) // var space = HTMLCSS.TeX.nulldelimiterspace * this.mscale; - var style = span.firstChild.style; + var style = span.childNodes[HTMLCSS.msiePaddingWidthBug ? 1 : 0].style; style.marginLeft = style.marginRight = HTMLCSS.Em(space); span.bbox.w += 2*space; span.bbox.r += 2*space; }