commit 26f06754e7141b2d493be98870b79b6f4bba5816
parent b120b1c3d884523f553c7bb5ad2b4d8d597b6ba1
Author: Emily Eisenberg <xymostech@gmail.com>
Date: Wed, 1 Jun 2016 15:10:50 -0700
Merge pull request #490 from cbreeden/Fix#488-supsub-alignment
Fix #488 Subsup alignments
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: