8000 Fix the vertical alignment of overunder symbols. · matplotlib/matplotlib@583bb8b · GitHub
[go: up one dir, main page]

Skip to content

Commit 583bb8b

Browse files
committed
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 3df958c commit 583bb8b

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
6644
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)
0