[Numpy-discussion] [matplotlib-devel] Sphinx custom extension mess, and patches

josef.pktd@gmai... josef.pktd@gmai...
Mon Feb 16 13:27:41 CST 2009

another docutils 0.5 bug in the plot_directive (align doesn't work):

from docutils.parsers.rst.directives.images import Image
    align = Image.align

Image.align is not callable,
see http://svn.berlios.de/viewcvs/docutils/trunk/docutils/docutils/parsers/rst/directives/images.py?view=markup

I replaced it with:

def _option_align(arg):
    return directives.choice(arg, ("top", "middle", "bottom", "left",
"center", "right"))

from docutils.parsers.rst import directives
    # docutils 0.4
    from docutils.parsers.rst.directives.images import align
except ImportError:
    # docutils 0.5
    #from docutils.parsers.rst.directives.images import Image
    align = _option_align
      # instead of Image.align

This seems to work correctly, e.g. align="center" is added to html.

The problem with the following text floating around the graph, is a
problem with Internet Explorer 6 and the created htmlhelp but not with
Firefox. As a remedy, I removed the float option in div.plot-output
.figure  in scipy.css and now the htmlhelp doesn't have a floating
text anymore.


More information about the Numpy-discussion mailing list