Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Description
Bug summary
I encountered an issue while using the mathtext module in matplotlib. The problem arises when trying to parse LaTeX expressions containing the "\limits" command. The "\limits" command is used in LaTeX to specify that certain mathematical operators should have their subscripts and superscripts displayed above and below, especially when used with "\int".
For example,\int \limits _ { v } ^ { \mu e } e d A
get
and\int_ { v } ^ { \mu e } e d A
get
Code for reproduction
frommatplotlibimportmathtextlatex_text=r"$\int\limits_{ v } ^ { \mu e } e d A$"mathtext.math_to_image(latex_text,'test.png')
Actual outcome
ValueError:
\int\limits_{ v } ^ { \mu e } e d A
^
ParseFatalException: Unknown symbol: \limits, found '' (at char 4), (line:1, col:5)
Expected outcome
Additional information
No response
Operating system
Windows
Matplotlib Version
3.8.4
Matplotlib Backend
module://matplotlib_inline.backend_inline
Python version
3.9.13
Jupyter version
1.0.0
Installation
pip