::directive{attrs}).
Table of Contents
Generate a TOC from all headings in the document:With options
Attributes
The TOC is generated as a document field. When opening in Word or LibreOffice, you may be prompted to update fields to populate the TOC with page numbers.
Example
List of Figures
Generate a list of all figures (images and charts with captions):With options
Attributes
How figures are numbered
Figures are automatically numbered based on:- Images with alt text (alt text becomes the caption):
 - Images with explicit
captionattribute:{caption="Sales Dashboard"} - Charts with a
captionattribute::::chart{caption="Revenue 2024"}
"Figure", "Abb.") and caption styling are configured in your document’s style settings.
List of Tables
Generate a list of all tables with captions:With options
Attributes
How tables are numbered
Tables are automatically numbered based on tables that have thecaption attribute in the :::table directive:
"Table", "Tabelle") and caption styling are configured in your document’s style settings.
List of Code Listings
Generate a list of all code blocks with captions:With options
Attributes
How code listings are numbered
Code listings are automatically numbered based on code blocks that have thecaption attribute:
"Listing", "Quellcode") and caption styling are configured in your document’s style settings.
Diagram code blocks (e.g.,
mermaid, plantuml) with captions are numbered as figures and appear in the List of Figures, not the List of Code Listings — unless renderAsImage=false is set. See Diagrams for details.List of Abbreviations
Generate a list of all abbreviations used in the document:With options
Attributes
alphabetical— abbreviations sorted A–Zdocument— abbreviations in the order they first appear
Tab leader styles
ThetabStyle attribute controls the visual separator between the entry text and the page number:
