Merge pull request #718 from kohler/fix-711

Fix #711 issue with multiple superscripts.
This commit is contained in:
Kevin Barabash
2017-06-06 20:38:10 -04:00
committed by GitHub
12 changed files with 8 additions and 3 deletions

View File

@@ -334,8 +334,13 @@ groupTypes.supsub = function(group, options) {
supShift = 0;
subShift = 0;
} else {
supShift = base.height - style.metrics.supDrop;
subShift = base.depth + style.metrics.subDrop;
const supstyle = style.sup();
supShift = base.height - supstyle.metrics.supDrop
* supstyle.sizeMultiplier;
const substyle = style.sub();
subShift = base.depth + substyle.metrics.subDrop
* substyle.sizeMultiplier;
}
// Rule 18c

View File

@@ -15,7 +15,7 @@ const cjkRegex = require("./unicodeRegexes").cjkRegex;
// the arrays below, in that order.
//
// The font metrics are stored in fonts cmsy10, cmsy7, and cmsy5 respsectively.
// This was determined by running the folllowing script:
// This was determined by running the following script:
//
// latex -interaction=nonstopmode \
// '\documentclass{article}\usepackage{amsmath}\begin{document}' \

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB