-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Aurghyadip edited this page Aug 3, 2026
·
2 revisions
Welcome to the official wiki for typst-mailmerge, a production-ready Mail Merge package for Typst. This package allows you to generate personalized letters, certificates, invoices, address labels, conference badges, envelopes, and multi-page reports directly from CSV files or inline data structures.
- π Getting Started β Installation, data importing, and your first mail merge letter.
- π Document Mail Merge β Detailed guide on generating single & multi-page recipient documents with page counter resets.
- π·οΈ Label & Badge Sheets β Multi-column grid engine, cut lines, cell fills, and Avery label presets catalog.
- π§ Fields & Formatters β Smart key normalization, field formatters (
upper,currency), address line joining, and conditional rendering. - π Filtering, Sorting & Pagination β Filtering records with functions or dicts, custom sorting, reversing, and batch pagination.
- π API Reference β Exhaustive parameter & return value specifications for all public functions.
- π‘ Examples & Templates β Ready-to-use Typst code templates for letters, certificates, stickers, badges, and envelopes.
| Feature | Description |
|---|---|
| Document Merge |
#mail-merge(...) generates one document per record with optional pagebreak and page counter reset. |
| Grid Label Engine |
#mail-merge-labels(...) layouts labels, badges, or sticker sheets in configurable grid rows & columns. |
| Avery & Standard Presets | Built-in presets for Avery 5160, 5161, 5162, 5163, 5164, L7160, L7163, A4 grids, and badges. |
| Smart Normalization |
#field(record, "First Name") matches "First Name", "first_name", "First-Name", or fallback candidate arrays. |
| Address Cleaner |
#join-fields(...) joins non-empty address lines while automatically skipping missing optional fields. |
| Field Formatters | Format fields instantly with "upper", "lower", "title", "currency", or custom closures. |
| Dataset Stats & Preview | Inspect CSV structure with mail-merge-stats and preview drafts with mail-merge-preview. |