-
-
Notifications
You must be signed in to change notification settings - Fork 477
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
use unicode characters to display tables #36857
Conversation
This looks nice. But pdf doc building failure is genuine. pdftex with inputenc package cannot handle those unicode characters. |
The chatbot is useful here too. I like solution 4. We may switch to xetex. The error you're encountering with To resolve this issue, you can try a few things:
|
Related ticket: |
We also have
|
Yes. They may be deleted. |
"DeclareUnicode" in the first two files are already commented out and not used. I deleted them in 708c100 A bunch of "DeclareUnicode" in |
@fchapoton - I think we should just switch to xelatex/lualatex pdf builder, AND also drop (pdf)latex builder (as inferior, obsolete 30-years old tech). I advocate for this on #36861 (@kwankyu wants to keep (pdf)latex builder - but I don't see why) |
#36861 works well with this PR. You may use it as a dependency of this PR. |
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> to support sagemath#36857. There have been numerous problems due to limited support of unicode in pdflatex. I see no reason why we should not switch to modern tex engine lualatex, as suggested in https://www.sphinx-doc.org/en/master/usage/configuration.html#confval- latex_engine We set lualatex as the default engine for - building the sage documentation, in `sage_docbuild/` - rendering pdf images, in `src/sage/misc/latex.py` In `src/sage/misc/latex.py`, the default engine is determined by availability of the engines with the order of preference: lualatex, xelatex, pdflatex. Along the way, we - remove latex-related code deprecated in sagemath#32650. - make lots of cosmetic edits in `src/sage/misc/latex.py` - add support "lualatex" as an alternative to "[pdf|xe]latex" in `src/sage/misc/latex.py` We add optional (dummy) packages `texlive_luatex`, `free_fonts`, `xindy` as new dependencies of `sagemath_doc_pdf` in addition to `texlive` optional package. It seems that depending on the version and the platform, `texlive` may already include the new dependencies. If not, you need to install the new dependencies (as `_recommended` by the dummy package) On Ubuntu, the requirement is fulfilled by ``` sudo apt install texlive texlive-luatex fonts-freefont-otf xindy ``` The built pdf doc is available here: https://deploy-livedoc-- sagemath.netlify.app To test `view` via lualatex, for example, ``` latex.extra_preamble(r"\usepackage{fontspec}\setmainfont{Arial}\setmonof ont{Arial}") view('Εύρηκα') ``` you should build sage on your local platform with this PR. You may need to install `texlive-full` before testing. It seems that `texlive` (2019) is not enough even for the `view` via pdftex. sage-devel thread seeking Unicode testers: https://groups.google.com/g/sage-devel/c/tG2LK6Jvw0I <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36861 Reported by: Kwankyu Lee Reviewer(s): Dima Pasechnik, Kwankyu Lee, Matthias Köppe
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> to support sagemath#36857. There have been numerous problems due to limited support of unicode in pdflatex. I see no reason why we should not switch to modern tex engine lualatex, as suggested in https://www.sphinx-doc.org/en/master/usage/configuration.html#confval- latex_engine We set lualatex as the default engine for - building the sage documentation, in `sage_docbuild/` - rendering pdf images, in `src/sage/misc/latex.py` In `src/sage/misc/latex.py`, the default engine is determined by availability of the engines with the order of preference: lualatex, xelatex, pdflatex. Along the way, we - remove latex-related code deprecated in sagemath#32650. - make lots of cosmetic edits in `src/sage/misc/latex.py` - add support "lualatex" as an alternative to "[pdf|xe]latex" in `src/sage/misc/latex.py` We add optional (dummy) packages `texlive_luatex`, `free_fonts`, `xindy` as new dependencies of `sagemath_doc_pdf` in addition to `texlive` optional package. It seems that depending on the version and the platform, `texlive` may already include the new dependencies. If not, you need to install the new dependencies (as `_recommended` by the dummy package) On Ubuntu, the requirement is fulfilled by ``` sudo apt install texlive texlive-luatex fonts-freefont-otf xindy ``` The built pdf doc is available here: https://deploy-livedoc-- sagemath.netlify.app To test `view` via lualatex, for example, ``` latex.extra_preamble(r"\usepackage{fontspec}\setmainfont{Arial}\setmonof ont{Arial}") view('Εύρηκα') ``` you should build sage on your local platform with this PR. You may need to install `texlive-full` before testing. It seems that `texlive` (2019) is not enough even for the `view` via pdftex. sage-devel thread seeking Unicode testers: https://groups.google.com/g/sage-devel/c/tG2LK6Jvw0I <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> Resolves sagemath#18370 <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36861 Reported by: Kwankyu Lee Reviewer(s): Dima Pasechnik, Kwankyu Lee, Matthias Köppe
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> to support sagemath#36857. There have been numerous problems due to limited support of unicode in pdflatex. I see no reason why we should not switch to modern tex engine lualatex, as suggested in https://www.sphinx-doc.org/en/master/usage/configuration.html#confval- latex_engine We set lualatex as the default engine for - building the sage documentation, in `sage_docbuild/` - rendering pdf images, in `src/sage/misc/latex.py` In `src/sage/misc/latex.py`, the default engine is determined by availability of the engines with the order of preference: lualatex, xelatex, pdflatex. Along the way, we - remove latex-related code deprecated in sagemath#32650. - make lots of cosmetic edits in `src/sage/misc/latex.py` - add support "lualatex" as an alternative to "[pdf|xe]latex" in `src/sage/misc/latex.py` We add optional (dummy) packages `texlive_luatex`, `free_fonts`, `xindy` as new dependencies of `sagemath_doc_pdf` in addition to `texlive` optional package. It seems that depending on the version and the platform, `texlive` may already include the new dependencies. If not, you need to install the new dependencies (as `_recommended` by the dummy package) On Ubuntu, the requirement is fulfilled by ``` sudo apt install texlive texlive-luatex fonts-freefont-otf xindy ``` The built pdf doc is available here: https://deploy-livedoc-- sagemath.netlify.app To test `view` via lualatex, for example, ``` latex.extra_preamble(r"\usepackage{fontspec}\setmainfont{Arial}\setmonof ont{Arial}") view('Εύρηκα') ``` you should build sage on your local platform with this PR. You may need to install `texlive-full` before testing. It seems that `texlive` (2019) is not enough even for the `view` via pdftex. sage-devel thread seeking Unicode testers: https://groups.google.com/g/sage-devel/c/tG2LK6Jvw0I <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> Resolves sagemath#18370 <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36861 Reported by: Kwankyu Lee Reviewer(s): Dima Pasechnik, Kwankyu Lee, Matthias Köppe
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> to support sagemath#36857. There have been numerous problems due to limited support of unicode in pdflatex. I see no reason why we should not switch to modern tex engine lualatex, as suggested in https://www.sphinx-doc.org/en/master/usage/configuration.html#confval- latex_engine We set lualatex as the default engine for - building the sage documentation, in `sage_docbuild/` - rendering pdf images, in `src/sage/misc/latex.py` In `src/sage/misc/latex.py`, the default engine is determined by availability of the engines with the order of preference: lualatex, xelatex, pdflatex. Along the way, we - remove latex-related code deprecated in sagemath#32650. - make lots of cosmetic edits in `src/sage/misc/latex.py` - add support "lualatex" as an alternative to "[pdf|xe]latex" in `src/sage/misc/latex.py` We add optional (dummy) packages `texlive_luatex`, `free_fonts`, `xindy` as new dependencies of `sagemath_doc_pdf` in addition to `texlive` optional package. It seems that depending on the version and the platform, `texlive` may already include the new dependencies. If not, you need to install the new dependencies (as `_recommended` by the dummy package) On Ubuntu, the requirement is fulfilled by ``` sudo apt install texlive texlive-luatex fonts-freefont-otf xindy ``` The built pdf doc is available here: https://deploy-livedoc-- sagemath.netlify.app To test `view` via lualatex, for example, ``` latex.extra_preamble(r"\usepackage{fontspec}\setmainfont{Arial}\setmonof ont{Arial}") view('Εύρηκα') ``` you should build sage on your local platform with this PR. You may need to install `texlive-full` before testing. It seems that `texlive` (2019) is not enough even for the `view` via pdftex. sage-devel thread seeking Unicode testers: https://groups.google.com/g/sage-devel/c/tG2LK6Jvw0I <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> Resolves sagemath#18370 <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36861 Reported by: Kwankyu Lee Reviewer(s): Dima Pasechnik, Kwankyu Lee, Matthias Köppe
Documentation preview for this PR (built with commit d03c94c; changes) is ready! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This is using unicode box-drawing characters to make better-looking tables. ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. ### ⌛ Dependencies - sagemath#36861 <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> URL: sagemath#36857 Reported by: Frédéric Chapoton Reviewer(s): Kwankyu Lee
This is using unicode box-drawing characters to make better-looking tables. ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. ### ⌛ Dependencies - sagemath#36861 <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> URL: sagemath#36857 Reported by: Frédéric Chapoton Reviewer(s): Kwankyu Lee
This is using unicode box-drawing characters to make better-looking tables.
📝 Checklist
⌛ Dependencies