On 01/09/12 16:03, Axel Rauschmayer wrote:
> I’m just starting out with Asciidoc and am very happy with it, so far.
> I’m going to write a book with it and am currently migrating my content
> from LaTeX to Asciidoc (via pandoc).
> 
> One question, if I may: I would like to use the same Asciidoc source to
> produce an EPUB file, an HTML file and a PDF file. For EPUB, bitmap
> images are still best; for HTML, I’d use SVG; and for PDF, I’d use PDF
> files. To ensure that the images look best for all output formats, I’d
> save each image in all three formats. Is there a way to tell Asciidoc
> which one to use, depending on the output format? Ideally, it would be
> more compact than ifdef::backend and writing each image command three times.

The most straight-forward approach would be to define an attribute for
image file name extensions and put in the image macro calls, for
example:

image image::tiger.{imgext}[]

Now you can specify the file type when you generate your output files
using the attribute command-line option e.g.  --attribute imgext=svg


Cheers, Stuart

> 
> Thanks!
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "asciidoc" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/asciidoc/-/VXph5xDsyucJ.
> 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.

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