Generating TOC with asciidoctor

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Generating TOC with asciidoctor

gamussa
Hello,

I use asciidoc to generate book website with following command:

asciidoc -d book -b html5 -a toc2 -a toclevels=3 book.asciidoc

But apparently asciidoctor doesn't know anything about toc attribute.
Please advise.

Cheers,
Vik
Reply | Threaded
Open this post in threaded view
|

Re: Generating TOC with asciidoctor

mojavelinux
Administrator
Actually, it does. It just doesn't know anything about the toc2 attribute :) I should add support for that now that I realize what it does (it just adds an extra style to the HTML output and pulls in an extra stylesheet).

So, to get what you want, you would just run:

asciidoctor -d book -b html5 -a toc book.asciidoc

Unfortunately, Asciidoctor doesn't yet honor the toclevels attribute. It shouldn't be hard to do, just haven't gotten around to it yet. Feel free to hack on it if you would like. Otherwise, I'll get to it in a short while.

-Dan



On Tue, Apr 9, 2013 at 10:27 PM, gamussa [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

I use asciidoc to generate book website with following command:

asciidoc -d book -b html5 -a toc2 -a toclevels=3 book.asciidoc

But apparently asciidoctor doesn't know anything about toc attribute.
Please advise.

Cheers,
Vik


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Generating-TOC-with-asciidoctor-tp97.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

Reply | Threaded
Open this post in threaded view
|

Re: Generating TOC with asciidoctor

mojavelinux
Administrator
In reply to this post by gamussa
I put support for toc2 on the roadmap for 0.1.2. That will line up with the arrival of the default stylesheet, so the timing is good.


-Dan


On Wed, Apr 10, 2013 at 2:41 AM, Dan Allen <[hidden email]> wrote:
Actually, it does. It just doesn't know anything about the toc2 attribute :) I should add support for that now that I realize what it does (it just adds an extra style to the HTML output and pulls in an extra stylesheet).

So, to get what you want, you would just run:

asciidoctor -d book -b html5 -a toc book.asciidoc

Unfortunately, Asciidoctor doesn't yet honor the toclevels attribute. It shouldn't be hard to do, just haven't gotten around to it yet. Feel free to hack on it if you would like. Otherwise, I'll get to it in a short while.

-Dan



On Tue, Apr 9, 2013 at 10:27 PM, gamussa [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

I use asciidoc to generate book website with following command:

asciidoc -d book -b html5 -a toc2 -a toclevels=3 book.asciidoc

But apparently asciidoctor doesn't know anything about toc attribute.
Please advise.

Cheers,
Vik


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Generating-TOC-with-asciidoctor-tp97.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




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

Reply | Threaded
Open this post in threaded view
|

Re: Generating TOC with asciidoctor

mojavelinux
Administrator
In reply to this post by gamussa
Btw, thanks for pointing out this compliance issue!

-Dan


On Wed, Apr 10, 2013 at 2:43 AM, Dan Allen <[hidden email]> wrote:
I put support for toc2 on the roadmap for 0.1.2. That will line up with the arrival of the default stylesheet, so the timing is good.


-Dan


On Wed, Apr 10, 2013 at 2:41 AM, Dan Allen <[hidden email]> wrote:
Actually, it does. It just doesn't know anything about the toc2 attribute :) I should add support for that now that I realize what it does (it just adds an extra style to the HTML output and pulls in an extra stylesheet).

So, to get what you want, you would just run:

asciidoctor -d book -b html5 -a toc book.asciidoc

Unfortunately, Asciidoctor doesn't yet honor the toclevels attribute. It shouldn't be hard to do, just haven't gotten around to it yet. Feel free to hack on it if you would like. Otherwise, I'll get to it in a short while.

-Dan



On Tue, Apr 9, 2013 at 10:27 PM, gamussa [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

I use asciidoc to generate book website with following command:

asciidoc -d book -b html5 -a toc2 -a toclevels=3 book.asciidoc

But apparently asciidoctor doesn't know anything about toc attribute.
Please advise.

Cheers,
Vik


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Generating-TOC-with-asciidoctor-tp97.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




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




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

Reply | Threaded
Open this post in threaded view
|

Re: Generating TOC with asciidoctor

gamussa
Thanks for help, Dan.
Reply | Threaded
Open this post in threaded view
|

Re: Generating TOC with asciidoctor

gamussa
In reply to this post by mojavelinux
Dan,

Is there any way to specify depth of TOC?
By default, asciidoctor generates 3 (===) levels depth.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Generating TOC with asciidoctor

mojavelinux
Administrator
Yep, the toclevels attribute.

:toclevels: 1

Actually, but default it generates 2 levels (which amounts to the === heading as the document title doesn't count as a toc level).

-Dan


On Wed, Apr 17, 2013 at 11:36 PM, gamussa [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Dan,

Is there any way to specify depth of TOC?
By default, asciidoctor generates 3 (===) levels depth.

Thanks


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Generating-TOC-with-asciidoctor-tp97p148.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