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
TheheadingNumbering format string defines automatic numbering for headings. Each character represents the numbering style for one heading level, separated by dots.
1 → 1.1 → 1.1.a for h1 → h2 → h3.
Set to an empty string or omit to disable heading numbering.
Spacing
Thespacing 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
Bothbefore and after accept the same set of keys:
All values are in pt, range 0–100.
Per-element spacing override
Any element with aspacing property can override the global defaults:
Element styles
Thestyles 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 forstyles.h1 through styles.h6, styles.text, and styles.text2.
Math style
Used forstyles.math.
Code style
Used forstyles.code.
Table style
Used forstyles.table. Controls borders, header row, data rows, and cell padding.
Table style properties
Table style properties
borders.outer / borders.inner
header
rows
cellPadding
Figure caption style
Used forstyles.figureCaption. Controls captions on images and charts.
Table caption style
Used forstyles.tableCaption. Controls captions on tables.
Reference link style
Used forstyles.refLink. Controls the appearance of internal reference links (cross-references to headings, figures, tables).
List of Abbreviations style
Used forstyles.listOfAbbreviations. See Abbreviations — Defaults.
Bibliography style
Used forstyles.bibliography. See Citations — Defaults.
Chart defaults
Default color palette for chart datasets.Header & Footer
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:
Image object:
Variable substitution (
{{varName}}) works in header/footer text content — both simple strings and rich text content arrays.