2

This FAQ section describes how to set the "section depth"/"TOC level"/toclevel shown in the table of contents. However, I've no idea how to implement this in my simple:

$ asciidoctor my.txt -o my.html

command. Does anyone?

Johnny Utahh
  • 2,389
  • 3
  • 25
  • 41

1 Answers1

8

The toclevels attribute controls this.

From https://asciidoctor.org/docs/user-manual/#user-toc-levels:

By default, the TOC will display level 1 and level 2 section titles. You can set a different depth with the toclevels attribute.

:toc:
:toclevels: 4
  1. The toc attribute must be set in order to use toclevels.
  2. toclevels is set and assigned the value 4 in the document’s header. The TOC will list the titles of the section 1, 2, 3, and 4 levels when the document is rendered.
Johnny Utahh
  • 2,389
  • 3
  • 25
  • 41
  • See related [discussion/issue at asciidoctor's github area](https://github.com/asciidoctor/asciidoctor/issues/1398). – Johnny Utahh Jul 07 '15 at 15:21