rst2beamer
A restructured text based tool for preparing presentations.
Ryan Krause has adopted rst2beamer and is busy making improvements. You can find his nascent site here. For the meanwhile, updates may appear on either or both sites. rst2beamer has been added to pypi and may now be installed with easy_install.
Introduction
A docutils script converting restructured text into Beamer-flavoured LaTeX.
Beamer is a LaTeX document class for presentations. rst2beamer [1] provides a Docutils [3] writer that transforms restructured text [4] into Beamer-flavoured LaTeX. and provides a commandline script for the same. Via this script, ReST can therefore be used to prepare slides and presentations.
Installation
rst2beamer can be installed via setuptools / easy_install or manually. Consult the enclosed manual for further details.
Usage
Depending on your platform, the scripts may be installed as ``.py`` scripts, or some form of executable, or both.
rst2beamer can be called:
rst2beamer.py infile.txt > outfile.tex
where infile.txt contains the rst and outfile.tex contains the produced Beamer LaTeX. It can takes all the arguments that rst2latex does, save the documentclass option (which is fixed to beamer) and hyperref options (which are already set in beamer).
rst2beamer should interpret a reasonable subset of restructured text and produce reasonable LaTeX. Not all features of beamer have been implemented, just a (large) subset that allows the quick production of good looking slides.
These include:
- Overlay lists (i.e. those that appear point-by-point)
- Beamer themes
- Automatic centering and resizing of figures
- Embedded notes and the output of note slides.
- Arranging slide contents into columns.
Some examples can be found in the ``docs/examples`` directory of the distribution. In practice, rst2beamer can be used with pdflatex to get PDF versions of a presentation.
Limitations
Earlier versions of rst2beamer did not work with docutils 0.4, seemingly due to changes in the LaTeX writer. While this has been fixed, most work has been done with docutils snapshots from version 0.5 and up. In balance, users are recommended to update docutils.
Not all features of beamer are supported, and some - that deal with with page layout or presentation - may never be. Introducing complex syntax to achieve complex and specific page effects defeats the point of ReST's simple and easy-to-write format. If you need a complex presentation, use Powerpoint or Keynote.
If the content for an individual slide is too large, it will simply overflow the edges of the slide and disappear. Arguably, this is a sign you should put less on each slide.
Notes
History & motivation
While preparing a course, one of us (PMA) became frustrated with the length of time it took to prepare a presentation, even simple slides with bullet-pointed text and lumps of code. Preparing handouts or downloadable versions was a further problem. Given that docutils already has good LaTeX output, PDF production via the Beamer document class was a logical choice. rst2beamer started as a semi-ugly hack of docutil's LaTeX machinery, making as few modifications are possible due to (a) laziness and (b) wanting to leverage as much of an existing robust code base as possible. It wasn't - and isn't - intended to be feature-complete: it worked with the ReST that I prepared and will probably give adequate output for most other simple ReST documents. It was subsequently taken up by the other of us (RK) who whipped the hacky script into shape and added several features to make the produced slides far more presentable. Unbeknownst to either of us, it seems to have been adopted by Pythonistas for use at conferences.
Credits
rst2beamer is developed by Ryan Krauss and Paul-Michael Agapow. Thanks to Dale Hathaway for helping track down the docutils 0.4 bug. Thanks to James Haggerty for detecting and reporting packaging problems.
References
| [1] | rst2beamer homepages at agapow.net and cs.siue.edu |
| [2] | Installing setuptools |
| [3] | Docutils homepage |
| [4] | Restructured text |
| [5] | Beamer homepage |
|
|
|
|

