commit 3668bb084e98620d3b20b90c4295e338800d3943
parent 1cf10c4cd6fd374ef211e9f1440287183e5972d3
Author: Christopher Breeden <breeden.christopher@gmail.com>
Date: Wed, 1 Jun 2016 14:21:12 -0500
add msupsub tag to scripts, fix #488
Diffstat:
4 files changed, 4 insertions(+), 1 deletion(-)
diff --git 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
Binary files differ.
diff --git a/test/screenshotter/images/SupSubLeftAlignReset-firefox.png b/test/screenshotter/images/SupSubLeftAlignReset-firefox.png
Binary files differ.
diff --git 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: