On 2011-03-03, cool-RR wrote:
> --00163646cf362ffed8049d9ae779
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable

> On Thu, Mar 3, 2011 at 4:25 PM, Guenter Milde <mi...@users.berlios.de>wrote=


>> On 2011-03-03, cool-RR wrote:
>> > Hello,

>> > In my html documentation I would like to put an image with a
>> > thumbnail. i.e. a small image will be shown on the document, and
>> > when clicking it the full version of the image will be shown. I
>> > don't care whether Sphinx/Chrome does the resizing or whether I have
>> > to supply two pictures myself.

>> > What's the best way to do this?

>> It depends. A separate thumbnail saves bandwith and makes a faster
>> loading of the overview::

>>  .. image:: tree-small.jpg
>>     :alt: tree
>>     :target: tree.jpg


> I tried this approach, but it seems that the smart path algorithm that
> works in the `image` section doesn't work in the target section.

> e.g., I set an image of `/images/medium_screenshot.png` and target of
> `/images/screenshot.png`, it found the image but when I followed the
> link it gave an error, because images is not really at the root.

Strange. If you write

  .. image:: /images/medium_screenshot.png
  
the image file should be searched at the root too.

Both, the argument to the "image" directive itself as to the "target"
option must be valid URIs.

http://docutils.sourceforge.net/docs/ref/rst/directives.html#images

>> If there are just a few images and they will
>> usually be magnified anyway by (almost) all readers, you can also use the
>> "original" and set an explicite size::

>>  .. image:: tree.jpg
>>     :alt: tree
>>     :width: 2 cm


> This approach didn't put a magnifying link on the image.

Sorry, for the "magnifying" link you need the same :target: argument as
above.

Günter


-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to