Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit43b5455

Browse files
committed
fix no nucleus in mathtext
1 parent341d481 commit43b5455

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎lib/matplotlib/mathtext.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2791,7 +2791,8 @@ def subsuper(self, s, loc, toks):
27912791
# create new Hlist without kerning
27922792
nucleus=Hlist(new_children,do_kern=False)
27932793
else:
2794-
last_char.width=last_char._metrics.advance
2794+
ifisinstance(nucleus,Char):
2795+
last_char.width=last_char._metrics.advance
27952796
nucleus=Hlist([nucleus])
27962797

27972798
# Handle regular sub/superscripts

‎lib/matplotlib/tests/test_mathtext.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
r'$xyz^kx_kx^py^{p-2} d_i^jb_jc_kd x^j_i E^0 E^0_u$',# github issue #4873
102102
r'${xyz}^k{x}_{k}{x}^{p}{y}^{p-2} {d}_{i}^{j}{b}_{j}{c}_{k}{d} {x}^{j}_{i}{E}^{0}{E}^0_u$',
103103
r'${\int}_x^x x\oint_x^x x\int_{X}^{X}x\int_x x \int^x x \int_{x} x\int^{x}{\int}_{x} x{\int}^{x}_{x}x$',
104+
r'testing$^{123}$',
104105

105106
]
106107

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp