From 1a38f03966440ed459b8d73eccb3c8d0fd07b570 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 27 Mar 2016 08:24:06 +0530 Subject: [PATCH] MathJax: Fix scale causing equations to not be aligned. See https://github.com/mathjax/MathJax/issues/1422 --- resources/viewer/mathjax/jax/output/SVG/jax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/viewer/mathjax/jax/output/SVG/jax.js b/resources/viewer/mathjax/jax/output/SVG/jax.js index ea221f1d7c..3970d70488 100644 --- a/resources/viewer/mathjax/jax/output/SVG/jax.js +++ b/resources/viewer/mathjax/jax/output/SVG/jax.js @@ -249,7 +249,7 @@ test = script.previousSibling; div = test.previousSibling; jax = script.MathJax.elementJax; if (!jax) continue; ex = test.firstChild.offsetHeight/60; - cwidth = div.previousSibling.firstChild.offsetWidth; + cwidth = div.previousSibling.firstChild.offsetWidth / this.config.scale * 100; if (relwidth) {maxwidth = cwidth} if (ex === 0 || ex === "NaN") { // can't read width, so move to hidden div for processing