Hi Pavel

Pavel Jurus wrote:
> Hello,
> 
> I cannot figure out how to turn on table of contents (in xhtml code) in 
> document. I am able to generate table of contents by calling
> "asciidoc -a toc docname.txt". However I would prefer to be able to indicate 
> that I want toc in text of my document. I tried to put ":toc:" or "[toc]" in 
> my documents but it has no effect.
> 
> I such thing possible? And how can I do this? You may ask why I want to put 
> attribute into the text of document rather than to config file or to command 
> line option. I want table of contents only in some longer documents and not 
> in short ones, so config file is not suitable. And I'm generating xhtml 
> dynamically by CGI (FastCGI to be exact) script, which means that command 
> line options should be the same for all documents.

Not easily doable within AsciiDoc. You could go the DocBook route: 
generate DocBook using AsciiDoc then XHTML with TOC using XSLT 
Stylesheets. If you are able to run JavaScript server-side over the 
XHTML you may be able to generate the TOC that way but I don't have any 
experience with server-side JavaScript.


> 
> Cheers
> Pavel
> 
> _______________________________________________
> Asciidoc-discuss mailing list
> Asciidoc-discuss@metaperl.com
> http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss
> 

Cheers, Stuart
-- 
Stuart Rackham

_______________________________________________
Asciidoc-discuss mailing list
Asciidoc-discuss@metaperl.com
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss

Reply via email to