Skip to content

Commit 24a811f

Browse files
committed
Fix ex-em span references that were missed earlier.
1 parent e9e2afe commit 24a811f

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

unpacked/jax/output/HTML-CSS/autoload/maction.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,13 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
178178
//
179179
// get em sizes (taken from HTMLCSS.preTranslate)
180180
//
181-
var emex = tip.insertBefore(HTMLCSS.EmExSpan.cloneNode(true),tip.firstChild);
182-
var ex = emex.firstChild.offsetHeight/60,
183-
em = emex.lastChild.firstChild.offsetHeight/60;
181+
var emex = tip.insertBefore(HTMLCSS.TestSpan.cloneNode(true),tip.firstChild);
182+
var ex = emex.childNodes[1].offsetHeight/60,
183+
em = emex.childNodes[2].offsetHeight/60;
184+
emex.parentNode.removeChild(emex);
184185
HTMLCSS.em = HTMLCSS.outerEm = MML.mbase.prototype.em = em;
185186
var scale = Math.floor(Math.max(HTMLCSS.config.minScaleAdjust/100,(ex/HTMLCSS.TeX.x_height)/em) * HTMLCSS.config.scale);
186187
tip.firstChild.style.fontSize = scale+"%";
187-
emex.parentNode.removeChild(emex);
188188

189189
var stack = HTMLCSS.createStack(tip.firstChild.firstChild);
190190
var box = HTMLCSS.createBox(stack);

unpacked/jax/output/HTML-CSS/jax.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,8 +869,8 @@
869869
//
870870
// get em sizes (taken from HTMLCSS.preTranslate)
871871
//
872-
var emex = span.appendChild(this.EmExSpan.cloneNode(true));
873-
var em = emex.lastChild.firstChild.offsetHeight/60;
872+
var emex = span.appendChild(this.TestSpan.cloneNode(true));
873+
var em = emex.childNodes[2].offsetHeight/60;
874874
this.em = MML.mbase.prototype.em = em;
875875
this.outerEm = em / jax.HTMLCSS.scale;
876876
emex.parentNode.removeChild(emex);

unpacked/jax/output/SVG/jax.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,8 @@
493493
//
494494
// get em size (taken from this.preTranslate)
495495
//
496-
var emex = span.appendChild(this.ExSpan.cloneNode(true));
497-
var ex = emex.firstChild.offsetHeight/60;
496+
var emex = span.appendChild(this.TestSpan.cloneNode(true));
497+
var ex = emex.childNodes[1].offsetHeight/60;
498498
this.em = MML.mbase.prototype.em = ex / SVG.TeX.x_height * 1000; this.ex = ex;
499499
this.linebreakWidth = jax.SVG.lineWidth; this.cwidth = jax.SVG.cwidth;
500500
emex.parentNode.removeChild(emex);

0 commit comments

Comments
 (0)