Hello again,

On Thursday 08 March 2007 20:39, Stuart Rackham wrote:
> 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.

correct me if I'm wrong. I thought that XHTML TOC is just matter of embedding
or linking of toc.js. This script then generates TOC dynamically when 
displayed by client (web browser). In this respect there is no difference 
whether I generate my documect by command line or by CGI script. All I want 
is to choose whether toc.js is included, and I want to do it separately for 
each document.

My question was basically whether I can choose that I want toc.js included by 
putting an atribute into the text. I don't fully understand which attributes 
can or cannot be part of an AttributeEntry. You can for example put
":encoding: ISO-8859-1" into document header but setting 
e.g. ":iconsdir: /home/pavel/icons" in the document would have no effect?  I 
am asking whether ":toc:" or something simillar would work in the document.


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

Asciidoc-discuss mailing list

Reply via email to