Btw, I also added some other goodies to the toc. You can use the following attributes to customize the toc:toc-title:: The heading text above the toctoc-class:: The CSS class that is added to the toc container divtoclevels:: The depth of the toc (between 1 and 5, default 2)Those are primarily for configuring the built-in toc in the header. You can also put a toc anywhere in the document and customize it like any other block.[[mytoc]][role="mytoc"].My TOCtoc::[levels=3]That inserts a toc like:
<div id="mytoc" class="mytoc"><div class="title">My TOC</div><ul>...up to 3 levels</ul></div>(You guessed it, these features need to be documented :))-DanOn Thu, Apr 25, 2013 at 11:48 PM, Dan Allen <[hidden email]> wrote:All that's left to do to fully mimic the AsciiDoc implementation is to add these styles to the default stylesheet. The way it works in AsciiDoc is that AsciiDoc includes an extra stylesheet, toc2.css. I took a more standard approach by simply adding the "toc2" class to the toc. That way, we can include the styles for both toc layouts in the default stylesheet (and any of the themes).I have a prototype of the styles on the Golo theme, as you can see here (select Golo from the menu).Those are pretty generic styles, so it's just a matter of porting them over. Can you file an issue for tracking this enhancement?-Dan
p.s. Asciidoctor doesn't use JavaScript to generate the toc because it doesn't have to. It has access to the structure of the document during the rendering phase. That's why Asciidoctor makes a reified toc and AsciiDoc does it after the fact.--On Thu, Apr 25, 2013 at 11:23 PM, snowolfe [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I am not sure if this is supposed to mimic the AsciiDoc implementation which puts the toc in the left frame, using Javascript to generate it - if it is, then it doesn't :-)
If you reply to this email, your message will be added to the discussion below:http://discuss.asciidoctor.org/a-toc2-implementation-tp164.htmlTo start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAMLDan AllenPrincipal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597
--Dan AllenPrincipal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597
Free forum by Nabble | Edit this page |