How-tos
Recipes for complete, real-world documents. Each one walks through a runnable example from the examples repository, so you can clone it and follow along: every file shown here is checked in there, together with a reference result.pdf.
Write a DIN 5008 letter
Address window, fold marks and date placed with CSS, the body in plain Markdown
Create a ZUGFeRD e-invoice
PDF/A-3b with embedded Factur-X XML, driven by a companion Lua script
Generate a table of contents
Dot leaders and automatic page numbers with target-counter() and leader()
Put a letterhead behind every page
Page backgrounds from a stationery PDF, with page 1 different from the rest
Add page headers and footers
Page numbers via margin boxes, rich footers via CSS running elements
Render a chart from data
A Lua block turns a data table into an SVG bar chart, no browser involved
Generate barcodes
EAN-13, Code 128, and QR codes as vector graphics via the barcode element
Typeset TeX math
Dollar-syntax formulas set by the OpenType-MATH engine, no Pandoc needed
Produce an accessible report
One frontmatter line turns Markdown into a tagged PDF/UA document
Looking for more? The example collection covers many other topics: presentation slides, color emoji, font fallback, mixed left-to-right and right-to-left scripts, floats, and more.