-
-
Notifications
You must be signed in to change notification settings - Fork 655
Use LaTeX commands instead of Unicode characters #40589
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
Conversation
Documentation preview for this PR (built with commit 83b9197; changes) is ready! 🎉 |
916ea36
to
389559a
Compare
Some of this is definitely good, like the change from For things like What commands exactly did you run to build the PDF doc? I've always had trouble with the Sage docbuild, especially with meson. |
I have troubles too. See #40290 . Would be nice if someone contribute to https://doc.sagemath.org/html/en/developer/sage_manuals.html to explain more clearly what needs to be done, I guess. |
The official LaTeX team doesn't want to support it, see https://tex.stackexchange.com/a/628285/250119 section 2.2. We could just How about fixing this on IPython? |
actually Sage already have logic to deal with this: https://doc.sagemath.org/html/en/reference/misc/sage/misc/sagedoc.html You may try it out like this:
So the problem is not modify that module to also substitute Unicode characters. Anyway, out of scope for this pull request. |
The pdf build uses lualatex. Hence, the package |
Another issue is: MathJax does not support several Unicode characters e.g. In any case, everywhere else in the code base LaTeX commands are used. Discussion on whether to use unicode-math can be left for later. |
I agree with this sentiment of @vincentmacri. So maybe just leave the tau's and sigma's untouched in this PR, and see in a follow-up PR if unicode-math (perhaps with a different other font) solves the pdf issues? |
There's another option: use Also, there's the ². If you don't change it to ^2, it renders badly in the HTML also. At least everyone can agree to change that one right? |
I don't really care which package is used. LaTeX is stable enough that I'm not concerned about a package published on CTAN breaking, and I'm even less worried if the package maintainer is an active Sage contributor as well (like yourself).
Changing to |
Bad news, my packages on CTAN breaks all the time. For example when pdflatex was changed to disallow obtaining the More bad news, if I understood correctly if it breaks there isn't really a way to quickly fix it. If I understood correctly currently the CI uses TeX Live distribution, and that one only gets updated once in a while (depending on the Linux distribution). Anyway, we can discuss these options later, for now I'll just revert the σ and τ here. |
389559a
to
83b9197
Compare
okay, reverted. I think build PDF is currently broken (discussed in #40586) so you can't really test this apart from the HTML output. |
LGTM |
Mentioning this for future reference, just came across it. Possibly useful for the LaTeX Greek letters, there is a |
sagemathgh-40589: Use LaTeX commands instead of Unicode characters Because PDF build does not handle Unicode characters correctly. And some are genuine bugs. With this change, there should be less ``` Missing character: There is no τ (U+03C4) in font cmmi10! ``` in the documentation. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#40589 Reported by: user202729 Reviewer(s): Vincent Macri
Because PDF build does not handle Unicode characters correctly. And some are genuine bugs.
With this change, there should be less
in the documentation.
📝 Checklist
⌛ Dependencies