.. Images markup examples images.rst Created: Sun Mar 21 2010 21:21 uur Last modified: Mon Dec 20, 2010 - 11:09 ======================= Images markup examples ======================= .. index:: sphinx; images To show a local image use this:: .. image:: /images/gnu.png Result: .. image:: /images/gnu.png To show an online image use this:: .. image:: http://farm2.static.flickr.com/1237/614916546_785c95ceda_m.jpg Result: .. image:: 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 :doc:`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 07-06-16-3579_u.jpg Also gives this image: .. raw:: html 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. .. 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) 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) ----- .. cssclass:: pubdate :Published: Fri Jun 25 2010