ipython/nbconvert — pull request #12 by fperez (2012-04-30 07:58:40+00:00)
Title: Latex converter, lots of fixes and some refactoring

This code isn't super clean b/c I wrote it 'in anger' over a weekend under time pressure, but it's *very* useful. To see what it can do, [here](http://archive.ipython.org/tmp/IntroNumPy.pdf) is a PDF produced by it (after running pdflatex on the output twice) from the notebook contained in [this tarball](http://archive.ipython.org/tmp/IntroNumPy.tgz). You can test the whole thing with

```!bash
wget http://archive.ipython.org/tmp/IntroNumPy.tgz
tar xzf IntroNumPy.tgz
nbconvert.py -f latex IntroNumPy.ipynb
pdflatex IntroNumPy
pdflatex IntroNumPy
```

Note: the only reason to run `pdflatex` twice is to get the PDF bookmarks (aka Table of Contents) right.

I know we need cleaner tests and more eyes on this, and I'm happy to take review on it. But the conversion code is getting close to real production quality, so let's try to get it moving in even if it's not perfectly clean, and we'll polish it as time permits.

Pinging @ellisonbg, @minrk, @takluyver and @carreau in case you guys can have a look too. I hope we'll pull this into the main repo before too long...