Thanks a lot Yarko!
I'm sorry I missed the foo.* trick in the doc (or I did forget about
it!). I apologize.
I've tried your advice but I get a strange behavior:
My file named lesson1.rst is in the directory $ROOT/source/teachning/
course1. In that file when I write:
.. figure:: foo.*
In got a warning saying that: "... Image file not readable: teaching/
course1/teaching/course1/foo.svg" (and another one for the foo.pdf
file). This is strange since both files are caught (which is not
obvious with the "foo.*" syntax) but it seems that these files are not
searched in the right place.
When I use:
.. figure:: mypics/foo.*
the warning says "... Image file not readable: teaching/course1/
teaching/course1/mypics/foo.svg" (for the tests I put the files in
both places)
The warning disappears when I try:
.. figure:: foo.svg
or
.. figure:: mypics/foo.svg
Any idea?
Regards,
Laurent
PS: I use Sphinx-0.5dev_20081117-py2.5.egg
On 18 nov, 20:26, "Yarko Tymciurak" <
yark...@gmail.com> wrote:
> If you look at the sources, sphinx/builder.py - you'll see the
> supported_image_types:
> In StandaloneHTMLBuilder & SerializingHTMLBuilder, they are:
>
> image/svg+xml
> image/png
> image/gif
> image/jpeg
>
> HTMLHelpBuilder & LaTeXBuilder do not include svg;
>
> LaTeXBuilder adds 'application/pdf'
>
> I think these must be parsed in order, as if you have both pdf and png of a
> file, latex picks pdf. That would lead me to expect the same behavior for
> svg.
>
> Regards,
> Yarko
>
> On Tue, Nov 18, 2008 at 12:29 PM, Yarko Tymciurak <
yark...@gmail.com> wrote:
> > the builders will choose the "best" format from what is available, and you
> > write in your rst this:
> > .. image:: my_images/foo.*
>
> > instead of (for example)
>
> > .. image:: my_images/foo.pdf
>
> > Seehttp://
sphinx.pocoo.org/rest.html#images