Thursday, June 5, 2014

Making a pdf from an IPython notebook

With the latest ipython one can run ipython nbconvert latex mynotebook.ipynb. The latest ipython can currently be installed from, at the time of this writing this is the 1.0 development stream.

ipython nbconvert latex mynotebook.ipynb will result in a latex file. texi2pdf should then be able to convert this tex file into a viewable pdf - in my case I had to manually copy all the files and images out of the associated mynotebook_files directory to the same directory as the .tex file, both of which were generated by ipython nbconvert. If you encounter latex errors, see for installation instructions for the latest latex. The default Ubuntu texlive package (as of 13.04 at least) is not recent enough to perform the conversion!

No comments:

Post a Comment