Sunday 23 November 2008 21:29:05 Georg Brandl
> Gael Varoquaux schrieb:
> > Hey guys,
> >
> > Sorry to be lazy, but I can't find a quick way to do this: I want a
> > scaled down image, using:
> >
> > .. image:: foobar.jpg
> >
> >     :scale: 50
> >
> > but I want it also to be a link to the image itself. The following does
> > work, because the image is copied in the _images folder:
> >
> > .. image:: foobar.jpg
> >
> >     :target: foobar.jpg
> >     :scale: 50
> >
> > I think it would be nice, if by default, with the HTML writer, the scaled
> > down images had links to the full size image (that would be off course
> > overridden by an explicit 'target').
> >
> > What'ya think?
>
> +1 -- I think Sebastian even had a patch for that.

I have ... but that doesn't apply to the tip.  I implemented it (better: 
played around with it) before sphinx supported "globbing" in image directives.  
My hack used the doctree-resolved to traverse all image nodes and set the 
proper attributes.  But now doctree-resolved is emitted *before* the builder 
picks its preferred image, which means, that doctree-resolved is not the right 
place anymore.  I'm digging the sources, and will write up something new ... 
shouldn't be too difficult, basically I just need to set the target attribute 
of 
the image node to the relative uri somewhere after the images have been post-
processed.

-- 
Freedom is always the freedom of dissenters.
                                      (Rosa Luxemburg)

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to