Skip to main content
The defaults object controls the global styling and formatting of your document. All properties are optional — elements without explicit styling inherit from these defaults.

Top-level defaults

Heading numbering

The headingNumbering format string defines automatic numbering for headings. Each character represents the numbering style for one heading level, separated by dots.
This produces: 11.11.1.a for h1 → h2 → h3. Set to an empty string or omit to disable heading numbering.

Spacing

The spacing object defines default spacing (in pt) before and after each element type. Individual elements can override these via their own spacing property.

Supported element types for spacing

Both before and after accept the same set of keys: All values are in pt, range 0–100.

Per-element spacing override

Any element with a spacing property can override the global defaults:

Element styles

The styles object defines default styling for specific element types. These are applied when an element does not specify its own styling.

Text style (h1–h6, text, text2)

Used for styles.h1 through styles.h6, styles.text, and styles.text2.

Math style

Used for styles.math.

Code style

Used for styles.code.

Table style

Used for styles.table. Controls borders, header row, data rows, and cell padding.
borders.outer / borders.innerheaderrowscellPadding

Figure caption style

Used for styles.figureCaption. Controls captions on images and charts.

Table caption style

Used for styles.tableCaption. Controls captions on tables. Used for styles.refLink. Controls the appearance of internal reference links (cross-references to headings, figures, tables).

List of Abbreviations style

Used for styles.listOfAbbreviations. See Abbreviations — Defaults.

Bibliography style

Used for styles.bibliography. See Citations — Defaults.

Chart defaults

Default color palette for chart datasets.
Configure global page headers and footers. Each has three columns (left, center, right) that can contain text or images.

Header/Footer properties

The align option "distributed" aligns each column to its natural position: left column → left, center column → center, right column → right.

Content types

Each column (left, center, right) accepts one of three formats: Simple string:
Rich text object:
Rich text content items: Image object:
Variable substitution ({{varName}}) works in header/footer text content — both simple strings and rich text content arrays.

Complete example