You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Links for French documentation PDF is broken: LaTeX issue with non-ASCII characters? #75770
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2019-05-07.20:08:39.378>created_at=<Date2017-09-26.08:59:09.198>labels= ['type-bug', 'docs']
title='Links for French documentation PDF is broken: LaTeX issue with non-ASCII characters?'updated_at=<Date2019-10-08.03:42:55.283>user='https://bugs.python.org/fabrice'
FWIW most of the errors I met while trying to build the pdfs of the main docs were caused by the presence of non-latin1 characters. French should be limited to the latin1 range and the error you pasted doesn't seem to be related, however that might explain while the Japanese docs are also missing (unless this issue got fixed in the meanwhile -- I haven't built the pdfs in a while).
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': File changes, etc:
Changed files, or newly in use since previous run(s):
'faq.aux'
'faq.out'
'faq.toc'
Latexmk: Maximum runs of pdflatex reached without getting stable files
Latexmk: All targets (faq.pdf) are up-to-date
Latexmk: Did not finish processing file 'faq.tex':
'pdflatex' needed too many passes
\begin{document}
\tableofcontents
\chapter{FAQ sur Python éh}
\end{document}
mdk@windhowl$ latexmk faq 2>&1 | tail -n 15
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-0.def) [2] (./faq.aux) )
Output written on faq.dvi (2 pages, 608 bytes).
Transcript written on faq.log.
Latexmk: Log file says output to 'faq.dvi'
Rule 'latex': File changes, etc:
Changed files, or newly in use since previous run(s):
'faq.aux'
'faq.toc'
Latexmk: Maximum runs of latex reached without getting stable files
Latexmk: Did not finish processing file 'faq':
'latex' needed too many passes
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs of latex/pdflatex.
Latexmk: applying rule 'latex'...
Latexmk: All targets (faq.dvi) are up-to-date
Also, according to matrixise, it works with xelatex.
"""
utf8x vs. utf8 (inputenc)
(...)
The simple answer is that utf8x is to be avoided if possible. It loads the ucs package, which for a long time was unmaintained (although there is now a new maintainer) and breaks various other things.
"""
changed the title [-]Links for French documentation pdf is broken[/-][+]Links for French documentation PDF is broken: LaTeX issue with non-ASCII characters?[/+]on Oct 3, 2017
I personally do not care about using utf8x, it has been introduced in:
r74549 | benjamin.peterson | 2009-08-24 12:42:36 -0500 (Mon, 24 Aug 2009) | 1 line
fix pdf building by teaching latex the right encoding package
# Get LaTeX to handle Unicode correctlylatex_elements= {'inputenc': r'\usepackage[utf8x]{inputenc}'}
I tried with utf8 instead and it yielded a different set of errors, so I did not tried much. But utf8-induced bugs may be easier to fix that utf8x-induced bugs, I don't know.
New changeset 2ad350a by Ned Deily (Miss Islington (bot)) in branch '3.6':
[3.6] bpo-31589 : Build PDF using xelatex for better UTF8 support. (GH-3940) (bpo-4683) 2ad350a
Due to bpo-32200, we switched on xelatex, it however did **not** fixed the french builds as expected, maybe because we're using an old version of xelatex.
The version of texlive-xetex on the build server: 2013.20140215-1ubuntu0.1
The version I tried: 2017.20171128-1
I'm not having the 2013 version on Debian. I'm trying now with 2014.20141024-2+deb8u1, and I'm trying to understand the error message too.
jfbu commented on Dec 3, 2017
jfbumannequin
Mannequin
More actions
I can confirm the "Improper discretionary list" error from xetex build is a xetex bug which is present at XeTeX 0.99992 and absent at XeTeX 0.99996 and presumably all more recent releases.
XeTeX 0.99996 was released in march 2016, so it's not even in Ubuntu 16.04 Xenial Xerus. On docs.iad1.psf.io we're having Ubuntu 14.04 (an LTS ending around february 2019).
For me, french compile correctly with current state of cpython's conf.py and texlive-xetex 2017.20171128-1, if it helps.
I tried (not enough) and fail to test locally with a texlive-xetex from 2013 (I should try with a VM maybe, Debian won't let me install packages from 2013 on my sid...).
It is stated there that using babel-french in place of polyglossia-french avoids the "Improper discretionary list" xetex problem starting with xetex 0.99992 (i.e. TeXLive 2015) whereas with polyglossia-french the earliest xetex version I could test with success is 0.99996 (TL2016). But starting with TL2016, polyglossia-french as the issue sphinx-doc/sphinx#4272
With TeXLive 2014, using babel-french does not avoid the "Improper discretionary list" xetex problem. I don't know how this maps to Debian packaging. One needs xetex 0.99992 at minimum.
The download links are now working, EWDurbin upgraded the servers and it solved a few issues, also now when a build fail we do no longer erase the old PDF, so the links should always work.
Activity
fabrice commentedon Sep 26, 2017
Hi,
In this page : https://docs.python.org/fr/2/download.html, all the documentation links aren't available, for example :
So, I can't read the documentation in French :)
Regards,
Fabrice
JulienPalard commentedon Sep 26, 2017
Hi Fabrice,
Thanks for reporting.
The whole archives/ directory is completly missing for french and japanese, I'll take a look.
Bug is probably really near https://github.com/python/docsbuild-scripts/blob/master/build_docs.py#L222
JulienPalard commentedon Oct 1, 2017
Problem happen during pdflatex, I tried a local build and got:
! Package hyperref Error: Wrong DVI mode driver option `dvipdfmx',
(hyperref) because pdfTeX or LuaTeX is running in PDF mode.
See the hyperref package documentation for explanation.
Type H <return> for immediate help.
...
l.4362 \ProcessKeyvalOptions{Hyp}
?
! Emergency stop.
ezio-melotti commentedon Oct 1, 2017
FWIW most of the errors I met while trying to build the pdfs of the main docs were caused by the presence of non-latin1 characters. French should be limited to the latin1 range and the error you pasted doesn't seem to be related, however that might explain while the Japanese docs are also missing (unless this issue got fixed in the meanwhile -- I haven't built the pdfs in a while).
JulienPalard commentedon Oct 1, 2017
After an upgrade of my venv, the error is now:
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': File changes, etc:
Changed files, or newly in use since previous run(s):
'faq.aux'
'faq.out'
'faq.toc'
Latexmk: Maximum runs of pdflatex reached without getting stable files
Latexmk: All targets (faq.pdf) are up-to-date
Latexmk: Did not finish processing file 'faq.tex':
'pdflatex' needed too many passes
JulienPalard commentedon Oct 1, 2017
One difference I see in the logs of sucessfully building the faq.tex and failing to build it is:
Package hyperref Warning: Token not allowed in a PDF string (Unicode):
Looks like if I remove all non-ascii characters from titles, it builds again.
JulienPalard commentedon Oct 2, 2017
Problem looks like the utf8x package is not friend with tableofcontent:
JulienPalard commentedon Oct 3, 2017
For the record, I can reproduce the issue with this minimal test file:
mdk@windhowl$ ls -lah
total 108K
drwxr-xr-x 2 mdk mdk 4.0K Oct 2 21:15 .
drwxrwxrwt 18 root root 96K Oct 2 21:15 ..
-rw-r--r-- 1 mdk mdk 196 Oct 2 21:13 faq.tex
mdk@windhowl$ cat faq.tex
\documentclass[a4,10pt,french]{report}
\usepackage[utf8x]{inputenc}
\usepackage[T1,T2A]{fontenc}
\usepackage{babel}
\begin{document}
\tableofcontents
\chapter{FAQ sur Python éh}
\end{document}
mdk@windhowl$ latexmk faq 2>&1 | tail -n 15
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-0.def) [2] (./faq.aux) )
Output written on faq.dvi (2 pages, 608 bytes).
Transcript written on faq.log.
Latexmk: Log file says output to 'faq.dvi'
Rule 'latex': File changes, etc:
Changed files, or newly in use since previous run(s):
'faq.aux'
'faq.toc'
Latexmk: Maximum runs of latex reached without getting stable files
Latexmk: Did not finish processing file 'faq':
'latex' needed too many passes
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs of latex/pdflatex.
Latexmk: applying rule 'latex'...
Latexmk: All targets (faq.dvi) are up-to-date
Also, according to matrixise, it works with xelatex.
vstinner commentedon Oct 3, 2017
Julien: Is there any reason why you want to use utf8x in specific?
https://tex.stackexchange.com/questions/13067/utf8x-vs-utf8-inputenc
"""
utf8x vs. utf8 (inputenc)
(...)
The simple answer is that utf8x is to be avoided if possible. It loads the ucs package, which for a long time was unmaintained (although there is now a new maintainer) and breaks various other things.
"""
[-]Links for French documentation pdf is broken[/-][+]Links for French documentation PDF is broken: LaTeX issue with non-ASCII characters?[/+]JulienPalard commentedon Oct 3, 2017
I personally do not care about using utf8x, it has been introduced in:
r74549 | benjamin.peterson | 2009-08-24 12:42:36 -0500 (Mon, 24 Aug 2009) | 1 line
fix pdf building by teaching latex the right encoding package
I tried with utf8 instead and it yielded a different set of errors, so I did not tried much. But utf8-induced bugs may be easier to fix that utf8x-induced bugs, I don't know.
vstinner commentedon Oct 3, 2017
(Oh sorry, I misunderstand what you wrote. I understood that Python didn't use utf8x yet and you proposed to start using it.)
1 remaining item
JulienPalard commentedon Oct 17, 2017
Finally have a combination of latex engines that work for every cases, did a PR on docsbuild-scripts:
python/docsbuild-scripts#34
I already pulled xelatex on docs.iad1.psf.io via python/psf-salt@989a771#diff-6fb01fe8bbc22a54d234a57ad58e291e
Also opened a few related issue sphinx-doc side to track my thoughts:
jfbu commentedon Oct 21, 2017
I have made a PR at #4069 which enhances
conf.pywith some pdflatex extra Unicode configuration. I tested it with building PDF English documentation at master (at https://github.com/python/cpython/tree/db60a5bfa5d5f7a6f1538cc1fe76f0fda57b524e) and at 3.6 branch (at https://github.com/python/cpython/tree/1e78ed6825701029aa45a68f9e62dd3bb8d4e928) and also French documentation at 3.6 (at python/python-docs-fr@76b522b). The changes are only forpdflatexbuilds: iflatex_engineis set toxelatex,lualatex, orplatex(automatic if language isja), nothing is modified.ned-deily commentedon Dec 2, 2017
New changeset 7324b5c by Ned Deily (Julien Palard) in branch 'master':
bpo-31589 : Build PDF using xelatex for better UTF8 support. (bpo-3940)
7324b5c
ned-deily commentedon Dec 2, 2017
New changeset 2ad350a by Ned Deily (Miss Islington (bot)) in branch '3.6':
[3.6] bpo-31589 : Build PDF using xelatex for better UTF8 support. (GH-3940) (bpo-4683)
2ad350a
JulienPalard commentedon Dec 3, 2017
Due to bpo-32200, we switched on xelatex, it however did **not** fixed the french builds as expected, maybe because we're using an old version of xelatex.
The issue:
The version of texlive-xetex on the build server: 2013.20140215-1ubuntu0.1
The version I tried: 2017.20171128-1
I'm not having the 2013 version on Debian. I'm trying now with 2014.20141024-2+deb8u1, and I'm trying to understand the error message too.
jfbu commentedon Dec 3, 2017
I can confirm the "Improper discretionary list" error from xetex build is a xetex bug which is present at XeTeX 0.99992 and absent at XeTeX 0.99996 and presumably all more recent releases.
It was seen at sphinx-doc/sphinx#3546 and reported to XeTeX mailing list at http://tug.org/pipermail/xetex/2017-March/027056.html
JulienPalard commentedon Dec 3, 2017
XeTeX 0.99996 was released in march 2016, so it's not even in Ubuntu 16.04 Xenial Xerus. On docs.iad1.psf.io we're having Ubuntu 14.04 (an LTS ending around february 2019).
jfbu commentedon Dec 3, 2017
On-going discussion at http://tug.org/pipermail/xetex/2017-December/027212.html has brought new element that polyglossia's French module is broken with xetex since TeXLive2016. We had only one problem, we now have two on our hands.
Possibly Sphinx could be default use babel + French, not polyglossia + French, as the former is maintained but apparently less so the latter.
I tested that TeXLive 2015 (fully updated) and test document showing the sphinx-doc/sphinx#3546 problem now compiles fine if using
in conf.py file, to override polyglossia which is default for Sphinx with xelatex.
JulienPalard commentedon Dec 3, 2017
For me, french compile correctly with current state of cpython's conf.py and texlive-xetex 2017.20171128-1, if it helps.
I tried (not enough) and fail to test locally with a texlive-xetex from 2013 (I should try with a VM maybe, Debian won't let me install packages from 2013 on my sid...).
jfbu commentedon Dec 3, 2017
Related sphinx-doc/sphinx#4272
It is stated there that using babel-french in place of polyglossia-french avoids the "Improper discretionary list" xetex problem starting with xetex 0.99992 (i.e. TeXLive 2015) whereas with polyglossia-french the earliest xetex version I could test with success is 0.99996 (TL2016). But starting with TL2016, polyglossia-french as the issue sphinx-doc/sphinx#4272
With TeXLive 2014, using babel-french does not avoid the "Improper discretionary list" xetex problem. I don't know how this maps to Debian packaging. One needs xetex 0.99992 at minimum.
JulienPalard commentedon May 7, 2019
The download links are now working, EWDurbin upgraded the servers and it solved a few issues, also now when a build fail we do no longer erase the old PDF, so the links should always work.
Thanks for reporting and don't hesistate to open a new issue if problem happen again (but maybe on the https://github.com/python/docsbuild-scripts/ issue tracker).
vstinner commentedon May 7, 2019
Thanks Julien for taking care of the documentation :-) It is good to have
you aboard.
miss-islington commentedon Oct 8, 2019
New changeset d9b3216 by Miss Islington (bot) in branch '2.7':
bpo-31589 : Build PDF using xelatex for better UTF8 support. (GH-3940)
d9b3216