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

Appearance settings

Correctly remove support for \stackrel. #18533

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 3 commits into from
Sep 21, 2020
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 2 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 8 lib/matplotlib/_mathtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -2059,7 +2059,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 @@ -2144,12 +2143,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 @@ -2206,7 +2199,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 4 lib/matplotlib/tests/test_mathtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,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 @@ -242,8 +240,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 2 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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.