Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

linked image in reStructuredText

How can I create a linked image with reStructuredText?

I've found

.. image:: /path/to/image.jpg

for images, and external hyperlinks like

'Python <http://www.python.org/>'_

for links, but I don't know how to combine them or if that is at all possible.

like image 469
TBieniek Avatar asked Dec 30 '12 02:12

TBieniek


2 Answers

Two ways to do it:

  1. in inline images:

    .. image:: pageflip-200.png
       :target: pageapplet/index.html
    
  2. With a reference, like:

    Click on my |ImageLink|_
    
    .. |ImageLink| image:: /images/link.png
    .. _ImageLink: http://link.url/
    
like image 143
noelbk Avatar answered Nov 02 '22 00:11

noelbk


The following site has a reference for reStructuredText but also Markdown, MediaWiki, asciidoc & org-mode.

http://hyperpolyglot.org/lightweight-markup

like image 3
Javier Avatar answered Nov 01 '22 23:11

Javier