Skip to content

Commit aa82b50

Browse files
authored
Merge pull request #18533 from anntzer/unstackrel
Correctly remove support for \stackrel.
2 parents 4148262 + 930eaac commit aa82b50

File tree

4 files changed

+2
-14
lines changed

4 files changed

+2
-14
lines changed

doc/api/prev_api_changes/api_changes_3.1.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ Mathtext changes
727727

728728
Deprecations
729729
~~~~~~~~~~~~
730-
- The ``\stackrel`` mathtext command hsa been deprecated (it behaved differently
730+
- The ``\stackrel`` mathtext command has been deprecated (it behaved differently
731731
from LaTeX's ``\stackrel``. To stack two mathtext expressions, use
732732
``\genfrac{left-delim}{right-delim}{fraction-bar-thickness}{}{top}{bottom}``.
733733
- The ``\mathcircled`` mathtext command (which is not a real TeX command)

lib/matplotlib/_mathtext.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,7 +2059,6 @@ def __init__(self):
20592059
p.accentprefixed = Forward()
20602060
p.space = Forward()
20612061
p.sqrt = Forward()
2062-
p.stackrel = Forward()
20632062
p.start_group = Forward()
20642063
p.subsuper = Forward()
20652064
p.subsuperop = Forward()
@@ -2144,12 +2143,6 @@ def __init__(self):
21442143
| Error(r"Expected \dfrac{num}{den}"))
21452144
)
21462145

2147-
p.stackrel <<= Group(
2148-
Suppress(Literal(r"\stackrel"))
2149-
- ((p.required_group + p.required_group)
2150-
| Error(r"Expected \stackrel{num}{den}"))
2151-
)
2152-
21532146
p.binom <<= Group(
21542147
Suppress(Literal(r"\binom"))
21552148
- ((p.required_group + p.required_group)
@@ -2206,7 +2199,6 @@ def __init__(self):
22062199
| p.group
22072200
| p.frac
22082201
| p.dfrac
2209-
| p.stackrel
22102202
| p.binom
22112203
| p.genfrac
22122204
| p.sqrt

lib/matplotlib/tests/test_mathtext.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,6 @@ def test_fontinfo():
218218
(r'$\hspace{foo}$', r'Expected \hspace{n}'),
219219
(r'$\frac$', r'Expected \frac{num}{den}'),
220220
(r'$\frac{}{}$', r'Expected \frac{num}{den}'),
221-
(r'$\stackrel$', r'Expected \stackrel{num}{den}'),
222-
(r'$\stackrel{}{}$', r'Expected \stackrel{num}{den}'),
223221
(r'$\binom$', r'Expected \binom{num}{den}'),
224222
(r'$\binom{}{}$', r'Expected \binom{num}{den}'),
225223
(r'$\genfrac$',
@@ -242,8 +240,6 @@ def test_fontinfo():
242240
'hspace with invalid value',
243241
'frac without parameters',
244242
'frac with empty parameters',
245-
'stackrel without parameters',
246-
'stackrel with empty parameters',
247243
'binom without parameters',
248244
'binom with empty parameters',
249245
'genfrac without parameters',

tutorials/text/mathtext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
9898
.. math::
9999
100-
\frac{3}{4} \binom{3}{4} \stackrel{}{}{0}{}{3}{4}
100+
\frac{3}{4} \binom{3}{4} \genfrac{}{}{0}{}{3}{4}
101101
102102
Fractions can be arbitrarily nested::
103103

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy