From a1e341a5c688a0068934d5c593a21c1d1f5f2b67 Mon Sep 17 00:00:00 2001 From: Ron Kok Date: Fri, 22 Mar 2019 08:37:05 -0700 Subject: [PATCH] Improve MathML for \overset, \stackrel, and \underset (#1886) * Fix \overset and \stackrel * Fix indentation --- src/functions/supsub.js | 4 ++-- test/__snapshots__/mathml-spec.js.snap | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/functions/supsub.js b/src/functions/supsub.js index 2769f851..c1ed88c6 100644 --- a/src/functions/supsub.js +++ b/src/functions/supsub.js @@ -217,7 +217,7 @@ defineFunctionBuilders({ } else if (!group.sub) { const base = group.base; if (base && base.type === "op" && base.limits && - options.style === Style.DISPLAY) { + (options.style === Style.DISPLAY || base.alwaysHandleSupSub)) { nodeType = "mover"; } else { nodeType = "msup"; @@ -225,7 +225,7 @@ defineFunctionBuilders({ } else if (!group.sup) { const base = group.base; if (base && base.type === "op" && base.limits && - options.style === Style.DISPLAY) { + (options.style === Style.DISPLAY || base.alwaysHandleSupSub)) { nodeType = "munder"; } else { nodeType = "msub"; diff --git a/test/__snapshots__/mathml-spec.js.snap b/test/__snapshots__/mathml-spec.js.snap index 42ac5c99..bcf33615 100644 --- a/test/__snapshots__/mathml-spec.js.snap +++ b/test/__snapshots__/mathml-spec.js.snap @@ -344,7 +344,7 @@ exports[`A MathML builder should output \\limsup_{x \\rightarrow \\infty} correc - + lim sup @@ -364,7 +364,7 @@ exports[`A MathML builder should output \\limsup_{x \\rightarrow \\infty} correc ∞ - + \\limsup_{x \\rightarrow \\infty}