Skip to main content

rst2html5slides generates a slideshow from a reStructuredText file.

Project description


rst2html5slides extends rst2html5 to translate a reStructuredText file into a web presentation.


Presentations based on web frameworks such as impress.js, jmpress.js and deck.js are great alternatives to traditional software packages:

  1. HTML, CSS and javascript files are plain text files and thus they are friendly to version control systems, making easy to follow and visualize their changes between revisions;

  2. There is a separation between content and presentation design

  3. They have new and great visual effects such as slide transitions and positional effects

  4. A web presentation is portable. It runs on any modern browser

On the other hand, creating presentations directly in HTML is painful. A better approach is to use another markup language that is easier to read and write, and then translate the text to HTML.

I could have listed or cooked up a few reasons to justify reStructuredText as the best choice. The truth is that the best markup language is the one you already know. So, if you also use reStructuredText in other projects or contexts, then rst2html5slides is perfect for you to create your presentations.


  • CSS can be extended or overwritten by adding new stylesheets;

  • Slides can be positioned manually or automatically through pre-defined functions (linear, grid and grid-rotate);


pip install rst2html5slides

Basic Usage

$ rst2html5slides [OPTIONS] SOURCE [DESTINATION]

If no destination is given, then the presentation is written to the stdout. Else, the presentation and all related files (images, CSS, scripts etc.) are written into the specified path.



Choose a web presentation framework for the output. Possible values are impress.js, jmpress.js, deck.js, None. Default is impress.js.


Specify the name of the slide distribution function. Options are “linear”, “grid” or “grid-rotate”. An additional parameter can be specified along with the name such as in “grid_rotate 3”.


Specify the value of the increment used by the distribution functions. To specify different values for X and Y increments, separate them by space. Example “1000 500”. Default value is 1600 for X and Y increments.


Disable slide automatic identification based on title.


Specify the tag, id and/or class to replace the default (and non-standard) <deck> tag used to surround the slides. Follow the pattern tag#id.class (such as a CSS selector). Examples: div, div#impress, div.deck- container, article#impress.impress-not-supported


Specify the tag, id and/or class to replace the default (and non-standard) <slide> tag used to surround each slide.Follow the pattern tag#id.class (such as a CSS selector)Examples: div.slide, section, div.step



.. title:: Simple Presentation | rst2html5slides
.. meta::
  :author: André Felipe Dias

.. class:: cover



Topic 1

* item A
* item B

Topic 2

* item C
* item D

To translate it to a presentation located at /tmp/slides, use this command:

$ rst2html5slides simple.rst /tmp/slides

The generated file is:

<!DOCTYPE html>
    <link rel="stylesheet" href="css/slideshow.css">
    <script src="js/jquery.min.js"></script>
    <script src="js/greensock/TweenMax.min.js"></script>
    <script src="js/video_animation.js" defer></script>
    <script src="js/slide_animations.js" defer></script>
    <script src="js/slideshow.js" defer></script>

    <meta charset="utf-8" />
    <meta generator="rst2html5slides" />
    <meta generator-homepage="" />


    <slide id="presentation">
    <slide id="topic-1">
            <h1>Topic 1</h1>
                <li>item A</li>
                <li>item B</li>
    <slide id="topic-2">
            <h1>Topic 2</h1>
                <li>item C</li>
                <li>item D</li>


rst2html5slides copies all referenced files (images, additional scripts and css) to the destination path:

$ ls -R /tmp/slides
css  js  simple.html


greensock  jquery.min.js  slide_animations.js  slideshow.js  video_animation.js


The full documentation is available at and also in the doc subdirectory.


rst2html5slides source is located at


rst2html5slides is available under a MIT license.


1.2.2 - 2018-11-17

  • Fix

  • Reorganize project structure

1.2.1 - 2018-11-14

  • Fix installation and dependencies

1.2 - 2018-11-06

  • Fix README.rst

  • Fix version exhibition

  • Fix some PEP8 warnings

  • Fix tests comparing expected and obtained results

  • requirements.txt replaced by pipenv

  • Update project to work with rst2htm5 1.9.5

1.1 - 2018-11-06

  • Update project to work with rst2htm5 1.9.4

  • Slideshow is based on GreenSock Animation Platform (GSAP)

1.0 - 2014-09-21

  • First public preview release

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rst2html5slides-1.2.2.tar.gz (155.1 kB view hashes)

Uploaded source

Built Distribution

rst2html5slides-1.2.2-py2.py3-none-any.whl (179.2 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page