How to export an IPython notebook to HTML for a blog post?

廉价感情. 提交于 2019-11-27 18:59:25

The right way is described in: http://blog.fperez.org/2012/09/blogging-with-ipython-notebook.html. Then you can do nbconvert -f blogger-html your_notebook.ipynb to get the html code for your post.

Tooblippe

One step further from the answer above. To create a PDF file,

  1. create a tex file

    nbconvert -f latex your_notebook.ipynb
    
  2. convert tex to pdf :

    pdflatex your_notebook.tex
    

All the above answers seems outdated. Here is the most modern solution taken from the official nbconvertdocs.

$ jupyter nbconvert --to FORMAT notebook.ipynb

The default output format is html, for which the --to argument may be omitted:

$ jupyter nbconvert notebook.ipynb

Click on file > Download > html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!