Skip to content
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

[ENH]: Format PercentFormatter based on usetex value #28126

Open
voidstarstar opened this issue Apr 23, 2024 · 1 comment · May be fixed by #28128
Open

[ENH]: Format PercentFormatter based on usetex value #28126

voidstarstar opened this issue Apr 23, 2024 · 1 comment · May be fixed by #28128

Comments

@voidstarstar
Copy link

voidstarstar commented Apr 23, 2024

Problem

When usetex=True, the PercentFormatter renders using text mode instead of math mode.

Proposed solution

It should be treated similar to how ScalarFormatter wraps the string. The entire string should be wrapped including both the number and symbol.

Related:
#26179
#6886
#7965

@voidstarstar
Copy link
Author

I think this can be done by changing this line to:

return r'$\mathdefault{%s}$' % (s + self.symbol)

when text.usetex is True.

@voidstarstar voidstarstar linked a pull request Apr 24, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant