sometimes cannot build pdfs for de, sl, pt, es, nl, pl, or it locales

Bug #997891 reported by Melissa Draper
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
sphinx (Debian)
Fix Released
Unknown
sphinx (Ubuntu)
Fix Released
Undecided
Melissa Draper
Precise
Fix Released
Undecided
Melissa Draper
Quantal
Fix Released
Undecided
Melissa Draper

Bug Description

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 this patch upstream last night and it was accepted. https://bitbucket.org/birkenfeld/sphinx/pull-request/64/added-language-names-to-the-shorthandoff

SRU Info:
[Impact] - On systems where python-docutils is version 0.8 or above, this bug prevents pdf generation from sphinx generated latex source for the de, sl, pt, es, nl, pl and it locales. I expect that my upstream patch will be released with the next version of python-sphinx.

[Development Fix] - A debdiff for quantal has been attached. It is functionally identical to the precise-proposed debdiff as the sphinx versions are still identical.

[Stable Fix] - A debdiff for precise-proposed has been attached. It adds full language names to the pool of shortcodes which the tex file writer uses to evaluate the necessity of the \shorthandoff directive.

[Test Case] - Note: The debian maintainer offers a better minimal test here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672586#31

I encountered this issue while trying to build the Mahara manual ( git://gitorious.org/mahara/manual.git ) on precise.

* 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/mahara-manual/1.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, id=3006, 692.5875pt x 79.29625pt>
<use groups_csv.png> <use groups_csv.png>
! Bad character code (-1).
\es@chf ->\char \hyphenchar \font

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

?

* 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 patch the 'make clean latexpdf' command should compile the pdf without stopping. viewing the .tex file again, you should see this:
\begin{document}
\shorthandoff{"}
\maketitle

[Regression Potential] - I don't believe it should regress, nothing is being taken away, rather additional workaround support is added.

Revision history for this message
Melissa Draper (melissa) wrote :
Revision history for this message
Melissa Draper (melissa) wrote :
Melissa Draper (melissa)
description: updated
summary: - cannot build pdfs for de, sl, pt, es, nl, pl, or it locales
+ sometimes cannot build pdfs for de, sl, pt, es, nl, pl, or it locales
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Debdiff for precise-proposed" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Mackenzie Morgan (maco.m) wrote :

(I just marked this confirmed because upstream already accepted her patch, so clearly they think it's confirmed)

Changed in sphinx (Ubuntu Precise):
status: New → Confirmed
Changed in sphinx (Ubuntu Quantal):
status: New → Confirmed
Melissa Draper (melissa)
description: updated
Melissa Draper (melissa)
description: updated
Revision history for this message
Melissa Draper (melissa) wrote :

FWIW I also submitted this to debian, so quantal will likely get it that way eventually: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672586

Changed in sphinx (Debian):
status: Unknown → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sphinx - 1.1.3+dfsg-2ubuntu3

---------------
sphinx (1.1.3+dfsg-2ubuntu3) quantal; urgency=low

  * debian/patches/add_names_to_shorthandoff_helper.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. Will be fixed in next
    upstream release. (LP: #997891)
 -- Melissa Draper <email address hidden> Fri, 11 May 2012 16:48:57 +1200

Changed in sphinx (Ubuntu Quantal):
status: Confirmed → Fix Released
Revision history for this message
Jonathan Harker (jonathanharker) wrote :

Nice! \o/

Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Melissa, or anyone else affected,

Accepted sphinx into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in sphinx (Ubuntu Precise):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Melissa Draper (melissa) wrote :

Tested via precise-proposed and it worked fine. :)

Melissa Draper (melissa)
Changed in sphinx (Ubuntu Precise):
assignee: nobody → Melissa Draper (melissa)
Changed in sphinx (Ubuntu Quantal):
assignee: nobody → Melissa Draper (melissa)
Revision history for this message
Vibhav Pant (vibhavp) wrote :

sphinx in precise-proposed works fine

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sphinx - 1.1.3+dfsg-2ubuntu2.1

---------------
sphinx (1.1.3+dfsg-2ubuntu2.1) precise-proposed; urgency=low

  * debian/patches/add_names_to_shorthandoff_helper.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. Will be fixed in next
    upstream release. (LP: #997891)
 -- Melissa Draper <email address hidden> Fri, 11 May 2012 16:36:33 +1200

Changed in sphinx (Ubuntu Precise):
status: Fix Committed → Fix Released
Changed in sphinx (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.