Skip to main content
Citations allow you to reference sources in your document and automatically generate a formatted bibliography. Autype uses the CSL-JSON standard for citation data.

Defining citations

The top-level citations array contains citation entries in CSL-JSON format. Each entry represents a single source (book, article, webpage, etc.).
{
  "citations": [
    {
      "id": "smith2023",
      "type": "book",
      "title": "Modern Document Automation",
      "author": [
        { "family": "Smith", "given": "John" }
      ],
      "issued": { "date-parts": [[2023]] },
      "publisher": "Tech Press",
      "publisher-place": "New York"
    },
    {
      "id": "doe2024",
      "type": "article-journal",
      "title": "Advances in PDF Generation",
      "author": [
        { "family": "Doe", "given": "Jane" },
        { "family": "Miller", "given": "Bob" }
      ],
      "issued": { "date-parts": [[2024, 3]] },
      "container-title": "Journal of Document Engineering",
      "volume": "12",
      "issue": "3",
      "page": "45-67",
      "DOI": "10.1234/jde.2024.001"
    }
  ]
}
The citations array supports up to 1000 entries.

CSL-JSON item properties

Every citation entry requires id and type. All other fields are optional.

Required fields

PropertyTypeDescription
idstringUnique identifier for the citation (e.g., "smith2023"). Used to reference the citation in text. Max: 100 chars.
typestringItem type. See supported types below.

Names (authors, editors, etc.)

Name fields accept an array of name objects:
{
  "author": [
    { "family": "Smith", "given": "John" },
    { "family": "van Beethoven", "given": "Ludwig", "non-dropping-particle": "van" },
    { "literal": "World Health Organization" }
  ]
}
PropertyTypeDescription
familystringFamily name / surname. Max: 200 chars.
givenstringGiven name / first name. Max: 200 chars.
dropping-particlestringParticle dropped when sorting (e.g., “de” in some styles). Max: 50 chars.
non-dropping-particlestringParticle kept when sorting (e.g., “van”). Max: 50 chars.
suffixstringName suffix (e.g., “Jr.”, “III”). Max: 50 chars.
literalstringLiteral name string for institutional authors. Max: 500 chars.
Available name fields: author, editor, translator, collection-editor, composer, container-author, director, editorial-director, illustrator, interviewer, original-author, recipient, reviewed-author

Dates

Date fields use the CSL-JSON date format:
{
  "issued": { "date-parts": [[2024, 3, 15]] },
  "accessed": { "date-parts": [[2024, 6, 1]] }
}
PropertyTypeDescription
date-partsarrayArray of date arrays: [[year, month, day]]. Month and day are optional.
literalstringLiteral date string (e.g., "Spring 2024"). Max: 200 chars.
rawstringRaw date string for parsing. Max: 200 chars.
seasonstring | numberSeason identifier.
circaboolean | stringApproximate date flag.
Available date fields: issued, accessed, event-date, original-date, submitted

Titles

PropertyTypeDescription
titlestringTitle of the work. Max: 1000 chars.
title-shortstringShort title. Max: 500 chars.
container-titlestringTitle of the container (journal, book, etc.). Max: 500 chars.
container-title-shortstringShort container title. Max: 200 chars.
collection-titlestringTitle of the collection/series. Max: 500 chars.
original-titlestringOriginal title (for translations). Max: 500 chars.
reviewed-titlestringTitle of the reviewed work. Max: 500 chars.

Numbers

PropertyTypeDescription
volumestring | numberVolume number.
issuestring | numberIssue number.
pagestringPage range (e.g., "45-67"). Max: 100 chars.
page-firststring | numberFirst page.
number-of-pagesstring | numberTotal pages.
editionstring | numberEdition number.
versionstring | numberVersion number.
chapter-numberstring | numberChapter number.

Identifiers

PropertyTypeDescription
DOIstringDigital Object Identifier. Max: 200 chars.
ISBNstringInternational Standard Book Number. Max: 50 chars.
ISSNstringInternational Standard Serial Number. Max: 50 chars.
PMIDstringPubMed ID. Max: 50 chars.
PMCIDstringPubMed Central ID. Max: 50 chars.
URLstringWeb URL. Max: 2000 chars.

Publisher

PropertyTypeDescription
publisherstringPublisher name. Max: 500 chars.
publisher-placestringPlace of publication. Max: 200 chars.

Other fields

PropertyTypeDescription
abstractstringAbstract text. Max: 5000 chars.
languagestringLanguage of the work. Max: 50 chars.
genrestringGenre or type description. Max: 200 chars.
keywordstringKeywords. Max: 500 chars.
notestringAdditional notes. Max: 2000 chars.
eventstringEvent name (for conference papers). Max: 500 chars.
event-placestringEvent location. Max: 200 chars.

Supported item types

article, article-journal, article-magazine, article-newspaper, bill, book, broadcast, chapter, classic, collection, dataset, document, entry, entry-dictionary, entry-encyclopedia, event, figure, graphic, hearing, interview, legal_case, legislation, manuscript, map, motion_picture, musical_score, pamphlet, paper-conference, patent, performance, periodical, personal_communication, post, post-weblog, regulation, report, review, review-book, software, song, speech, standard, thesis, treaty, webpage

Using citations in sections

To cite a source in your text content, use the @[citeKey] syntax where citeKey matches the id of a citation entry.

Basic citation

{ "type": "text", "text": "Document automation is evolving rapidly @[smith2023]." }
The @[citeKey] reference is replaced with the formatted in-text citation according to the configured citationStyle (e.g., (Smith, 2023) for APA7, [1] for IEEE).

Citation with locators

Add a locator after the cite key, separated by a comma:
{ "type": "text", "text": "See @[smith2023, p. 42] for details." }
{ "type": "text", "text": "Discussed in @[doe2024, pp. 10-15]." }
{ "type": "text", "text": "See @[smith2023, ch. 3] and @[doe2024, sec. 2.1]." }
{ "type": "text", "text": "In @[smith2023, vol. 2, p. 42, note=\"emphasis added\"]." }
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="text"@[smith2023, note="emphasis added"]
Multiple locators can be combined: @[smith2023, vol. 2, p. 42]

Suppress author / author only

SyntaxDescriptionRendered (APA7)
@[smith2023]Normal citation(Smith, 2023)
@[-smith2023]Suppress author (prefix -)(2023)
@[smith2023!]Author only (suffix !)Smith
{ "type": "text", "text": "@[smith2023!] argues that automation is key @[-smith2023, p. 42]." }
This renders as: “Smith argues that automation is key (2023, p. 42).”

Multiple citations

Place multiple @[...] references next to each other:
{ "type": "text", "text": "Multiple sources support this claim @[smith2023] @[doe2024]." }
The @[citeKey] syntax works in all text content: headings, paragraphs (text, text2), list items, and table cells. It also works inside formatted text like **bold @[smith2023] text**.
When using ?strict=true on the render endpoint, any @[citeKey] reference to a citation that is not defined in the citations array will cause a validation error. Without strict mode, undefined citations produce warnings but do not block rendering.

Citation styles

The citation formatting style is configured via defaults.citationStyle:
{
  "defaults": {
    "citationStyle": "apa7"
  }
}
StyleIn-text formatDescription
apa7(Smith, 2023)APA 7th Edition
harvard(Smith 2023)Harvard style
ieee[1]IEEE numbered style
chicago(Smith 2023, 42)Chicago author-date
mla(Smith 42)MLA style
vancouver(1)Vancouver numbered style

Bibliography element

To render the formatted bibliography, add a bibliography element to a section:
{
  "type": "bibliography",
  "title": "References",
  "fontFamily": "Times New Roman",
  "fontSize": 18
}

Properties

PropertyTypeRequiredDefaultDescription
typestringYesMust be "bibliography"
idstringNoOptional unique identifier. Max: 100 chars.
titlestringNoTitle displayed above the bibliography (e.g., "References", "Bibliography"). Max: 200 chars.
fontFamilystringNoFont family for the title. Max: 100 chars.
fontSizenumberNoFont size for the title in pt (6–72).
spacingobjectNoSpacing override with before and after in pt (0–100).

Defaults for citations

Bibliography style

Customize the bibliography appearance via defaults.styles.bibliography:
{
  "defaults": {
    "citationStyle": "apa7",
    "styles": {
      "bibliography": {
        "fontFamily": "Times New Roman",
        "fontSize": 11,
        "fontWeight": "normal",
        "color": "#000000",
        "hangingIndent": 1.27,
        "lineSpacing": 1.5,
        "entrySpacing": 6
      }
    }
  }
}
PropertyTypeDefaultDescription
fontFamilystringFont family for bibliography entries. Max: 100 chars.
fontSizenumberFont size in pt (6–72).
fontWeightstringFont weight: "normal" or "bold"
colorstringText color in hex format (#RGB or #RRGGBB).
hangingIndentnumberHanging indent for entries in cm (0–5).
lineSpacingnumberLine spacing within entries (1–3).
entrySpacingnumberSpace between entries in pt (0–50).

Complete example

{
  "document": { "type": "pdf", "size": "A4" },
  "citations": [
    {
      "id": "smith2023",
      "type": "book",
      "title": "Modern Document Automation",
      "author": [{ "family": "Smith", "given": "John" }],
      "issued": { "date-parts": [[2023]] },
      "publisher": "Tech Press"
    },
    {
      "id": "doe2024",
      "type": "article-journal",
      "title": "Advances in PDF Generation",
      "author": [{ "family": "Doe", "given": "Jane" }],
      "issued": { "date-parts": [[2024, 3]] },
      "container-title": "Journal of Document Engineering",
      "volume": "12",
      "page": "45-67"
    }
  ],
  "defaults": {
    "citationStyle": "apa7",
    "styles": {
      "bibliography": {
        "fontSize": 10,
        "hangingIndent": 1.27
      }
    }
  },
  "sections": [
    {
      "type": "flow",
      "content": [
        { "type": "h1", "text": "Introduction" },
        { "type": "text", "text": "@[smith2023!] describes how document automation is evolving rapidly @[-smith2023]. Recent advances in PDF generation @[doe2024, pp. 50-67] have made it possible to produce high-quality documents at scale." },
        { "type": "text", "text": "Both approaches @[smith2023] @[doe2024] demonstrate significant improvements over traditional methods." },
        { "type": "pageBreak" },
        { "type": "bibliography", "title": "References" }
      ]
    }
  ]
}