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.
The toc attribute is 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 toc attribute is set to preamble: the TOC is generated
immediately below the document’s preamble.
Macro
The toc attribute is set to macro: the table of contents is
generated only where a toc::[] block macro appears.