Lex, All,

On 2014-09-07 21:39 +1000, Lex Trotman spake thusly:
> On 7 September 2014 19:36, Yann E. MORIN <[email protected]> wrote:
> > How can the filter know what the output format is?
> >
> > Which brings up the other question:
> >
> > How in asciidoc syntax can we know what the output format is? I looked
> > at the different attributes, but all I could find was {backend} which is
> > not the output format.
> 
> Well, the backend is the output from asciidoc, and is the output
> format for the various HTML backends.
> 
> However if the backend is docbook then other toolchains usually
> transform it further and asciidoc doesn't know about it.  If you run
> those toolchains using the a2x script then the a2x-format attribute is
> provided to asciidoc to specify the output of the toolchain that a2x
> is running.  If you don't use a2x then it is up to you.

Ah, I think I found a better solution yet: do not even pass the filter
if output is "text"

    [{a2x-format$^text$::"my-filter"}]
    ----
    My ASCII-art diagrams
    ----

Works as expected, even though this might not be the best solution.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

Reply via email to