-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
sage.misc.latex: Replace have_... functions by Features #32650
Comments
This comment has been minimized.
This comment has been minimized.
Commit: |
Author: Sébastien Labbé |
comment:2
Here is some work towards that goal removing all uses of New commits:
|
Branch: u/slabbe/32650 |
comment:3
Remainings usage of
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:6
I suggest this ticket should handle only the removal of TODO: Answer this question: do we want |
comment:9
Replying to @seblabbe:
I decided to get rid of the |
comment:10
On my side, the command
currently gives:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
Needs review! |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:14
I added a commit to fix a pyflakes warning. |
comment:15
@mkoeppe: I have a question for you with respect to a choice I made I am not sure of. Within the class |
comment:16
Great question. In this code:
it would probably be good to use |
comment:33
While at it, also dummy script packages for |
comment:34
ok, I can do this, but next week. Going to bed now! |
Reviewer: Matthias Koeppe |
comment:36
LGTM. One green patchbot, one patchbot that is not feeling well. |
Changed branch from u/slabbe/32650 to |
comment:38
There does not seem to be a Cygwin package for pdf2svg. At least I could not find one by searching Cygwin packages via and the command |
Changed commit from |
comment:39
Do you mean that the file |
comment:40
Yes, otherwise configure ends with a recommendation |
comment:41
Or package pdf2svg for Cygwin... : ) |
comment:42
I created #32931 to deal with this issue. |
comment:43
A request on the Cygwin mailing list to package pdf2svg
That suggests It seems poppler is widely packaged: |
comment:44
Then, should we replace |
why do we have |
<!-- ^^^^^ 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
... or more generally, replacing all uses of
sage.misc.os_tools.have_program
byExecutable
Depends on #32634
CC: @kwankyu
Component: refactoring
Author: Sébastien Labbé
Branch:
2ea4d9e
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/32650
The text was updated successfully, but these errors were encountered: