typstgenv0.6.2

Changelog

Generated from CHANGELOG.md in the project repository. Never maintained twice.

Unreleased

  • changedPages: the project site uses the current shared theme (0.12.12).

0.6.2

31 October 2026

  • addedE-invoices: VAT codes IntraCommunity (category K, exemption code VATEX-EU-IC) and Export (category G, VATEX-EU-G) for CII and UBL. An intra-Community supply needs the buyer's VAT ID, a delivery date or period and the new metadata.delivery_country_code (BT-80, written to both formats, with optional delivery_city and delivery_postal_code, which XRechnung requires once a country is given); an export needs none of these. Defaults can be overridden with vat_rate.exemption_reason_code.

0.6.1

31 October 2026

  • addedProfiles: A document profile can offer xrechnung-3.0 or peppol-bis-3.0 as its output_profile. validate-document then reports the fields typstgen e-invoice requires, with their JSON paths (OUTPUT-REQUIRED), from the same check; the XML itself is still written by e-invoice.
  • changedWebsite: the start page has a section on invoices with a real typstgen e-invoice run, and counts all nine MCP tools.
  • changedWebsite: on phones the header shows every link without sideways scrolling, and links in the invoice section are underlined.
  • changedDocs: the CLI reference covers prepare-invoice, e-invoice and the document-profile commands, the AI agents guide lists every MCP tool, and the README starts with what typstgen does and how it works.

0.6.0

30 October 2026

  • addedE-invoices: typstgen e-invoice, zugferd::ubl_xml_from_docgen and the MCP tool e_invoice write XRechnung 3.0 and Peppol BIS Billing 3.0 as UBL 2.1 from the same invoice model as the CII XML. Electronic addresses, buyer and order references, seller telephone and payment means codes are read from the invoice JSON; schema and Schematron validation are reported as not_run.
  • addedInvoices: Configurations support US presentation choices and additive sales-tax components, with separate taxable bases and rounded amounts. Sales-tax invoices are excluded from CII export.
  • addedInvoices: prepare-invoice and the matching Rust/MCP API build canonical invoice values from user-owned tax and presentation configuration without requiring a national catalog.
  • addedProfiles: Data-driven document profile listing, selection and invoice validation are shared by the Rust library, CLI and MCP, with field diagnostics and separate external-validation states.
  • addedZUGFeRD: VAT code Kleinunternehmer is accepted as an alias for Exempt (category E), as used by older invoice JSON files. It still needs exemption_reason or exemption_reason_code.
  • changedZUGFeRD: company.contact.name is written as the seller contact (BT-41) in the CII XML.
  • changedDocs: docgen is discontinued. Its templates live on as the Typst package business-templates in typst-business-templates, and help texts call the invoice data "business-templates invoice JSON".
  • changedWebsite: the start page shows a real compile run (a letter that compiles, a missing import that fails with exit code 1) next to the PDF it wrote, and how typstgen works as a diagram.
  • changedWebsite: on the start page the introduction follows the title directly, beside the install tabs; the badges moved below the compile run.
  • changedDocs: the installation guide covers the MCP setup and lists every Cargo feature, and the templates guide shows the import lookup order as a diagram.
  • fixedProfiles: Explicit invoice payment-account details also supply the PDF footer's bank name, instead of retaining the company default bank name when an account is overridden.
  • fixedZUGFeRD: Line amounts and tax amounts round directly to cents without a second rounding through four fractional digits, preserving correct results at sub-cent boundaries.
  • fixedZUGFeRD: Invalid calendar dates, conflicting currencies and stated tax-group values that disagree with the normalized invoice are rejected before CII generation.
  • fixedProfiles: Malformed/conflicting optional dates and unsupported invoice discounts block the rendering view; seller diagnostics point to the company input fields.
  • securityDependencies: Updated rustls, rustls-webpki and webpki-roots to patched versions, Tokio to 1.53.3 and the withdrawn yoke-derive version to 0.8.4; no RustSec vulnerabilities remain in the lockfile.

0.5.0

13 October 2026

  • breakingarchive::Report has a new public field notes; struct literals need it.
  • addedverify accepts a PDF signed after recording: when the stored PDF starts with the recorded bytes and the appended incremental updates carry a signature, the document passes with a note. Revisions appended without a signature fail. archive::Report has a new public field notes.
  • addedGuide Signing: sign with pyHanko (PAdES, RFC 3161 timestamp), keep PDF/A and ZUGFeRD valid, and when a signature matters in Germany. The archiving guide shows how to timestamp archive.json with openssl ts.

0.4.1

12 October 2026

  • changedThe Typst world (fonts, template roots, packages, datetime.today()) now comes from the new [embedded-typst](https://crates.io/crates/embedded-typst) crate, shared with renderreport. No change in behaviour.

0.4.0

11 October 2026

  • breakingConfig has three new public fields; struct literals need ..Config::default().
  • breakingOutput has a new public field pages; CompileOptions has zugferd_xml (with the zugferd feature), so struct literals need ..CompileOptions::default().
  • addedtypstgen mcp: a Model Context Protocol server over stdio with the tools check, preview, compile and list_templates, restricted to a workspace directory (--root). Errors are returned to the agent as path:line:column lines so it can fix them itself. mcp feature, on by default.
  • addedrender_png renders one page as PNG (png feature) and Error::PageOutOfRange.
  • addedOutput::pages: the number of pages of the compiled document.
  • addedZUGFeRD / Factur-X e-invoices (EN 16931, zugferd feature, on by default): --zugferd invoice.json --company company.json builds the CII XML from docgen invoice data, checks it, embeds it as factur-x.xml in a PDF/A-3 and adds the Factur-X XMP schema. Library: zugferd::xml_from_docgen, CompileOptions::zugferd_xml, Error::Zugferd. MCP: zugferd parameter of compile.
  • addedArchive manifests (archive feature, on by default): compile --manifest archive.json records the options and the SHA-256 of the PDF, of every file Typst read and of every font file loaded; typstgen verify checks that the PDFs are unchanged and rebuild byte for byte. Library: archive::{compile_and_record, verify, Job, Report}, Error::Archive. verify --rebuild-only skips the stored PDFs for CI checkouts.
  • addedGuide "Checks and CI": pinned fonts and packages, a local verify script and a tag-triggered GitHub Actions workflow.
  • addedExample examples/thesis.typ: a seminar paper built on a local package (examples/packages/local/thesis/0.1.0) with BibTeX citations, compiled as PDF/A-2b.
  • addedTypst packages: #import "@preview/…" and @local/… resolve from the same package data and cache directories as the typst CLI. Missing @preview packages are downloaded from Typst Universe (download feature, on by default, pure-Rust TLS). New typstgen.toml keys package_path, package_cache_path and download_packages. Native builds only.
  • addedTests for citations and #bibliography (BibTeX) under PDF/A-2b.

0.3.0

24 September 2026

  • addedcompile_with_options and CompileOptions: values for sys.inputs, PDF standards (PDF version, PDF/A, PDF/UA-1), a fixed creation timestamp (also used by datetime.today()), page ranges and untagged output. PdfStandard and PageRange parse the names the typst CLI uses.
  • addedCLI flags --input KEY=VALUE, --pdf-standard, --creation-timestamp (falls back to SOURCE_DATE_EPOCH), --pages and --no-pdf-tags.
  • addedThe Wasm request accepts inputs, pdf_standards, creation_timestamp, pages and pdf_tags.

0.2.0

24 September 2026

  • breakingConfig::resolve_template_path and Error::TemplatePathNotFound are removed; use Config::template_roots, which returns every existing template directory.
  • breakingMinimum supported Rust version is now 1.92 (required by Typst 0.15).
  • addedcompile_with_warnings returns the PDF together with Typst's warnings; the CLI prints them to stderr.
  • addedErrors and warnings name the file, line and column.
  • changedTypst 0.15 (was 0.13).
  • changedTemplate directories are optional: documents without imports compile without any.
  • changedEvery existing entry of template_paths is searched per import, in order, instead of only the first existing one. Entries that are not directories are skipped.
  • changedFonts found on disk are loaded only when a document uses them, and each face of a font collection is registered once.
  • fixeddatetime.today() returns a date instead of a date and time, and honours offset.
  • securityquick-xml 0.38 (RUSTSEC-2026-0194, RUSTSEC-2026-0195) is still pulled in through Typst's bibliography support; no fixed version is available yet. Do not compile untrusted documents.

0.1.0

1 August 2026

  • addedtypstgen compile, the Rust library and the Wasm export, with template paths from typstgen.toml and Typst's bundled fonts.