Skip to content
Aurghyadip edited this page Aug 3, 2026 · 2 revisions

Welcome to the Typst Mail Merge Wiki πŸ“‘

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.


πŸ“š Wiki Navigation

  • πŸš€ 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 Overview

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.

πŸ”— Related Links

Clone this wiki locally