diff --git a/src/buildHTML.js b/src/buildHTML.js index cc6b30314..2d1ba65ff 100644 --- a/src/buildHTML.js +++ b/src/buildHTML.js @@ -376,8 +376,9 @@ groupTypes.supsub = function(group, options, prev) { supsub.children[1].style.marginRight = scriptspace; } + // We ensure to wrap the supsub vlist in a span.msupsub to reset text-align return makeSpan([getTypeOfGroup(group.value.base)], - [base, supsub]); + [base, makeSpan(["msupsub"], [supsub])]); }; groupTypes.genfrac = function(group, options, prev) { diff --git a/test/screenshotter/images/SupSubLeftAlignReset-chrome.png b/test/screenshotter/images/SupSubLeftAlignReset-chrome.png new file mode 100644 index 000000000..95fb8a4cb Binary files /dev/null and b/test/screenshotter/images/SupSubLeftAlignReset-chrome.png differ diff --git a/test/screenshotter/images/SupSubLeftAlignReset-firefox.png b/test/screenshotter/images/SupSubLeftAlignReset-firefox.png new file mode 100644 index 000000000..88e7ae739 Binary files /dev/null and b/test/screenshotter/images/SupSubLeftAlignReset-firefox.png differ diff --git a/test/screenshotter/ss_data.yaml b/test/screenshotter/ss_data.yaml index a14b7fce5..a2ae511d7 100644 --- a/test/screenshotter/ss_data.yaml +++ b/test/screenshotter/ss_data.yaml @@ -106,6 +106,8 @@ SqrtRoot: | SupSubCharacterBox: a_2f_2{f}_2{aa}_2{af}_2 SupSubHorizSpacing: | x^{x^{x}}\Big|x_{x_{x_{x_{x}}}}\bigg|x^{x^{x_{x_{x_{x_{x}}}}}}\bigg| +SupSubLeftAlignReset: | + \omega^8_{888} \quad \frac{1}{\hat{\omega}^{8}_{888}} \quad \displaystyle\sum_{\omega^{8}_{888}} SupSubOffsets: \displaystyle \int_{2+3}x f^{2+3}+3\lim_{2+3+4+5}f Text: \frac{a}{b}\text{c~ {ab} \ e}+fg UnsupportedCmds: