-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: \right) is replaced with exclamation mark when using fontset='cm' #29886
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
Comments
FWIW I cannot reproduce the issue? |
I can't reproduce it either. @oscargus did you get this to happen? @Mackemania how have you installed LaTeX |
No. (I have some weird installation issue on my Windows laptop, so wasn't able to try it. Just tagged it.) |
I am able to reproduce the issue. My system:
I'm on |
I can also reproduce this issue. I have matplotlib |
Here is some more information. With the following code import matplotlib.pyplot as plt
plt.rc('mathtext', fontset='cm')
import matplotlib.mathtext
import matplotlib.font_manager as fm
for s in range(10, 35):
fp = fm.FontProperties(size=s)
matplotlib.mathtext.math_to_image("$\\left(\\int_x^x \\right) \\quad + 1$", f'example{s}.png', prop=fp) I get the exclamation point output for sizes 10-14, and 16; but not any of the others. This is very similar behavior to #5210 |
This is in fact a duplicate of #5210. |
Bug summary
This is similar to 5210. The right big parenthesis is replaced with an exclamation mark for certain latex code.
Multiple queries were tested as follows.
Code for reproduction
Actual outcome
Actual:

Expected outcome
Expected:

(But with the upper bound of the integral present)
Additional information
I have only tested with mathtext fontset 'cm' and without setting it. The default font does display it correctly.
As far as I've tested it only happens when both upper and lower bound of the integral is set. Using \sum or \iint instead of \int also works correctly with both bounds. \oint however causes the same issue.
Operating system
Windows
Matplotlib Version
3.10.0
Matplotlib Backend
module://backend_interagg
Python version
3.12.5, 3.13
Jupyter version
No response
Installation
pip
The text was updated successfully, but these errors were encountered: