Georg Brandl wrote:
> chip schrieb:
>> Guys,
>>
>> Could someone help me understand if this is a bug or if I am missing
>> something here.  When I make an image clickable by adding the :target:
>> option, the generated html does not modify the path so that it points
>> to the file's built location in _images.
>>
>> For example the following image directive:
>>
>>  image:: 0355.png
>>    :target: 0355.png
>>    :scale: 50
>>
>> Generates this html code fragment which links to a non-existent file:
>>
>> <a class="reference external image-reference" href="0355.png">
>> <img alt="_images/0355.png" src="_images/0355.png" style="height:
>> 324.5px;" /></a>
>>
>> Shouldn't the link be to href="_images/0355.png" instead of
>> href="0355.png" ?
> 
> This is a good question.  The problem is that the target of the image
> link can be anything: another page, an image, an external URL.  If
> Sphinx makes any assumptions about what it might refer to, it will
> break other uses.

That didn't even occur to me, but absolutely makes sense.

Initially I was trying to use :width: instead of :scale: to make some 
generated images a reasonable size, but I'm still sorting that all out. 
  It is looking like :scale: may be the way to go.

Thanks

> 
> In your case however, you needn't set the target yourself: the latest
> trunk version sets a link to the non-scaled version automatically.
> 
> Georg


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

Reply via email to