Skip to content

Table of contents

Giorgio Garofalo edited this page Oct 6, 2024 · 10 revisions

A table of contents is a quick summary of the document, where links to headings are displayed in a visual hierarchy.

  • paged documents also display the corresponding page number.
  • slides documents constrain the maximum height, making it scrollable.

A ToC can be displayed through the .tableofcontents function, with the following optional parameters:

Parameter Description Accepts Default
title Title that precedes the ToC.
If unset, it's automatically localized.
Inline content Automatically localized (e.g. Table of Contents for English)
maxdepth Maximum level of headings to display.
e.g. maxdepth = 2 collects # This and ## This, but not ### This.
Integer 3
focus If set, adds focus to the item with the same text as this argument.
Inline style (strong, emphasis, etc.) is ignored when comparing the text content.
Inline content (none)
Clone this wiki locally