Create project in app
Briefs is a simple Typst template for letters (German: Briefe). It is inspired by DIN 5008 and targets A4 paper. The address box fits the window of a DIN lang envelope.
Example
#import "@preview/briefs:0.1.0": letter
#set text(lang: "de", font: "TeX Gyre Heros")
#show: letter.with(
sender: (
[Hilfsorganisation e.V.],
[Spendengasse 12],
[12345 Helfershausen]
),
recipient: [
Frau\
Erika Mustermann\
Rathausplatz 37\
67890 Waldhausen
],
location: "Helfershausen",
subject: [*Vielen Dank für Ihre Spende*]
)
Sehr geehrte Frau Mustermann,
wir bedanken uns herzlich für Ihre großzügige Spende an unseren Verein.
Durch Ihre Unterstützung können wir weiterhin wichtige soziale Projekte
durchführen und Menschen in Not helfen.
Vielen Dank für Ihr Vertrauen und Ihre Mithilfe!
#v(0.5cm)
Mit freundlichen Grüßen
Hilfsorganisation e.V.

For more examples check out the folder
tests.
Reference
Document Structure
The image below shows the basic document structure. The address box contains
sender and recipient.
The information box contains additional information – the default is sender,
location and date.

API
letter(
sender: (),
sender-font-size: 8pt,
sender-separator: ", ",
recipient: [],
information: auto,
information-box: (125mm, 25mm, 75mm, 65mm),
date: auto,
date-format: auto,
location: none,
location-date-separator: ", ",
subject: none,
folding-marks: true,
hole-punch-mark: true,
background: [],
show-boxes: false,
..page-args,
body
)
Arguments
senderarray of contentDefault:()
Sender’s name and address. This address is shown in the address box with font sizesender-font-sizeand concatenated with separatorsender-separator. Ifinformationisauto, this address is also shown at the top of the information box.sender-font-sizelengthDefault:8pt
Font size of the sender’s name and address in the address box.sender-separatorcontentDefault:", "
Separator between sender’s address parts in address box.recipientcontentDefault:[]
The recipient’s name and address. Add line breaks manually.informationauto|contentDefault:auto
Content of the information box. If this isauto, the sender, location, and date are shown as a default.information-boxarray of lengthDefault:(125mm, 25mm, 75mm, 65mm)
Absolute position and size of the information box: (x, y, width, height).dateauto|datetime|contentDefault:auto
The date (only used, ifinformationisauto). If this isauto, the current date is shown. Ifautoor a value of typedatetimeis provided, the date will be formatted withdate-format.date-formatauto|strDefault:auto
The date format which is applied ifdateisautoor of typedatetime. Ifdate-formatis a string, it is directly passed to Typst’sdatetime.display()function. Ifdate-formatisautoandtext.langis"de", the format[day].[month].[year]is used. If a different language is set,autois passed todatetime.display().locationnone|contentDefault:none
The location (only used, ifinformationisauto).location-date-separatorcontentDefault:", "
The separator between location and datesubjectnone|contentDefault:none
The subjectfolding-marksboolDefault:true
Whether folding marks are shownhole-punch-markboolDefault:true
Whether a hole punch mark is shownbackgroundcontentDefault:[]
Content for the page background. The folding marks and the hole punch mark are placed on the page’s background. If you want to add additional content to the background, provide it here.show-boxesboolDefault:false
Whether address box and information box are framed. This is mainly for debugging.page-argsany(variadic)
Additional arguments for Typst’spage()function.
Default arguments are:
margin: (left: 25mm, rest: 20mm)
number-align: bottom + right
numbering: (i, t) => text(10pt, context (localized().page-number)(i, t))
However, those values can be overwritten.bodycontent
The letter content