Title: [Bug]: minus signs not rendered in PDF export with TeX · Issue #31925 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: minus signs not rendered in PDF export with TeX · Issue #31925 · matplotlib/matplotlib
X Title: [Bug]: minus signs not rendered in PDF export with TeX · Issue #31925 · matplotlib/matplotlib
Description: Bug summary When I use TeX to render, minus signs do not appear in exported PDFs anymore. They show fine in Jupyter and exported PNGs or SVGs. Other mathematical symbols are unaffected (also see the example). So far, I only found minus s...
Open Graph Description: Bug summary When I use TeX to render, minus signs do not appear in exported PDFs anymore. They show fine in Jupyter and exported PNGs or SVGs. Other mathematical symbols are unaffected (also see th...
X Description: Bug summary When I use TeX to render, minus signs do not appear in exported PDFs anymore. They show fine in Jupyter and exported PNGs or SVGs. Other mathematical symbols are unaffected (also see th...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/31925
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: minus signs not rendered in PDF export with TeX","articleBody":"### Bug summary\n\nWhen I use TeX to render, minus signs do not appear in exported PDFs anymore.\n\n* They show fine in Jupyter and exported PNGs or SVGs.\n* Other mathematical symbols are unaffected (also see the example). So far, I only found minus signs to be affected.\n* Activating `axes.unicode_minus` doesn’t help.\n* If I downgrade Matplotlib to 3.10.9 (and leave everything the same), the minuses are rendered. I therefore would exclude a straightforward problem with my TeX installation etc. Perhaps, this is related to #30039.\n\n### Code for reproduction\n\n```Python\nfrom matplotlib.pyplot import subplots\nfrom matplotlib import rcParams\n\nrcParams[\"text.usetex\"] = True\n# rcParams[\"axes.unicode_minus\"] = False\n\nfig,axes = subplots(figsize=(3,2))\naxes.plot([-1, 1], [-1, 1])\naxes.text(-0.5,0.5,r\"$\\sum_{\\alpha=-1}^{\\Psi} \\pm \\pi$\")\n\nfig.savefig(\"test.pdf\")\n```\n\n### Actual outcome\n\n\u003cimg width=\"300\" height=\"200\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d8ba2001-3a66-4899-a2f8-f0bd6acce89f\" /\u003e\n\n### Expected outcome\n\n\u003cimg width=\"300\" height=\"200\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/30c35c64-c7c3-4bed-9e77-34e8be0bf7b4\" /\u003e\n\n### Operating system\n\nArch\n\n### Matplotlib Version\n\n3.11.0\n\n### Matplotlib Backend\n\nqtagg\n\n### Python version\n\n3.14.5\n\n### Installation\n\nLinux package manager","author":{"url":"https://github.com/Wrzlprmft","@type":"Person","name":"Wrzlprmft"},"datePublished":"2026-06-19T12:01:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/31925/matplotlib/issues/31925"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2fee6bc5-6b01-9d29-e4d0-c383a4c6cedf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA04:1D19FE:99F9D8:D08546:6A520127 |
| html-safe-nonce | 6a8c64c1b81b6c69658b27509b9e2796b6b264595b35c8dcb1bcc35be7de8a5e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTA0OjFEMTlGRTo5OUY5RDg6RDA4NTQ2OjZBNTIwMTI3IiwidmlzaXRvcl9pZCI6Ijc5MTM5NDU1ODkzNzI1NTE0NjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9549fe97453b647c87fcb1a82926e02ae37720417182e8051fd716c5c16e45ad |
| hovercard-subject-tag | issue:4700516654 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/31925/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0c1153e4fa690bf27945769f4444aa8b7de93c7e74f14a6d48b21801717e97c0/matplotlib/matplotlib/issues/31925 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0c1153e4fa690bf27945769f4444aa8b7de93c7e74f14a6d48b21801717e97c0/matplotlib/matplotlib/issues/31925 |
| og:image:alt | Bug summary When I use TeX to render, minus signs do not appear in exported PDFs anymore. They show fine in Jupyter and exported PNGs or SVGs. Other mathematical symbols are unaffected (also see th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Wrzlprmft |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width