On Thursday 08 April 2010 09:34:42 Alpha Zo wrote:
> There is a 2009 thread called "In what format should I maintain an
> image". I have similar question. Can an EPS or PDF file be included in
> a Sphinx document with PNG conversion for HTML output?

If you have a EPS or PDF image it's trivial to add a rule in the Makefile to 
convert them to PNG. If you have GNU make and ImageMagick installed, add this 
at the beginning of your Makefile (assuming you have image1.pdf and 
image2.pdf):

PNGIMAGES = image1.png \
            image2.png

%.png: %.pdf
        convert $< $@


Then change the html target to make it depend on the images:

html: ${PNGIMAGES}

And voila, the images will be converted from PDF to PNG whenever you build the 
html target and they have changed.

-- 
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