This is not an uncommon use case and we use an attribute to control
which image format is output depending on the backend.
The macro used to control either SVG or PNG format is called "svgpng"
and defined in asciidoc.conf as follows:

ifdef::basebackend-html[]
[attributes]
# Load PNGs instead of SVGs for HTML
svgpng=png
svgjpg=jpg
endif::basebackend-html[]
ifdef::backend-docbook[]
[attributes]
svgpng=svg
svgjpg=svg
endif::backend-docbook[]


You use it as follows:

image::picture1.{svgpng}[]


Depending in the backend either a SVG or a PNG image file is used.

On Sep 20, 4:23 am, Ivan Voras <[email protected]> wrote:
> I'm trying to write a manual and I'd like it to end up in both HTML
> and PDF. The problem is that bitmap graphics look awful when included
> in PDF so I'd like to use a vector format. I tried using SVG but
> neither the current web browsers nor the PDF toolchain support it -
> which is very unfortunate.
>
> Any suggestions on how to use vector graphics? Since browsers don't
> support anything else, this would probably mean that two formats are
> specified - PNG and something else for the same image - is this even
> possible?

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" 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/asciidoc?hl=en.

Reply via email to