Login  Register

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

http://themes.asciidoctor.org/preview/

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.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://google.com/profiles/dan.j.allen
http://mojavelinux.com
http://mojavelinux.com/seaminaction