Bug#672586: python-sphinx: sometimes cannot build pdfs for de, sl, pt, es, nl, pl, or it locales

May 12th, 2012 - 05:40 am ET by Melissa Draper | Report spam
Package: python-sphinx
Version: 1.1.3+dfsg
Severity: normal
Tags: upstream patch

Newer versions of docutils (>=0.8) report full language name rather than
shortcodes and hence breaking pdf compilation in de, sl, pt, es, nl, pl and it
locales as the \shorthandoff directive is not added and triggering latex is
generated.

I submitted the patch upstream and it was accepted.
https://bitbucket.org/birkenfeld/sp...age-names-
to-the-shorthandoff



Debian Release: wheezy/sid
APT prefers oneiric-updates
APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500, 'oneiric')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-19-generic (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 6 repliesReplies Make a reply

Similar topics

Replies

#1 Melissa Draper
May 12th, 2012 - 06:30 am ET | Report spam
On 12/05/12 22:21, Jakub Wilk wrote:
* Melissa Draper , 2012-05-12, 21:30:
Newer versions of docutils (>=0.8) report full language name rather
than shortcodes and hence breaking pdf compilation in de, sl, pt, es,
nl, pl and it locales as the \shorthandoff directive is not added and
triggering latex is generated.



How can I reproduce this bug? A minimal test case would be great.




* add the following to the bottom of manual/source/conf.py:
language = 'de'
* run 'make clean latex'
* view the build/latex/Mahara.tex file with an editor.
* You should see the following after the preamble and \def stuff:
\begin{document}

\maketitle
* after applying the changes in the patches and viewing the .tex file
again, you should see this:
\begin{document}
\shorthandoff{"}
\maketitle



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Replies Reply to this message
#2 Jakub Wilk
May 12th, 2012 - 06:30 am ET | Report spam
* Melissa Draper , 2012-05-12, 21:30:
Newer versions of docutils (>=0.8) report full language name rather
than shortcodes and hence breaking pdf compilation in de, sl, pt, es,
nl, pl and it locales as the \shorthandoff directive is not added and
triggering latex is generated.



How can I reproduce this bug? A minimal test case would be great.

Jakub Wilk



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Replies Reply to this message
#3 Jakub Wilk
May 12th, 2012 - 07:20 am ET | Report spam
tags 672586 + unreproducible moreinfo
thanks

* Melissa Draper , 2012-05-12, 22:24:
Newer versions of docutils (>=0.8) report full language name rather
than shortcodes and hence breaking pdf compilation in de, sl, pt, es,
nl, pl and it locales as the \shorthandoff directive is not added and
triggering latex is generated.


How can I reproduce this bug? A minimal test case would be great.



* add the following to the bottom of manual/source/conf.py:
language = 'de'
* run 'make clean latex'
* view the build/latex/Mahara.tex file with an editor.



Uhm. And where do I get these files?

* You should see the following after the preamble and \def stuff:
\begin{document}

\maketitle
* after applying the changes in the patches and viewing the .tex file
again, you should see this:
\begin{document}
\shorthandoff{"}
\maketitle



Wait, not so fast. :) I'm not trying to verify that your patch works
yet. I'm trying to understand what the bug is.

The bug title is "sometimes cannot build pdfs" so I want to see a PDF
failing to build.

Jakub Wilk



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Replies Reply to this message
#4 Melissa Draper
May 12th, 2012 - 08:20 am ET | Report spam
On 12/05/12 23:13, Jakub Wilk wrote:
tags 672586 + unreproducible moreinfo
thanks

* Melissa Draper , 2012-05-12, 22:24:
Newer versions of docutils (>=0.8) report full language name rather
than shortcodes and hence breaking pdf compilation in de, sl, pt,
es, nl, pl and it locales as the \shorthandoff directive is not
added and triggering latex is generated.


How can I reproduce this bug? A minimal test case would be great.



* add the following to the bottom of manual/source/conf.py:
language = 'de'
* run 'make clean latex'
* view the build/latex/Mahara.tex file with an editor.



Uhm. And where do I get these files?

* You should see the following after the preamble and \def stuff:
\begin{document}

\maketitle
* after applying the changes in the patches and viewing the .tex file
again, you should see this:
\begin{document}
\shorthandoff{"}
\maketitle



Wait, not so fast. :) I'm not trying to verify that your patch works
yet. I'm trying to understand what the bug is.

The bug title is "sometimes cannot build pdfs" so I want to see a PDF
failing to build.



Those instructions were minimal to reproduce the bug which is the
absence of the \shorthandoff{"} directive, but to see the pdf fail is
much more complex, but here goes:

* Install git-core and python-sphinx along with its recommends.
* git clone git://gitorious.org/mahara/manual.git
* cd manual
* mkdir source/locales/es/LC_MESSAGES/
* from https://translations.launchpad.net/....5/+export get
the MO version of the translation files. Put all the spanish .mo files
in that newly created directory
* add the following to the bottom of source/conf.py:
language = 'es'
locale_dirs = ["locales/"]
* run 'make clean latexpdf'
* wait while approximately 258 pages worth of latex are compiled and the
pdf attempts to compile from those. It'll stop saying this:

<use groups_csv_add.png> <use groups_csv_add.png> [188
<./groups_csv_add.png (P
NG copy)>] <groups_csv.png, id006, 692.5875pt x 79.29625pt>
<use groups_csv.png> <use groups_csv.png>
! Bad character code (-1).
\ ->\char \hyphenchar \font

l.8537 ...dded","public","hidemembersfrommembers"}

?

Is that enough info now?



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Replies Reply to this message
#5 Jakub Wilk
May 13th, 2012 - 07:30 am ET | Report spam
severity 672586 important
tags 672586 - moreinfo unreproducible + confirmed
thanks

* Melissa Draper , 2012-05-13, 00:07:
to see the pdf fail is much more complex, but here goes:

* Install git-core and python-sphinx along with its recommends.
* git clone git://gitorious.org/mahara/manual.git
* cd manual
* mkdir source/locales/es/LC_MESSAGES/
* from https://translations.launchpad.net/....5/+export get
the MO version of the translation files. Put all the spanish .mo files
in that newly created directory
* add the following to the bottom of source/conf.py:
language = 'es'
locale_dirs = ["locales/"]
* run 'make clean latexpdf'
* wait while approximately 258 pages worth of latex are compiled and the
pdf attempts to compile from those. It'll stop saying this:

<use groups_csv_add.png> <use groups_csv_add.png> [188
<./groups_csv_add.png (P
NG copy)>] <groups_csv.png, id006, 692.5875pt x 79.29625pt>
<use groups_csv.png> <use groups_csv.png>
! Bad character code (-1).
\ ->\char \hyphenchar \font

l.8537 ...dded","public","hidemembersfrommembers"}

?

Is that enough info now?



Yes, thanks.

FWIW, I don't believe that this (PDF failing to build) can happen with
other languages you mentioned in the bug title, which is why I was
initially unable to reproduce it. You can get unexpected diacritics,
though.

The minimal test case is:

$ echo '``"r``' > testcase.rst
$ echo 'language = "es"' > conf.py
$ echo 'latex_documents = [("testcase", "testcase.tex", "", "", "manual")]' >> conf.py
$ sphinx-build -Q -b latex . build/
Making output directory...
$ make -C build/
[...]
! Bad character code (-1).
\ ->\char \hyphenchar \font

l.118 \code{"r}

?

Jakub Wilk



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Replies Reply to this message
Help Create a new topicNext page Replies Make a reply
Search Make your own search