Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to print an iPython notebook

What is the best way to print an iPython notebook (.ipynb) that contains a lot of figures/plots, photos, and code that would appear with a horizontal scroll bar? I've tried converting them to HTML, slides, PDF, etc, but neither has produced a decent output. For example, the slides have super-large font/zoom such that one page has no more than 5 lines of text in it. I've tried GitPrint, but that's only good for markdown (md) files. I've tried converting ipynb to tex and using pdflatex to convert to PDF, but there are a lot of errors and I keep getting stuck with a question mark prompt (?). When I hit enter through them, the output doesn't contain the photos. So what is the best way here? I don't care about the extension, only that it looks good (like the ipynb) on paper.

like image 723
Goosal Tapal Avatar asked May 17 '17 13:05

Goosal Tapal


1 Answers

You can use nbconvert to convert the ipynb file into HTML and the question will be: How to pretty print a HTML file? And print a HTML file would be much easier compared with printing a ipynb file.

Command is like this:

jupyter nbconvert --to html filename.ipynb
like image 50
kingbase Avatar answered Oct 21 '22 03:10

kingbase