summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2023-08-17 01:20:52 -0600
committerDan Allen <dan.j.allen@gmail.com>2023-08-17 01:20:52 -0600
commita206524430d5af7a1fa00b6bdd403ef6b4622f7b (patch)
treed285b7561d7cf68a7ace5a73ad3b56b4fb82c725
parentde13a7846ad2c93767837f8c72d0637d965988f8 (diff)
document toclevels block attribute
-rw-r--r--docs/modules/ROOT/pages/toc.adoc36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/modules/ROOT/pages/toc.adoc b/docs/modules/ROOT/pages/toc.adoc
index 39855c27..82d9e53e 100644
--- a/docs/modules/ROOT/pages/toc.adoc
+++ b/docs/modules/ROOT/pages/toc.adoc
@@ -30,6 +30,42 @@ The `toclevels` attribute controls the depth of both the TOC and the PDF outline
The depth of the PDF outline can be controlled independently using the xref:pdf-outline.adoc#levels[outlinelevels attribute].
Both the `toclevels` and `outlinelevels` attributes can be set as a block attribute on each section to override the respective depth of the TOC or outline for that section.
+== TOC depth
+
+You can adjust the depth of section levels that are displayed in the TOC using the `toclevels` document attribute.
+
+[,asciidoc]
+----
+= Document Title
+:toclevels: 3 <.>
+----
+<.> Set `toclevels` in the document header.
+Accepted values are the numbers 1 through 5.
+
+You can override the `toclevels` document attribute for a specific section and its children by setting the `toclevels` block attribute on the respective section.
+
+[,asciidoc]
+----
+= Document Title
+:toclevels: 1
+
+== Section title
+
+Content.
+
+[toclevels=2] <.>
+== Section title
+
+Content.
+
+=== Section title
+----
+<.> Temporarily overrides the `toclevels` document attribute with the value `2` until the next sibling section.
+
+The block attribute temporarily changes the value of the document attribute and thus refers to the absolute depth.
+Therefore, it must take into account the depth of the section on which it is set.
+The value `0` always removes the current section from the TOC.
+
== Insert TOC entries
You can add TOC entries for a preface, preamble, or imported PDF pages using the `notitle` option.