DOC,BLD: Switch to `xelatex` engine for latex docs?
See original GitHub issueWhen building the latex/pdf version of the documentation, sphinx is currently configured to use pdflatex
(the default) to build the pdfs of the user/reference manuals. There are several places in the documentation where the use of unicode characters causes inputenc
warnings when building the pdf. In some cases these can be resolved by ensuring that extra latex packages are installed (e.g. texlive-langgreek
adds the necessary mappings for some Greek Unicode characters), but in other cases (e.g. U+22EE vertical dots) it is more difficult to find an appropriate package (or the mapping can be done manually via \DeclareUnicodeCharacter
).
In addition, there seem to be some URL ref problems that are avoided by xelatex
(see sphinx-doc/sphinx#7723).
Please share any thoughts and possible pros/cons of switching to xelatex
for the NumPy latex/pdf docs. Note that sphinx provides a latex_engine
configuration option that makes this simple to try.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:6 (6 by maintainers)
Oh, then if it’s irrelevant I’d say we go for it.
xelatex
is available in every majorLaTeX
distribution on whatever OS, and it does make everything easier with respect to unicode and font issues.Great point - I did some quick profiling to get an idea of the build times. The results of
time make -C build/latex
on my systemwith
pdflatex
:with
xelatex
:So
xelatex
is definitely slower, but the total build time still isn’t so bad, especially since I don’t think building the latex docs from source is very common for most users. Note that in each case, thelatex->pdf
step is still shorter than the initialrST->latex
step (~2m30s on my system).