Expand description
The synthesized elements of the table of contents and their general lowering rules, the default on every backend.
The three elements are PIECE (the root), LIST and ENTRY. They
are synthesized: no document can write them, and the stage
BuildToc builds them. Each declares the block role
Block, so the block-structure pass, which runs over the value before it
is lowered, wraps the title inside an entry in one paragraph, before the
entry’s sub-list; the entry’s rule writes that paragraph as its content
alone. The rules stage:
- the root (
RootRule): aflm.pres.blockof roleflm.toc, kind tokentocand document roleDocRole::Toc, holding its list; - a list (
ListRule): an unlabeledflm.pres.listof kind tokensunnumberedandtoc, each entry with an empty label; - an entry (
EntryRule): the number in a span of roleNUMBER_ROLEand a space, where the heading has a number; the title; both inside one link to the heading’s anchor where it has one; then the sub-list, where there is one.
The rules read the counters and anchors tables where they are computed,
and are registered with peer declarations of those tables and of the
presentation elements they produce, so that the feature builds in a
registry without the numbering or refs features.
Structs§
- Entry
Rule - The general lowering rule of one entry, the element
ENTRY,flm.toc.entry.lower.default. It reads the entry’s payload (TocEntryPayload) and stages - List
Rule - The general lowering rule of a list of entries, the element
LIST,flm.toc.list.lower.default. It stages - Root
Rule - The general lowering rule of the root of the table of contents, the
element
PIECE,flm.toc.lower.default. It stages
Constants§
- LINK_
KIND - The link kind of an entry’s link,
toc.
Functions§
- rule_
name - Returns the name of the general lowering rule of the element
element,<element>.lower.default.