Skip to main content

Reference

Every option the invoice format accepts.

The complete invoice configuration: sender and recipient, the invoice block and its line items, bank details, currency handling, and validation.

Using the format

format: invoice-typst
quarto render invoice.qmd --to invoice-typst

The document

Options outside the three blocks.
Option Description
title Set above the totals table, as a heading.
description Set under the title, in italics. Read only when title is set.
logo A path to an image, set beside the invoice details. Falls back to brand.logo.
papersize The paper. a4 unless set.
margin A mapping of Typst page margins, x and y by default.
lang, region Passed to Typst. lang also chooses the number separators and the language of the labels.
mainfont, fontsize Fall back to brand.typography.base.family and .size. Without either, the font is New Computer Modern, which Typst includes, at 12pt.

Sender and recipient

Both are required, and rendering fails without them.

The two parties.
Option Description
sender.name Required.
sender.email Set as a mailto: link.
sender.registration Company registration number.
sender.vat VAT number.
sender.exempted The wording of a VAT exemption notice, set in grey under the totals.
sender.address street, zip, city, state, country.
recipient.name Required.
recipient.address The same address fields.

The invoice block

Required, along with invoice.number, invoice.issued, and invoice.due.

The invoice block.
Option Default Description
invoice.number The invoice number.
invoice.issued Issue date, as YYYY-MM-DD.
invoice.due Due date, as YYYY-MM-DD.
invoice.reference A payment reference for the transfer. Set in the bank block, so it appears only when bank is given.
invoice.currency EUR An ISO 4217 code, GBP for example.
invoice.fee 2.28 A late payment fee, as a percentage.
invoice.penalty €40 Recovery costs, set as written.
invoice.items The line items. See below.
Warning

invoice.penalty reaches Typst as a string whatever it is written as, so a number is set as a bare figure rather than in the invoice currency: penalty: 40 on a GBP invoice reads 40, not £40. Write the amount with its symbol, as penalty: "£40". The default when it is left out is the literal €40, in every currency.

Line items

invoice:
  items:
    - description: Strategy workshop
      details: Two-day on-site facilitation.
      quantity: 2
      unit-price: 1500
      vat: 20
The fields of a line item.
Field Default Description
description A short description. Required.
details A longer one, set below the item.
quantity 1
unit-price 0 Excluding VAT.
vat 0 The rate, as a percentage.

The subtotal excluding VAT, the VAT, and the grand total are computed from these. A quantity that is a whole number is set without a decimal part, and the VAT rate is set as a whole percentage.

Note

Leave invoice.items out and the body of the document is rendered in its place instead, which is how a hand-written Typst table is kept working.

Bank details

bank.bic and bank.iban, set under a payment heading at the foot of the page along with invoice.reference.

Important

Both keys have to be present. An invoice with no bank block fails to compile, so give the block even when the payment details are not yet known.

Currency

Amounts are formatted with the decimal and thousand separators of the document’s lang, so the same figures read correctly in English and in French.

Twenty-six ISO 4217 codes carry a symbol, EUR, USD, GBP, JPY, and CHF among them. A code with no symbol is set as the code followed by a space.

SEK, NOK, DKK, PLN, CZK, and CHF put the symbol after the amount; every other currency puts it before.

Language

The format sets each label and sentence from a Quarto language key. English is the default. The format also includes French translations, which it uses when lang: fr is set. Any other lang value gives the English text.

To change one string, set its key under your language code:

lang: fr
sender:
  registration: "12245/FR12334"
language:
  fr:
    invoice-registration: "SIREN/SIRET"

The invoice then shows SIREN/SIRET: 12245/FR12334. The other French strings do not change.

Important

Put each key under the language code that matches lang, for example fr: or en:. A key at the top level of language applies only to a language that the format does not translate. With lang: fr, the French value of the format replaces it (quarto-dev/quarto-cli#15349).

You can also keep your strings in a translation file. Give the path of the file as the value of language, and put the keys under the language code in the file:

lang: fr
language: my-labels.yml
my-labels.yml
fr:
  invoice-registration: "SIREN/SIRET"
en:
  invoice-registration: "Company number"

The values in the file replace the values of the format for the same keys. Quarto also reads one file for each language next to the main file, for example my-labels-fr.yml with the keys at the top level.

The language keys.
Key English default
invoice-title Invoice
invoice-registration Registration number
invoice-vat-number VAT number
invoice-number Invoice number
invoice-issued Issued on
invoice-due Payment due date
invoice-payment-title Payment information
invoice-reference Reference
invoice-reference-note To be used as label on your bank transfer to identify the transaction.
invoice-item-details Details
invoice-item-quantity Qty
invoice-item-unit-price Unit price
invoice-item-vat VAT %
invoice-item-total Total excl. VAT
invoice-total-excl Total excl. VAT
invoice-total-vat VAT
invoice-total-incl Total
invoice-terms The payment terms at the foot of the page.
invoice-months January, February, ..., December
invoice-date the {day}{ordinal} of {month}, {year}
invoice-ordinals st, nd, rd, th, ...

invoice-title is the first word of the PDF title, before the invoice number. The English values are in _language.yml, and the French values are in _language-fr.yml. To translate the invoice into another language, for example German:

  1. Create my-labels.yml next to your document, with a de: line.
  2. Copy the content of _language.yml under that line, indented by two spaces, and translate the values. _language-fr.yml shows a finished translation.
  3. Set lang: de and language: my-labels.yml in your document.

invoice-terms uses these placeholders: {sender}, {date}, {days}, {fee}, and {penalty}. The format replaces each placeholder with its value. You can change the order of the placeholders to suit the grammar of your language.

The date of issue in invoice-terms comes from three keys:

  • invoice-months gives the twelve month names, separated by commas.
  • invoice-ordinals gives the suffix for each day of the month, separated by commas. When the list has fewer than 31 items, the last item applies to the remaining days.
  • invoice-date puts the parts together with the placeholders {day}, {ordinal}, {month}, and {year}.

The French values give 1er janvier 2026.

An empty value leaves the text empty, except for invoice-months, which must always list twelve names. For example, invoice-ordinals: "" removes the suffix after the day.

Warning

Do not use a backtick (`) in a value. This character stops the Typst compilation. All other characters, quotation marks and backslashes included, appear as you write them.

Validation

Important

invoice.issued and invoice.due must both be YYYY-MM-DD, and invoice.due must fall on or after invoice.issued. Either mistake raises an error while rendering rather than producing a document nobody would notice was wrong.

Branding

The format reads _brand.yml for the logo, the base font and size, and the heading family, weight, style, colour, and line height:

brand:
  typography:
    fonts:
      - family: Alegreya Sans
        source: google
    base:
      family: "Alegreya Sans"
      size: 12pt
    headings:
      family: "Alegreya Sans"
      color: dodgerblue

A self-contained example lives under examples/ in the repository.

Limitations

  • PDF through Typst only.
  • The totals table is generated from invoice.items; mixing it with a hand-written table means choosing one or the other.
  • The format includes English and French text only. For another language, set each key under the code of that language.
  • The format makes a PDF only. It does not make a structured electronic invoice, such as Factur-X, UBL, or CII.
WarningElectronic invoicing in France

From 1 September 2027, all businesses in France must issue electronic invoices for sales to other businesses subject to VAT in France. These invoices go through an approved platform (plateforme agréée) in a structured format. For these sales, a PDF from this format is not a valid invoice.

Sales to private customers and to customers outside France are not in the scope of electronic invoicing. For these sales, the PDF stays valid, and you send the sale data to the tax administration through e-reporting.

Large and mid-sized businesses have had these obligations since 1 September 2026. Support for Factur-X is tracked in #47.

Back to top