ipython/nbconvert — pull request #69 by damianavila (2012-12-18 21:59:19+00:00)
Title: Improved reveal converter

###### **Note**: This is a new implementation of reveal converter for ipynb. You can find the previous implementation and the discussion [here](https://github.com/ipython/nbconvert/pull/63). That deprecated PR is now closed because of the following new improved implementation.

Abstract
-----------

This PR implement a new option in nbconvert to output a html-slideshow based in the [reveal](http://lab.hakim.se/reveal-js) javascript library.

Introduction
----------------

The publication of computational results through the **IPython Notebook** have gained a lot of interest in the scientific python community. **nbconvert** provides multiples output formats to distribute the IPython notebook content, even there is a web app service to automate the process of publication.
However, up to now there is a lack of a slideshow output format, a static html presentation tool (we have to mention that there is **live** slideshow mode in the current developing version of IPython).
So, we proposed us to implement a slideshow output format for nbconvert based in a html presentation framework called **reveal.js**.

Implementation
---------------------

For a detail explanation of the ideas behind the implementation, you can see the [IPEP 9](https://github.com/ipython/ipython/wiki/IPEP-9:-Slideshow-from-the-notebook) and the discussion about it, [here](https://github.com/ipython/ipython/issues/2680).
The main idea was to get a functional implementation to provide a new output format: **reveal** (a html slideshow).
To achieve this, we have written a new class called ConvertedReveal inherited from ConvertedHtml. This new class overwrite some methods from his parent and write new ones, such as the main def build_slides method to **"inject"** html derived from ipynb into the reveal framework.
To delimit the cells and set their properties, we use a metadata dict.
We also have get the reveal.js framework trough a submodule.

Results
----------

To test this new **reveal** option in nbconvert you can checkout to the branch [reveal_converter](https://github.com/damianavila/nbconvert.git) in our repository.

Then, you have to init and update the submodule to get reveal.js library:
git submodule update --init

You will also need the [metaui-slideshow]() from @Carreau to get the functionality to set slideshow metadata to each cell.

In this repository, we also provide a example_nb_tour.ipynb to perform some testing of the new described feature.

**Usage**: $python nbconvert.py -f reveal example_nb_tour.ipynb

Then you can open the resulting html slideshow with any new browser (with Chrome you can render well printed pdf document from your slides). You have to open this html file in the same directory where it was generated to achieve properly the reveal.js machinery.

You can see a live slideshow here: http://www.slideviper.oquanta.info/nbcreveal/example_nb_tour_slides.html

Conclusion
---------------

We have achieved an easy and simple implementation of a static html slideshow based in reveal.js library.
We use metadata from cells to delimit the slides to be unified with the behaviour of the **live** slideshow option currently being developed in the IPython main project.
There is a lot of work to do to enhance this feature or even rewritten to test other possibilities.

We are waiting for your reviews and criticism.
Regards.

Damián.