Asciidoctor PDF generates a PDF outline by default.
You can customize the outline title and the depth of section levels that are displayed in the PDF outline using AsciiDoc document attributes.
The outline can also be deactivated with the
By default, the document title is displayed as the title of the PDF outline.
You can customize the outline title using the
outline-title document attribute.
= The Intrepid & Thrilling Chronicles :outline-title: The Chronicles (1)
The PDF outline resulting from the example above will be titled “The Chronicles”.
You can adjust the depth of section levels that are displayed in the PDF outline independent of the TOC level depth with the
outlinelevels document attribute.
outlinelevels is set to the same value as
toclevels and all the included levels are fully expanded.
To customize the depth of the section levels displayed in the PDF outline and their expansion, set the
outlinelevels attribute in the header of your document and assign it an integer.
= Document Title :outlinelevels: 3 (1)
In the above example,
outlinelevels is set to
The resulting PDF outline will list the part titles (if present and the doctype is
book), level 1 (
==), level 2 (
===), and level 3 (
====) section titles.
All the parts and sections listed in the PDF outline will be fully expanded because a second number isn’t present in the value assigned to
To specify which levels are automatically expanded in the PDF outline, set the
outlinelevels attribute in the header of your document and assign it a two-integer value (e.g.,
The first number represents the section level depth included in the outline; the second number represents the level depth after which the levels are no longer automatically expanded.
= Document Title :outlinelevels: 3:1 (1)
|1||Directly after the first integer, enter a colon (
You can also override the
outlinelevels document attribute for a specific section and its children by setting
outlinelevels on the section’s parent.
= Document Title :outlinelevels: 1 (1) == Section title Content. [outlinelevels=2] (2) == Section title Content. === Section title (3)
|3||This section title (and any of its children) will be listed in the PDF outline because
The PDF outline is generated by default when you run Asciidoctor PDF.
You can turn off the outline by unsetting the document attribute
= Document Title :!outline: (1)
outline attribute is unset, the resulting PDF won’t have an outline.