Jupyter Notebook
December 28, 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:

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

To convert Jupyter Notebook to PDF

1
jupyter nbconvert --to PDF notebook.pdf

To convert Jupyter Notebook to HTML with basic template

1
jupyter nbconvert --template basic notebook.ipynb