Skip to main content
Text elements are the primary content building blocks. They include headings (h1h6), paragraphs (text), and secondary text (text2).

Headings (h1–h6)

Six heading levels for document structure. Headings are used for table of contents generation, heading numbering, and internal references.
{ "type": "h1", "text": "Chapter 1: Introduction" }
{ "type": "h2", "text": "1.1 Background", "color": "#333333" }
{ "type": "h3", "text": "1.1.1 History", "fontWeight": "normal" }

Paragraphs (text, text2)

Normal paragraphs use type: "text". Secondary/smaller text uses type: "text2" — useful for footnotes, captions, or fine print.
{ "type": "text", "text": "This is a normal paragraph with body text." }
{ "type": "text2", "text": "This is secondary text, typically rendered smaller." }

Properties

All text element types (h1h6, text, text2) share the same properties:
PropertyTypeRequiredDefaultDescription
typestringYesElement type: "h1", "h2", "h3", "h4", "h5", "h6", "text", or "text2"
idstringNoautoUnique identifier. Auto-generated if not provided. Max: 100 chars.
textstringYesText content. Supports inline formatting (see below). 1–5000 chars.
fontFamilystringNo"Arial"Font family override. Max: 100 chars.
fontSizenumberNo11Font size in pt (6–72).
fontWeightstringNo"normal""normal" or "bold"
alignstringNo"left"Alignment: "left", "center", "right", "justify"
colorstringNo"#000000"Text color in hex (#RGB or #RRGGBB).
anchorstringNoAnchor ID for internal references (headings only, ignored on text/text2). Pattern: ^[a-zA-Z][a-zA-Z0-9_-]*$. Max: 100 chars.
spacingobjectNoSpacing override with before and after in pt (0–100).
The defaults shown above ("Arial", 11, "left", etc.) are the built-in fallbacks. In practice, values are resolved with a three-level cascade: element property → element style (from defaults.styles.h1, defaults.styles.text, etc.) → global defaults (defaults.fontFamily, defaults.fontSize, defaults.color) → built-in fallback.

Inline formatting

The text property supports inline formatting using an extended Markdown-like syntax. This is not standard Markdown — some syntax elements are Autype-specific.

Text formatting

SyntaxResultExample
**text**Bold"This is **important**."
*text* or _text_Italic"This is *emphasized*."
++text++Underline"This is ++underlined++."
~~text~~Strikethrough"This is ~~deleted~~."
==text==Highlight"This is ==highlighted==."
==text=={#FF0}Colored highlight"This is ==important=={#FFCC00}."
`code`Inline code"Use the `render()` function."
Inline code (`...`) preserves its content as-is — no further formatting is parsed inside backticks.
SyntaxDescriptionExample
[text](url)External hyperlink"Visit [Autype](https://autype.com)."
[text](url "title")Hyperlink with title"See [docs](https://docs.autype.com \"API docs\")."
[text](#anchor)Internal reference (custom text)"See [Chapter 1](#intro)."
[](#anchor)Internal reference (auto)"See [](#fig-arch) for details."
[Text {num}](#anchor)Internal reference (template)"Refer to [Figure {num}](#fig-arch)."

Abbreviations, citations, and variables

SyntaxDescriptionExample
~ABK~Abbreviation reference"The ~API~ uses ~REST~."
@[citeKey]Citation"As shown by @[smith2023]."
@[citeKey, p. 42]Citation with page"See @[smith2023, p. 42]."
@[citeKey, pp. 10-15]Citation with page range"Discussed in @[smith2023, pp. 10-15]."
@[-citeKey]Citation (suppress author)"As shown @[-smith2023]."(2023)
@[citeKey!]Citation (author only)"@[smith2023!] argues that..."Smith
{{varName}}Variable substitution"Hello {{companyName}}!"
Citations support the following locator options after the cite key, separated by commas:
LocatorSyntaxExample
Pagep. 42 or page 42@[smith2023, p. 42]
Pagespp. 42-45 or pages 42-45@[smith2023, pp. 42-45]
Chapterch. 3 or chapter 3@[smith2023, ch. 3]
Sectionsec. 2.1 or section 2.1@[smith2023, sec. 2.1]
Volumevol. 2 or volume 2@[smith2023, vol. 2]
Notenote="emphasis added"@[smith2023, p. 42, note="emphasis added"]
Prefix - suppresses the author name, suffix ! shows only the author name (narrative citation).

Combining formatting

Formatting marks can be nested. Abbreviations and citations work inside formatted text:
{
  "type": "text",
  "text": "This is **bold with ~API~ reference** and *italic with @[smith2023] citation*."
}
{
  "type": "text",
  "text": "Use ==highlighted text=={#FFCC00} and `` `inline code` `` together with ++underlined++ content."
}

Anchors and internal references

Headings can define an anchor ID that other elements can reference. Images, charts, and tables can also define anchors (see their respective pages).
{
  "sections": [{
    "type": "flow",
    "content": [
      { "type": "h1", "text": "Introduction", "anchor": "intro" },
      { "type": "text", "text": "Some introductory text." },
      { "type": "image", "src": "https://example.com/arch.png", "caption": "Architecture", "anchor": "fig-arch" },
      { "type": "text", "text": "For background, see [Introduction](#intro)." }
    ]
  }]
}

Internal reference display modes

There are three ways to reference an anchor:
SyntaxModeRendered as
[](#fig-arch)AutoAutomatically shows the target’s caption with numbering (e.g., “Figure 1: Architecture”)
[Figure {num}](#fig-arch)TemplateReplaces {num} with the target’s number (e.g., “Figure 1”)
[see here](#fig-arch)CustomShows the provided text as a clickable link (“see here”)
Anchor IDs must be unique across the entire document. Duplicate anchors always cause a validation error. Broken references (pointing to non-existent anchors) cause errors only in strict mode (?strict=true).

Defaults

Configure default styles for text elements via defaults.styles:
{
  "defaults": {
    "fontFamily": "Noto Sans",
    "fontSize": 11,
    "color": "#333333",
    "styles": {
      "h1": { "fontSize": 24, "fontWeight": "bold", "color": "#111111", "pageBreakBefore": true },
      "h2": { "fontSize": 18, "fontWeight": "bold" },
      "h3": { "fontSize": 14, "fontWeight": "bold" },
      "h4": { "fontSize": 12, "fontWeight": "bold" },
      "text": { "fontSize": 11, "align": "justify" },
      "text2": { "fontSize": 9, "color": "#666666" }
    }
  }
}
The pageBreakBefore property in a heading style forces a page break before every instance of that heading level — useful for starting each chapter on a new page.

Supported fonts

The following fonts are guaranteed to be available in the rendering engine. Use these font family names in fontFamily properties.
Using a font that is not installed in the render container will cause a silent fallback to the default font (Arial). Always use one of the listed fonts to ensure consistent output.

Sans-serif

FontNotes
ArialClassic Microsoft sans-serif, widely used
Arial BlackHeavy weight display font
VerdanaHighly readable, designed for screens
Trebuchet MSHumanist sans-serif
CarlitoMetrically compatible with Calibri
RobotoGoogle’s modern sans-serif
Open SansHumanist sans-serif, great for body text
LatoWarm, friendly sans-serif
Noto SansExtensive language support (CJK, Arabic, Hebrew, etc.)
DejaVu SansExtended Unicode coverage

Serif

FontNotes
Times New RomanStandard for academic documents
GeorgiaElegant serif for screen readability
CaladeaMetrically compatible with Cambria
Roboto SlabSlab serif companion to Roboto
Noto SerifExtensive language support
DejaVu SerifExtended Unicode coverage

Monospace

FontNotes
Courier NewClassic monospace
Andale MonoClean monospace
Noto Sans MonoMonospace with language support
DejaVu Sans MonoExtended Unicode monospace

Display

FontNotes
Comic Sans MSCasual, comic-style
ImpactBold condensed for headlines
MS Office compatibility: Calibri documents render correctly using Carlito (metrically identical). Cambria documents render correctly using Caladea (metrically identical). The render engine also has hundreds of Noto language-specific variants (e.g., Noto Sans CJK JP, Noto Sans Arabic, Noto Serif Bengali) installed for international document support.

Complete example

{
  "document": { "type": "pdf", "size": "A4" },
  "abbreviations": { "API": "Application Programming Interface" },
  "citations": [
    { "id": "smith2023", "type": "book", "title": "Document Automation", "author": [{ "family": "Smith", "given": "John" }], "issued": { "date-parts": [[2023]] } }
  ],
  "variables": { "companyName": "Acme Inc" },
  "defaults": {
    "fontFamily": "Noto Sans",
    "fontSize": 11,
    "styles": {
      "h1": { "fontSize": 22, "fontWeight": "bold" },
      "h2": { "fontSize": 16, "fontWeight": "bold" }
    }
  },
  "sections": [
    {
      "type": "flow",
      "content": [
        { "type": "h1", "text": "Welcome to {{companyName}}", "anchor": "welcome" },
        { "type": "text", "text": "This document was created by **{{companyName}}** using the ~API~." },
        { "type": "h2", "text": "Background", "anchor": "background" },
        { "type": "text", "text": "As described by @[smith2023, pp. 10-15], automation is key. See [Welcome](#welcome) for an overview." },
        { "type": "text", "text": "The ==key insight== is that the `render()` function processes documents efficiently." },
        { "type": "text", "text": "@[smith2023!] also argues that ++underlined++ and ~~deprecated~~ syntax should be supported." },
        { "type": "text2", "text": "Note: This is secondary text with smaller font size." },
        { "type": "h3", "text": "Sub-section" },
        { "type": "text", "text": "Content with *italic*, **bold with ~API~ inside**, and ++underlined++ formatting." }
      ]
    }
  ]
}