From: David G. <go...@py...> - 2008-04-22 14:39:25
|
On Tue, Apr 22, 2008 at 2:53 AM, Oliver Večernik <sp...@ve...> wrote: > I'm trying to get automatic width and height attributes, but it doesn't > work, although PIL is installed and the image exists in the current > directory (Python 2.4.4): The only "automatic width and height" functionality in the "image" directive is when using the "scale" option. >>> from docutils import core >>> src=""" ... .. image:: star.png ... :scale: 100 ... """ >>> core.publish_parts(source=src, writer_name="html")['body'] u'<img alt="star.png" src="star.png" style="width: 340.0px; height: 158.0px;" />\n' There is an auto-width feature for the "figure" directive (":figwidth: image"). > Did I understand the docs wrong, or should this work? I think you misread the docs. -- David Goodger <http://python.net/~goodger> |