Re: -a toc2 implementation
Posted by
mojavelinux on
Apr 26, 2013; 5:48am
URL: https://discuss.asciidoctor.org/a-toc2-implementation-tp164p165.html
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.