Jupyter Notebook

Dec 28th, 2017

nbconvert

Jupyter Notebook Conversion

The nbconvert tool, jupyter nbconvert, converts notebooks to various other formats via Jinja templates. The nbconvert tool allows you to convert an .ipynb notebook file into various static formats including:

  • HTML (–to html)
  • LaTeX (–to latex)
  • PDF (–to pdf)
  • Reveal JS (–to slides)
  • Markdown (md) (–to markdown)
  • ReStructured Text (rst) (–to rst)
  • executable script (–to script)

The basic command structure is:

jupyter nbconvert --to <output format> <input notebook>

To convert Jupyter Notebook to PDF

jupyter nbconvert --to PDF notebook.pdf

To convert Jupyter Notebook to HTML with basic template

jupyter nbconvert --template basic notebook.ipynb