Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up[WIP] bpo-31589: Build PDF using xelatex for better UTF8 support. #3940
Conversation
This comment has been minimized.
This comment has been minimized.
If someone want to test it locally, after checking-out my branch and installing texlive-xetex, texlive-fonts-recommended, texlive-lang-all, creating a venv with an up-to-date sphinx-doc and blurb, one can do:
|
This comment has been minimized.
This comment has been minimized.
@methane: Are you interested to check if it works with the Japanese translation? |
This comment has been minimized.
This comment has been minimized.
I don't know about PDF and latex much. |
This comment has been minimized.
This comment has been minimized.
They sent a lot of feedback on sphinx-doc/sphinx#4136 I'm trying to build locally for japanese currently. |
This comment has been minimized.
This comment has been minimized.
Looks like build is failing for japanese:
|
This comment has been minimized.
This comment has been minimized.
Generating Japanese PDF via Latex is very hard way. |
This comment has been minimized.
This comment has been minimized.
tk0miya
commented
Oct 11, 2017
Usually, IMO, it would be better to use
I believe this will work well. |
This comment has been minimized.
This comment has been minimized.
@tk0miya Thanks for the recommendation, I'll try this. I'm no latex expert though. |
This comment has been minimized.
This comment has been minimized.
Tests for today:
Japanese errors using platex:
Looks like the problem is from the Japanese translation:
I'm opening an issue on their side. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Fixing the \x10 found in japanese translation yields to another error:
I still don't get this one, as I explicitly asked sphinx to use xelatex. |
This comment has been minimized.
This comment has been minimized.
But building with platex works! So xelatex works for english and french and platex works for japanese, as told by @tk0miya thanks! Still have to find a clean way to jump between those two implementations, as the 'language' is not yet initialized when parsing conf.py. |
xelatex has better Unicode support than pdflatex, sufficient to build french, but not to build japanese. But we already have platex, capable to build japanese, installed from texlive-lang-japanese pulled as a dependency of texlive-lang-all. See: - sphinx-doc/sphinx#4136 - python/cpython#3940
This comment has been minimized.
This comment has been minimized.
miss-islington
commented
Dec 2, 2017
Thanks @JulienPalard for the PR, and @ned-deily for merging it |
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Dec 2, 2017
GH-4683 is a backport of this pull request to the 3.6 branch. |
This comment has been minimized.
This comment has been minimized.
miss-islington
commented
Oct 8, 2019
Thanks @JulienPalard for the PR, and @ned-deily for merging it |
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Oct 8, 2019
GH-16636 is a backport of this pull request to the 2.7 branch. |
JulienPalard commentedOct 10, 2017
•
edited by bedevere-bot
Trying to fix: https://bugs.python.org/issue31589
I sucessfully built locally PDF for english and french, still have to try japanese, and still have to "diff" (at least visually) PDFs from pdflatex vs pdf from xelatex.
https://bugs.python.org/issue31589