Using Unicode with Sphinx, reStructuredText, and PDF Output

I’m working on updating my book, and besides actually writing the content one of the things I have to do is generate new LaTeX files to deliver to the publisher. I’ve written about my toolchain elsewhere, so I won’t repeat all of that information here. The short version is that I use Paver to drive Sphinx to convert reStructuredText input files to HTML for the website, LaTeX for the compositor at Pearson, and PDF for reviewers. Since the updated version covers Python 3, and one of the key benefits of Python 3 is better Unicode support, I want to include some characters outside of the normal ASCII set in my examples.

When you ask Sphinx’s latex builder to generate LaTeX output the result is a directory with a *.tex file containing your content and some other files with all of the parts you need to convert that LaTeX to other formats, including a Makefile with instructions for building PDF and DVI. By default that Makefile uses pdflatex to convert the *.tex output files it writes to PDF. My article for the random module includes an example of shuffling a card deck. The Python 2 version used letters to represent the card suits, but for Python 3 I switched to using Unicode symbols like what would appear on the cards. Making that work for HTML was easy, but the PDF output proved trickier.

Continue reading Using Unicode with Sphinx, reStructuredText, and PDF Output

sphinxcontrib-paverutils 1.7 – Sphinx/Paver integration

sphinxcontrib-paverutils provides an alternative integration of
Sphinx and Paver. It supports calling Sphinx from within Paver using
multiple configurations, and does not assume you only want to build
HTML output.

What’s New?

  • Newer versions of sphinx try to exit when main() is done, so
    trap that exit code and return it.
  • Build universal wheels of releases.

yasfb 0.5.0 – Yet Another Sphinx Feed Builder

yasfb is yet another package for creating RSS feeds from Sphinx
documents. It differs from its predecessor by finding publication
dates using git history rather than forcing explicit filename or
metadata conventions.

What’s New In This Release?

This is the first public release under the new name. This version
updates sphinxfeed to pull publication dates from the git history and
to remove some of the cruft from the descriptions going into the feed.

sphinxcontrib.spelling 2.1.1

What is sphinxcontrib.spelling?

sphinxcontrib.spelling is a spelling checker for Sphinx. It uses
PyEnchant to produce a report showing misspelled words.

What’s New in This Release?

This is a point release with some packaging fixes for Debian and a
small code change to improve string handling.

  • remove announce.rst; moved to blogging repository
  • Merged in eriol/sphinxcontrib-spelling (pull request #2)
  • Removed no more used CHANGES file
  • Updated path of test_wordlist.txt
  • Merged in bmispelon/sphinxcontrib-spelling/isupper (pull request #1)
  • Use str.isupper() instead of ad-hoc method
  • fix syntax for tags directive


Please see the documentation for details.