[Doc-SIG] sphinx bug

Ondrej Certik ondrej at certik.cz
Sun Mar 23 20:01:44 CET 2008


Hi,

first, let me apologize, if this is not the correct mailinglist to
ask. Is there some mailinglist for the Sphinx project?

http://sphinx.pocoo.org/

I tried to go to the #python-docs channel, but it doesn't exist.
Anyway, the project is great. We moved the docs in ipython to it and
we are going to move sympy docs as well.

We found a bug though. If python-pygments isn't installed, sphinx
doesn't say anything, "make latex" hapilly generate a latex file, but
this latex file fails to compile:

! Undefined control sequence.
<argument> In \lb
                  []1\rb []: from ipython1.kernel import client
l.1205 ...rb[]: from ipython1.kernel import client

That's because the latex file is missing some definitions, like \lb,
that only get included when python-pygments is installed.

Do you think the file sphinx/highlighting.py line 30 could be fixed to
emit a large warning message, that the latex output will be broken
(possibly with an explanation of the problem)? That way one can easily
spot it and fix it.

Actually it took my 45 minutes of debugging with winpdb to figure out
what's wrong, because I had one computer where it worked and another
where it didn't. I compared all Debian latex packages on both, but it
didn't occur to me the problem could by in missing pygments. But I am
glad I figured this out. :)

Thanks a lot,
Ondrej


More information about the Doc-SIG mailing list