heading

.heading content:{InlineMarkdownContent}
depth:{Int}
ref:{String? = null}
numbered:{Boolean = true}
indexed:{Boolean = true}
breakpage:{Boolean = true}
-> Node

Creates a heading with fine-grained control over its behavior.

Unlike standard Markdown headings (#, ##, etc.), this function allows explicit control over numbering, page breaks, table of contents indexing, and custom identifiers.

Example:

.heading {My heading} depth:{2} numbered:{no}

Return

a wrapped Heading node

Parameters

content

inline content of the heading

depth

importance level of the heading (1 for H1, 6 for H6). For 0-depth, see marker instead

ref

optional custom identifier for cross-referencing. If unset, the ID is automatically generated

numbered

whether the heading can be numbered and has its position tracked in the document hierarchy. Actual numbering depends on numbering.

indexed

whether the heading should appear in the table of contents and navigation sidebar. Can be used independently from numbered.

breakpage

whether the heading triggers an automatic page break

Throws

if depth is not in the 1-6 range