summaryrefslogtreecommitdiff
path: root/docs/modules/ROOT/pages/toc.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/modules/ROOT/pages/toc.adoc')
-rw-r--r--docs/modules/ROOT/pages/toc.adoc21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/modules/ROOT/pages/toc.adoc b/docs/modules/ROOT/pages/toc.adoc
new file mode 100644
index 00000000..21ee2e5e
--- /dev/null
+++ b/docs/modules/ROOT/pages/toc.adoc
@@ -0,0 +1,21 @@
+= Table of Contents
+:navtitle: TOC
+
+== Add a table of contents
+
+The table of contents (TOC) is not included by default.
+The TOC is only included if the `toc` attribute is set on the document.
+The value of this attribute determines the placement.
+If a value is not specified, the placement defaults to `auto`, which is directly after the document title.
+
+For documents that have the book doctype, the TOC is inserted using discrete pages between the title page and the first page of content.
+For all other doctypes (unless the `title-page` attribute is set), the TOC is inserted in the flow of text.
+If a placement is not specified, that location is between the document title and the first block of content.
+
+While the table of contents is not included by default, the PDF outline is always included.
+The `toclevels` attribute controls the depth of both the TOC and the PDF outline (regardless of whether the TOC is enabled).
+The depth of the outline can be controlled independently using the `outlinelevels` attribute.
+Both attributes can also be set on individual sections to override the depth for a given section and its children.
+
+NOTE: If a document that has the book doctype includes a preface, an entry for the preface is only included in the TOC if the `preface-title` is assigned a value (e.g., `preface-title=Preface`).
+This value is used as the heading of the preface and as the text of the entry in the TOC.