Articles

rst2beamer ‘sectnum_depth’ error

In howto on Jun 28, 2012 by theoryl Tagged: , , , ,

I’m using rst2beamer 0.6.6, with Docutils 0.9 and Python 2.6.5 on Ubuntu 10.04. When I tried to call rst2beamer, there is an error/incompatibility with the latex2e writer that comes with Python 2.6:

AttributeError: Values instance has no attribute ‘sectnum_depth’

To debug this, I edited /usr/local/lib/python2.6/dist-packages/rst2beamer-0.6.6-py2.6.egg/rst2beamer.py to add sectnum_depth (set as 0) in BEAMER_DEFAULTS. After the changes, my rst2beamer.py at line 160 looks like:

BEAMER_DEFAULTS = {
    'use_latex_toc': True,
    'output_encoding': 'latin-1',
    'documentclass': 'beamer',
    'documentoptions': 't',#text is at the top of each slide rather than centered.  Changing to 'c' centers the text on each slide (vertically)
    'sectnum_depth': 0,
}

Now rst2beamer works for me.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: