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

Latexify of irrational numbers produces weird identity transformation #1254

Closed
hersle opened this issue Sep 2, 2024 · 3 comments · Fixed by #1255
Closed

Latexify of irrational numbers produces weird identity transformation #1254

hersle opened this issue Sep 2, 2024 · 3 comments · Fixed by #1255

Comments

@hersle
Copy link
Contributor

hersle commented Sep 2, 2024

using Symbolics, Latexify
latexify(π) # produces nice L"$π$"
latexify~ 0) # produces ugly L"\begin{equation} \mathrm{identity}\left( \pi \right) = 0 \end{equation}"
@hersle
Copy link
Contributor Author

hersle commented Sep 2, 2024

I guess the Latexify recipe "naively" adds the identity from here.

Why is that there? Should a fix for this override the Latexify recipes?

@ChrisRackauckas
Copy link
Member

If you wrap it in a term you have to have a function. We want to change the representation of literals very soon anyways, so maybe we should wait on that.

@hersle
Copy link
Contributor Author

hersle commented Sep 2, 2024

Thanks, I see. I made a relatively simple fix, feel free to merge it if you think it's worthwhile before the rewrite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants