I see that "object" is one method; inline svg is another; "embed" what Adobe recommends, but not valid xhtml. Here's links I glanced at: http://www.w3schools.com/svg/svg_inhtml.asp http://wiki.svg.org/index.php?title=Inline_SVG
Too bad there doesn't seem to be definitive answer. Anybody have much experience deploying svg? On Wed, Nov 19, 2008 at 1:00 AM, lpezard <[EMAIL PROTECTED]> wrote: > > In fact I could not wait to make the test... > > So I installed the way you advice and I still get the same problem > with directories. The egg which is installed is: > Sphinx-0.5dev_20081119-py2.5.egg. > > I also made some other tests with .svg and I found that the html > builder inserts code like: > > <div class="figure"> > <img alt="../../_images/toto.svg" src="../../_images/toto.svg" /> > ... > </div> > > which does not allow to display svg file (at least for me), as far as > I understand after some "googling" and reading of svg/html tutorials. > I found that something like: > > <div class="figure"> > <object data="../../_images/toto.svg" type="image/svg+xml"></object> > ... > </div> > > works correctly. But since I'm not an expert there is perhaps > something that I miss (once again!) > > Regards, > > Laurent > > On 19 nov, 01:18, "Yarko Tymciurak" <[EMAIL PROTECTED]> wrote: > > Hmmm.... are you using the trunk version of Sphinx? > > There was a problem w/ paths and * selection of image files which Georg > > fixed a short while back (few weeks). > > > > You can get a zip / tar.gz, or tar.bz2 fromhttp:// > www.bitbucket.org/birkenfeld/sphinx/ > > > > (download in upper-right) > > > > On Tue, Nov 18, 2008 at 3:06 PM, lpezard <[EMAIL PROTECTED]> wrote: > > > > > 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 -~----------~----~----~----~------~----~------~--~---
