On 16 May 2014 00:37, Alejandro Mery <[email protected]> wrote:
> Hi, I need to pass the value of the title of the parent section as follows
> ----
> [sect1]
> {set:title1:{title}}
> |
>
> [sect2]
> <section class="slide">
> <h2>{title1}</h2>
> <h3>{title}</h3>
> |
> </section>
> ----
>
> but {title1} gets rendered as the value of {title} in sect2 instead of
> sect1...

Hi,

Unfortunately as you found, attributes inside the value of a {set: }
are not substituted until the attribute being set is itself
substituted.

I can't think of any way of passing information between parts of the
generated output like this with asciidoc as it stands.

I don't think your suggestion of eval in the next post can help, it
only evaluates Python expressions, not statements so no assignment.
And as you said above, you can't capture the value of {title} in level 1 anyway.

Cheers
Lex


>
> what's the right way of doing so?
>
> (using AsciiDoc 8.6.9 on Ubuntu 14.04)
>
> thanks in advance,
> Alejandro Mery
>
> --
> 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.

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