Table of contents
::toc::toc{depth=2}::toc{depth=2 title="Inhalt"}::toc{title=""}| Attribute | Values | Default | Meaning |
|---|---|---|---|
depth | 1–6 | 3 | Include headings of this level and above |
title | quoted text | "Contents" | The title above the list; title="" shows no title |
# Field guide
::toc{depth=2 title="Contents"}
::pagebreak
## Leaves
MDLeaf lays Markdown out on real pages. Paragraphs flow from page to page, and the page view shows exactly what the PDF will contain.
MDLeaf lays Markdown out on real pages. Paragraphs flow from page to page, and the page view shows exactly what the PDF will contain.
### Shapes
Not listed: depth is 2.
::pagebreak
## Bark
MDLeaf lays Markdown out on real pages. Paragraphs flow from page to page, and the page view shows exactly what the PDF will contain.
MDLeaf lays Markdown out on real pages. Paragraphs flow from page to page, and the page view shows exactly what the PDF will contain.
::pagebreak
## Roots
MDLeaf lays Markdown out on real pages. Paragraphs flow from page to page, and the page view shows exactly what the PDF will contain. Download sample (.mdl)
Open it in MDLeaf with Library → Import .mdl. If MDLeaf is installed, you can also open the file directly.
How it works
Section titled “How it works”- Every heading of the document up to
depthis listed, in order — including headings above the table. Headings inside quotes, lists and footnotes are not listed. - Each entry shows the heading text, a dotted leader and the displayed page number (after any numbering changes). In draft view the numbers are empty; they are filled in by page view.
- Each entry is a link to its heading, in the preview and in the PDF.
- The title is not a heading, so the table never lists itself. You can use
::tocmore than once; each shows the same list.
Common mistakes
Section titled “Common mistakes”::toc{depth=7}— depth must be 1 to 6:directive-attr-invalid, and no table is shown.::toc{title=Table of contents}— values with spaces need quotes:title="Table of contents".