I have a nicely-formatted ipython notebook complete with markdown cells and whatnot. I'm wondering what my options are in terms of exporting to a PDF file.
So far, I've been going to File > Print View
and printing the resulting page to PDF with chromium's "save to file" function. This technically works, but it has one major inconvenience: my figures, code and markdown cells are often split by page breaks.
Are there any other solutions for explort such that I can have one continuous PDF file?
EDIT: I ran into nbconvert, but when I keep getting a "file not found" error. Anybody have any luck with nbconvert? The documentation claims to support exporting to PDF, but when I ran nbconvert.py -f pdf
, the error message suggested that the PDF format was not, in fact, supported.
You can use ipython to do this, for instance the command:
ipython nbconvert notebookname.ipynb --to latex --post pdf
to convert notebookname.ipynb to a pdf. It does however require that you are running the latest version of texlive (that's texlive 2013) to have the supporting software. Note that Ubuntu 12.04 comes with texlive 2009 from their repositories. 2013 can be installed from CTAN directly, just follow these directions. Then you are up and running, and it looks great.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With