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

Skip to content

Backport PR #18533 on branch v3.3.x #18725

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/api/prev_api_changes/api_changes_3.1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ Mathtext changes

Deprecations
~~~~~~~~~~~~
- The ``\stackrel`` mathtext command hsa been deprecated (it behaved differently
- The ``\stackrel`` mathtext command has been deprecated (it behaved differently
from LaTeX's ``\stackrel``. To stack two mathtext expressions, use
``\genfrac{left-delim}{right-delim}{fraction-bar-thickness}{}{top}{bottom}``.
- The ``\mathcircled`` mathtext command (which is not a real TeX command)
Expand Down
8 changes: 0 additions & 8 deletions lib/matplotlib/mathtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -2396,7 +2396,6 @@ def __init__(self):
p.accentprefixed = Forward()
p.space = Forward()
p.sqrt = Forward()
p.stackrel = Forward()
p.start_group = Forward()
p.subsuper = Forward()
p.subsuperop = Forward()
Expand Down Expand Up @@ -2481,12 +2480,6 @@ def __init__(self):
| Error(r"Expected \dfrac{num}{den}"))
)

p.stackrel <<= Group(
Suppress(Literal(r"\stackrel"))
- ((p.required_group + p.required_group)
| Error(r"Expected \stackrel{num}{den}"))
)

p.binom <<= Group(
Suppress(Literal(r"\binom"))
- ((p.required_group + p.required_group)
Expand Down Expand Up @@ -2543,7 +2536,6 @@ def __init__(self):
| p.group
| p.frac
| p.dfrac
| p.stackrel
| p.binom
| p.genfrac
| p.sqrt
Expand Down
4 changes: 0 additions & 4 deletions lib/matplotlib/tests/test_mathtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,6 @@ def test_fontinfo():
(r'$\hspace{foo}$', r'Expected \hspace{n}'),
(r'$\frac$', r'Expected \frac{num}{den}'),
(r'$\frac{}{}$', r'Expected \frac{num}{den}'),
(r'$\stackrel$', r'Expected \stackrel{num}{den}'),
(r'$\stackrel{}{}$', r'Expected \stackrel{num}{den}'),
(r'$\binom$', r'Expected \binom{num}{den}'),
(r'$\binom{}{}$', r'Expected \binom{num}{den}'),
(r'$\genfrac$',
Expand All @@ -238,8 +236,6 @@ def test_fontinfo():
'hspace with invalid value',
'frac without parameters',
'frac with empty parameters',
'stackrel without parameters',
'stackrel with empty parameters',
'binom without parameters',
'binom with empty parameters',
'genfrac without parameters',
Expand Down
2 changes: 1 addition & 1 deletion tutorials/text/mathtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

.. math::

\frac{3}{4} \binom{3}{4} \stackrel{}{}{0}{}{3}{4}
\frac{3}{4} \binom{3}{4} \genfrac{}{}{0}{}{3}{4}

Fractions can be arbitrarily nested::

Expand Down