banner

Images markup examplesΒΆ

To show a local image use this:

.. image:: /images/gnu.png

Result:

../../_images/gnu.png

To show an online image use this:

.. image:: http://farm2.static.flickr.com/1237/614916546_785c95ceda_m.jpg

Result:

http://farm2.static.flickr.com/1237/614916546_785c95ceda_m.jpg

Full image markup specifications:

.. image:: http://farm3.static.flickr.com/2360/2419641800_ef0169e51d_m.jpg
               :height: 160px
               :width: 240px
               :alt: alternate text
               :align: right
               :target: http://www.flickr.com/photos/jeroenleijen/2419641800/

Take a look at my Flickr2reStructuredText page how to automatically generates this markup for images hosted at Flickr.

Instead of the image directive you can also use html. This markup:

.. raw:: html

        <a href="http://www.flickr.com/photos/jeroenleijen/614916546/" title="07-06-16-3579_u.jpg by jeroenleijen, on Flickr"><img src="http://farm2.static.flickr.com/1237/614916546_785c95ceda_m.jpg" width="240" height="160" alt="07-06-16-3579_u.jpg" /></a>

Also gives this image:

07-06-16-3579_u.jpg

Figure are like images but with a caption. The html builder wraps figures inside figure css-classes. The default sphinx css however does not contain these classes. See http://openalea.gforge.inria.fr/doc/openalea/doc/_build/html/source/sphinx/rest_syntax.html#figure-directive and the css for this page for more information.

alternate text

Photo by Jeroen (caption line)

Full figure markup specifications:

.. figure:: http://farm3.static.flickr.com/2360/2419641800_ef0169e51d_m.jpg
               :height: 160px
               :width: 240px
               :figwidth: 260px
               :alt: alternate text
               :figclass: align-left
               :target: http://www.flickr.com/photos/jeroenleijen/2419641800/

               Photo by Jeroen (caption line)

Published:Fri Jun 25 2010