heading
.heading content:{InlineMarkdownContent} \
depth:{Int} \
ref:{String? = null} \
numbered:{Boolean = true} \
indexed:{Boolean = true} \
breakpage:{Boolean = true} \
foreground:{Color? = null} \
background:{Color? = null} \
border:{Color? = null} \
borderwidth:{Sizes? = null} \
borderstyle:{NodeStyle.BorderStyle? = null} \
alignment:{NodeStyle.Alignment? = null} \
textalignment:{NodeStyle.TextAlignment? = null} \
margin:{Sizes? = null} \
padding:{Sizes? = null} \
radius:{Sizes? = null} \
fontsize:{TextTransformData.Size? = null} \
fontweight:{TextTransformData.Weight? = null} \
fontstyle:{TextTransformData.Style? = null} \
fontvariant:{TextTransformData.Variant? = null} \
textdecoration:{TextTransformData.Decoration? = null} \
textcase:{TextTransformData.Case? = null}
-> NodeCreates 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}As a Heading primitive, this function can be used in .extend to affect all headings in the document:
.extend {heading} where:{depth: .depth::equals {1}}
content:
.super foreground:{blue}
*.content*Return
a wrapped Heading node
Parameters
- Likely a body argument
inline content of the heading
whether the heading can be numbered and has its position tracked in the document hierarchy. Actual numbering depends on numbering.
whether the heading should appear in the table of contents and navigation sidebar. Can be used independently from numbered.
border color. Default if unset and borderwidth is set
border width. Default if unset and border is set
border style. Normal (solid) if unset and border or borderwidth is set
Values
normaldasheddotteddouble
Throws
if depth is not in the 1-6 range