On Mon, Mar 18, 2013 at 5:40 AM, Dan Allen <[email protected]> wrote:
>
>>> I hope you would agree that, if each head can be a link to itself, it
>>>> will make referring to a specific section much easier. Especially if the
>>>> article is long and breaks into many sections. Having a direct link would
>>>> be very convenient.
>>>>
>>>
> As Lex mentioned, this is easy to do by overriding the backend templates.
> Something like:
>
> ifdef::basebackend-html[]
>
> [sect1]
> <div class="sect1{style? {style}}{role? {role}}">
> <h2>*{id?<a id="{id}">}*{numbered?{sectnum} }{title}*{id?</a>}*</h2>
> <div class="sectionbody">
> |
> </div>
> </div>
>
> endif::basebackend-html[]
>
Thanks a lot Dan! A promise and a code sample means the whole-nine-yard
difference to me. Really appreciate the sample code. Hmm..., I see, so I
have to provide my own id (instead of let the program generate it for me),
and I have to apply the above trick to all level of header macros. OK.
I plan to support this option out of the box w/ Asciidoctor, because it
> just makes sense.
Oh, that's a great news.
I haven't try out Asciidoctor yet, but i'm already very excited about it
for the following features.
- self contained css
- no third-party dependency for source highlight
- TOC statically generated, instead of relying on javascript
- 25 times faster
I think I will not resist the temptation by the time that this option being
supported. I desperately need it.
Thanks
--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.