Home

Heading

This is a type used in Stencila Schema for document headings.

It exists to represent heading content and hierarchy explicitly, with additional support for document labeling, authorship, and provenance. This makes headings more than presentational text and allows them to participate in sectioning, appendix numbering, and document navigation workflows.

Key properties include level, content, labelType, and label.

Analogues

The following external types, elements, or nodes are similar to a Heading:

  • HTML <h1>: Closest HTML analogue for heading semantics, although Stencila uses one type with an explicit level rather than separate h1 to h6 element types.

  • JATS <title>: Closest JATS analogue for section and container titles, though JATS heading semantics are tied to parent structures rather than a standalone heading node with explicit level.

  • Pandoc Header: Close block analogue with an explicit level; Stencila also supports labeling, authorship, and provenance metadata on headings.

  • MDAST Heading: Closest MDAST block analogue for headings.

Properties

The Heading type has these properties:

NameDescriptionTypeInherited from
labelTypeThe type of the label for the appendix (if present, should be AppendixLabel).LabelType-
labelA short label for the heading.String-
levelThe level of the heading.Integer-
contentContent of the heading.Inline*-
authorsThe authors of the heading.Author*-
provenanceA summary of the provenance of the content within the heading.ProvenanceCount*-
idThe identifier for this item.StringEntity

Related

The Heading type is related to these types:

Bindings

The Heading type is represented in:

Testing

During property-based (a.k.a generative) testing, the properties of the Heading type are generated using the following strategies.

PropertyComplexityDescriptionStrategy
labelTypeMin+No label typeNone
labelMin+No labelNone
levelMin+Fixed value of 11
Low+Generate values between 1 and 61..=6i64
High+Generate values between 0 and 60..=6i64
MaxGenerate an arbitrary valuei64::arbitrary()
contentMin+Generate a single arbitrary inline nodevec_inlines(1)
Low+Generate up to two arbitrary inline nodesvec_inlines(2)
High+Generate up to four arbitrary inline nodesvec_inlines(4)
MaxGenerate up to eight arbitrary inline nodes without restrictions on their ordervec(Inline::arbitrary(), size_range(0..=8))

This documentation was generated from Heading.yaml by docs_types.rs.

© 2026 Stencila