Hello, I am not a seasoned asciidoc user and I was not sure I could figure out how to make it work.
In my txt source file I have now inserted the 2 user-defined attributes pdfoutput and epuboutput : ifdef::basebackend-docbook[] ifdef::pdfoutput[] image::myfigure.pdf[width="15cm"] endif::pdfoutput[] ifdef::epuboutput[] image::myfigure.png[] endif::epuboutput[] endif::basebackend-docbook[] The command lines look like : a2x -fepub ... -a epuboutput myfile.txt a2x -fpdf ... -a pdfoutput myfile.txt And it works. Thanks, Guillaume Le mercredi 17 décembre 2014 22:48:35 UTC+1, Lex Trotman a écrit : > > Hi, > > The distinction between epub and pdf is in the toolchain being run > after asciidoc, and of course asciidoc doesn't know that. You will > have to set an attribute yourself to signal the toolchain, as a2x does > (a2x-format). > > Cheers > Lex > > On 18 December 2014 at 04:13, dutille <[email protected] > <javascript:>> wrote: > > Hello, > > > > When I want to generate both html and pdf from asciidoc with graphics > > included I know that I can get the best of both worlds with conditions > like > > : > > > > ifdef::basebackend-html[] > > image::myfigure.png[width="100%"] > > endif::basebackend-html[] > > ifdef::basebackend-docbook[] > > image::myfigure.pdf[width="15cm"] > > endif::basebackend-docbook[] > > > > Now I want to generate epub also. But : > > 1 epub and pdf originate from the same basebackend-docbook > > 2 epub does not accept pdf > > 3 using png in pdf output is not an option > > > > Is there anything like ifdef::backend-epub[] / ifdef::backend-pdf ? > > > > Kind regards, > > > > Guillaume > > > > Guillaume > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "asciidoc" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to [email protected] <javascript:>. > > To post to this group, send email to [email protected] > <javascript:>. > > Visit this group at http://groups.google.com/group/asciidoc. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "asciidoc" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/asciidoc. For more options, visit https://groups.google.com/d/optout.
