From 7d440cdabc148bc2e9a6a18660adf9befa710da2 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 24 Jan 2024 17:32:42 -0500 Subject: [PATCH] Make sure math item have their metrics set before lazy typesetting. (mathjax/MathJax#3167) --- ts/ui/lazy/LazyHandler.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ts/ui/lazy/LazyHandler.ts b/ts/ui/lazy/LazyHandler.ts index 66de7fd2d..e6cba1b99 100644 --- a/ts/ui/lazy/LazyHandler.ts +++ b/ts/ui/lazy/LazyHandler.ts @@ -604,6 +604,9 @@ B extends MathDocumentConstructor>>( if (math.lazyCompile) { math.state(STATE.COMPILED - 1); state = STATE.COMPILED; + } else if (!math.metrics.hasOwnProperty('em')) { + math.state(STATE.METRICS - 1); + state = STATE.METRICS; } else { math.state(STATE.TYPESET - 1); }