#!/usr/bin/env python # coding: utf-8 # # Export Jupyter to other formats # The IPython notebooks can be converted in the following formats: # * html # * latex # * pdf # * markdown # * rst # * script # * slides # * notebook # # The command-line syntax to run the `nbconvert` script is: # # ```bash # $ ipython nbconvert --to notebook.ipynb # ``` # # The default output format is html, for which the `--to` argument may be omitted # ## Exporting to HTML # As an example, lets convert the `analysis.ipynb` notebook to HTML # In[1]: get_ipython().run_cell_magic('bash', '', "\nipython nbconvert --to html --template full 'example/analysis.ipynb'\n") # This is the result: # In[2]: from IPython.display import IFrame IFrame('analysis.html', 1000, 400) # ## Creating SLIDES # This generates a Reveal.js HTML slideshow. It must be served by an HTTP server. # The easiest way to do this is adding `--post serve` on the command-line. # To create the slides we first have to select **slideshow** from the **Cell Toolbar** menu and then configure the **Slide Type** of each cell as: # # * Slide # * Sub-Slide # * Fragment # * Skip # * Notes # # I created a copy of the `example/analysis.ipynb` called `analysis_slideshow.ipynb` where I configured the behaviour of every cell. # In[3]: get_ipython().run_cell_magic('bash', '', "\nipython nbconvert --to slides --template output_toggle --post serve 'example/analysis_slideshow.ipynb'\n")