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" <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 > > > On Tue, Nov 18, 2008 at 9:02 AM, lpezard <[EMAIL PROTECTED]> wrote: > > >> Hi all, > > >> Thanks a lot for Sphinx, I'm right now using it for my web page that I > >> use to distribute documents to my students. I can no more write html > >> or latex directly now! > > >> I would like to insert pictures in svg format in the html and pdf > >> format in latex/pdf but I do not see any obvious solution. So I'm > >> wondering if: > > >> 1. Is it a good idea? (if not why?) > > >> 2. Is there an easy way to say "use file.svg for html and file.pdf for > >> latex/pdf" > > >> 3. As far as I can remember, pdflatex searches for file with extension > >> that it knows (.jpg, .png, .pdf, ...) and I can write something like: > > >> \includegraphics{foo} > > >> and it searches for foo.jpg, etc. > > >> The same way, in my .rst file, I would like to write something like: > > >> .. figure:: fooo > >> ... > > >> and maybe with some configuration list the html build would search in > >> a list of extensions ie ['jpg', 'svg'...] and the latex one for > >> another list. > > >> Does this make sense? > > >> Thanks again for Sphinx and for your help! > > >> All the best, > > >> Laurent --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
