Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 985441c

Browse files
tfpfandrew-fennell
authored andcommitted
Fix the vertical alignment of overunder symbols.
When an overunder symbol has a subscript, it goes below the symbol, and the baseline of the Vlist thus created is actually the baseline of the lowest item in the Vlist. Hence, it must be moved only if there is a subscript, and not otherwise.
1 parent 9a3bb3a commit 985441c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/_mathtext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2200,9 +2200,9 @@ def subsuper(self, s, loc, toks):
22002200
hlist = HCentered([sub])
22012201
hlist.hpack(width, 'exactly')
22022202
vlist.extend([Vbox(0, vgap), hlist])
2203-
shift = hlist.height + vgap
2203+
shift = hlist.height + vgap + nucleus.depth
22042204
vlist = Vlist(vlist)
2205-
vlist.shift_amount = shift + nucleus.depth
2205+
vlist.shift_amount = shift
22062206
result = Hlist([vlist])
22072207
return [result]
22082208

0 commit comments

Comments
 (0)