pub enum TocMode {
Disabled,
Auto,
Left,
Right,
Preamble,
Macro,
}Expand description
Where (and whether) a document’s table of contents (TOC) is generated,
resolved from the toc attribute and, when toc carries no placement
keyword, the toc-placement attribute.
The toc/toc-placement attributes are header-only, so this value is fixed
once a document’s header has been processed. A nested AsciiDoc table cell
behaves as its own standalone document and resolves its own TocMode
independently — it does not inherit the parent document’s setting.
The auto, left, and right placements all render the TOC automatically
near the top of the document; left and right additionally request a
fixed side column when converting to standalone HTML (a presentation detail
outside this crate’s scope). preamble places the TOC immediately below the
preamble, and macro defers placement to a toc::[] block macro.
Variants§
Disabled
The toc attribute is unset: no table of contents is generated.
Auto
The toc attribute is empty (the value an empty :toc: resolves to) or
set to auto. The TOC is generated automatically near the top of the
document.
Left
The toc attribute is set to left: an automatically placed TOC that,
in standalone HTML, is rendered as a fixed left-hand side column.
Right
The toc attribute is set to right: an automatically placed TOC that,
in standalone HTML, is rendered as a fixed right-hand side column.
Preamble
The placement resolves to preamble (via :toc: preamble or
:toc-placement: preamble): the TOC is generated immediately below the
document’s preamble.
Macro
The placement resolves to macro (via :toc: macro or
:toc-placement: macro): the table of contents is generated only where
a toc::[] block macro appears.