Title: Matplotlib cannot parse TeX with \text command · Issue #18520 · matplotlib/matplotlib · GitHub
Open Graph Title: Matplotlib cannot parse TeX with \text command · Issue #18520 · matplotlib/matplotlib
X Title: Matplotlib cannot parse TeX with \text command · Issue #18520 · matplotlib/matplotlib
Description: Hello! Minimal example: import matplotlib as plt fig, ax = plt.subplots() ax.text(0, 0, r'$s_\text{ind}$') Result: ValueError: s_\text{ind} ^ Expected {accentprefixed | accent | symbol | c_over_c | function | group | frac | dfrac | stack...
Open Graph Description: Hello! Minimal example: import matplotlib as plt fig, ax = plt.subplots() ax.text(0, 0, r'$s_\text{ind}$') Result: ValueError: s_\text{ind} ^ Expected {accentprefixed | accent | symbol | c_over_c |...
X Description: Hello! Minimal example: import matplotlib as plt fig, ax = plt.subplots() ax.text(0, 0, r'$s_\text{ind}$') Result: ValueError: s_\text{ind} ^ Expected {accentprefixed | accent | symbol | c_...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/18520
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Matplotlib cannot parse TeX with \\text command","articleBody":"Hello!\r\n\r\nMinimal example:\r\n\r\n```python\r\nimport matplotlib as plt\r\nfig, ax = plt.subplots()\r\nax.text(0, 0, r'$s_\\text{ind}$')\r\n```\r\n\r\nResult:\r\n```\r\nValueError: \r\ns_\\text{ind}\r\n ^\r\nExpected {accentprefixed | accent | symbol | c_over_c | function | group | frac | dfrac | stackrel | binom | genfrac | sqrt | overline | operatorname}, found 'e' (at char 4), (line:1, col:5)\r\n```\r\n\r\nAs far as I remember, `r` means raw string, so `\\t` mustn't interpreter as tab. I tried `\\\\t` and other ways to avoid this problem but I didn't find any workaround for this case yet... So it seems to me I found a bug.\r\n\r\nI use Python 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)],\r\nMatplotlib version is 3.3.1. I tried my code in JupyterLab ver. 2.2.7 on Windows 10.\r\nMatplotlib backend is `module://ipykernel.pylab.backend_inline`.\r\n\r\nBest regards,\r\nSindzicat.\r\n","author":{"url":"https://github.com/sindzicat","@type":"Person","name":"sindzicat"},"datePublished":"2020-09-18T17:03:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/18520/matplotlib/issues/18520"}
| 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:4d266791-e5bf-9e37-a48f-17a2e33c559a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF58:341B39:25E077:33321A:6A52E614 |
| html-safe-nonce | 6564b88c7b929e1676397b23f668d43fd6dee42b4ad21b2642f899920cf69d66 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjU4OjM0MUIzOToyNUUwNzc6MzMzMjFBOjZBNTJFNjE0IiwidmlzaXRvcl9pZCI6IjkyMDE3MTAwMDkxNzg0NTUyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c2d681c6c9d764f2e046f79b539e25c9f2d444fd71b802e3af4d7091dad5366c |
| hovercard-subject-tag | issue:704526992 |
| 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/18520/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dd665b7bb8263ce817b6d6a2f8dc0c9bad91c28e543f8a39010353b7896450cc/matplotlib/matplotlib/issues/18520 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dd665b7bb8263ce817b6d6a2f8dc0c9bad91c28e543f8a39010353b7896450cc/matplotlib/matplotlib/issues/18520 |
| og:image:alt | Hello! Minimal example: import matplotlib as plt fig, ax = plt.subplots() ax.text(0, 0, r'$s_\text{ind}$') Result: ValueError: s_\text{ind} ^ Expected {accentprefixed | accent | symbol | c_over_c |... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sindzicat |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width