Private betav0.1.0
Docs
Format developer documentation

Numbering

The document's numbering configuration, defaulting to numbered headings.

Numbering is a document's numbering configuration. On its own it numbers headings h1 through h6, and a NumberingRule or CounterDef inside it extends or replaces that scheme.

Fields

NameTypeDescription
counterStyle
stringThe default counter style for every counter the document numbers. Per-rule, per-Counter, and per-Footnotes styles override it. Defaults to decimal.

Example

An empty <Numbering> numbers headings h1 through h6 hierarchically. Add <NumberingRule> children to number other elements or change the heading format.

<Document title="Report">
  <Numbering>
    <NumberingRule match="figure" counter="figure" format="Figure {figure}: " />
  </Numbering>
  {/* ...layout and sections... */}
</Document>
<template>
  <Document title="Report">
    <Numbering>
      <NumberingRule match="figure" counter="figure" format="Figure {figure}: " />
    </Numbering>
    <!-- ...layout and sections... -->
  </Document>
</template>
<template data-type="document" data-title="Report">
  <template data-type="numbering">
    <template data-type="numbering-rule" data-match="figure" data-counter="figure" data-format="Figure {figure}: "></template>
  </template>
  <!-- ...layout and sections... -->
</template>

Usage

Place one <Numbering> at the top of the document. On its own it numbers headings h1 through h6. A NumberingRule or CounterDef that numbers a heading replaces that default scheme, so keep your own h1 through h6 rules if you take it over. Adding only a non-heading counter, like a figure rule, leaves the default headings in place. The Numbering guide walks through the full picture.

Was this page helpful?