On 29 November 2012 09:59, ping <[email protected]> wrote:
> so my goal is to:
> only when using odp plugin,
> remove [[2]] from the line...
>
> thanks.
>
>
> On 11/28/2012 05:58 PM, ping wrote:
>
> in my doc I have this:
>
> = mydoc
> :backend: odp
>
>
> blabla
>
>
>
> == chapter1{backend$odp::[[2]]}
>
>
> blabla
>
>
>
> I got this error:
> asciidoc: ERROR: <stdin>: line 88: illegal attribute syntax:
> {backend$odp::<text:bookmark text:name="2"/>}
>
> shell returned 1
>
>
>
> I learned this from here:
> http://www.methods.co.nz/asciidoc/userguide.html#_conditional_attribute_references
>
> {<names>$<regexp>::<value>}
>
> Substitutes <value> if <names> does not match <regexp> otherwise the result
> is undefined and the containing line is dropped.
>
>
>
> so It seems I need to escape the [[]] mark?
> then I tried this:
> == chapter1{backend$odp::\\[[2]]}
>
> now I got:
> asciidoc: WARNING: <stdin>: line 88: blank section title
Yes, because the containing line is dropped if defined as it says in
the section you quoted above.
It would be better to define {backend_text} to the text you want to
substitute for non-odp or an empty string for odp and just use an
unconditional reference in the text.
That attribute could be defined depending on the value of
basebackend_.., see some of the filter config files for examples.
Cheers
Lex
>
>
> please help.
> thanks!
>
>
> --
> 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.
--
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.