Repository navigation
Releases
typstgen 0.6.2
typstgen 0.6.1
Document profiles can offer xrechnung-3.0 and peppol-bis-3.0 as outputs; validate-document reports the fields typstgen e-invoice requires, with JSON paths. See the changelog.
typstgen 0.6.0
Added
-
E-invoices:
typstgen e-invoice,zugferd::ubl_xml_from_docgenand the MCP toole_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 asnot_run. -
Invoices: 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. -
Invoices:
prepare-invoiceand the matching Rust/MCP API build canonical invoice values
from user-owned tax and presentation configuration without requiring a national catalog. -
Profiles: 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. -
ZUGFeRD: VAT code
Kleinunternehmeris accepted as an alias forExempt(category E), as used
by older invoice JSON files. It still needsexemption_reasonorexemption_reason_code.
Changed
- ZUGFeRD:
company.contact.nameis written as the seller contact (BT-41) in the CII XML. - Docs: 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". - Website: 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. - Website: on the start page the introduction follows the title directly, beside the install tabs;
the badges moved below the compile run. - Docs: the
installation guide covers
the MCP setup and lists every Cargo feature, and the
templates guide shows the import
lookup order as a diagram.
Fixed
-
Profiles: 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. -
ZUGFeRD: Line amounts and tax amounts round directly to cents without a second rounding
through four fractional digits, preserving correct results at sub-cent boundaries. -
ZUGFeRD: Invalid calendar dates, conflicting currencies and stated tax-group values that
disagree with the normalized invoice are rejected before CII generation. -
Profiles: Malformed/conflicting optional dates and unsupported invoice discounts block the
rendering view; seller diagnostics point to the company input fields.
Security
- Dependencies: 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.
typstgen 0.5.0
Breaking
archive::Reporthas a new public fieldnotes; struct literals need it.
Added
verifyaccepts 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::Reporthas a new public fieldnotes.- Guide 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 timestamparchive.jsonwithopenssl ts.
typstgen 0.4.1
Changed
- The Typst world (fonts, template roots, packages,
datetime.today()) now comes from the new
embedded-typstcrate, shared with renderreport. No
change in behaviour.
typstgen 0.4.0
Breaking
Confighas three new public fields; struct literals need..Config::default().Outputhas a new public fieldpages;CompileOptionshaszugferd_xml(with thezugferd
feature), so struct literals need..CompileOptions::default().
Added
typstgen mcp: a Model Context Protocol server over stdio with the toolscheck,preview,
compileandlist_templates, restricted to a workspace directory (--root). Errors are
returned to the agent aspath:line:columnlines so it can fix them itself.mcpfeature, on by
default.render_pngrenders one page as PNG (pngfeature) andError::PageOutOfRange.Output::pages: the number of pages of the compiled document.- ZUGFeRD / Factur-X e-invoices (EN 16931,
zugferdfeature, on by default):--zugferd invoice.json --company company.jsonbuilds the CII XML from docgen invoice data, checks it, embeds
it asfactur-x.xmlin a PDF/A-3 and adds the Factur-X XMP schema. Library:
zugferd::xml_from_docgen,CompileOptions::zugferd_xml,Error::Zugferd. MCP:zugferd
parameter ofcompile. - Archive manifests (
archivefeature, on by default):compile --manifest archive.jsonrecords
the options and the SHA-256 of the PDF, of every file Typst read and of every font file loaded;
typstgen verifychecks 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. - Guide "Checks and CI": pinned fonts and packages, a local verify script and a tag-triggered
GitHub Actions workflow. - Example
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. - Typst packages:
#import "@preview/…"and@local/…resolve from the same package data and
cache directories as the typst CLI. Missing@previewpackages are downloaded from Typst
Universe (downloadfeature, on by default, pure-Rust TLS). Newtypstgen.tomlkeys
package_path,package_cache_pathanddownload_packages. Native builds only. - Tests for citations and
#bibliography(BibTeX) under PDF/A-2b.
typstgen 0.3.0
Added
compile_with_optionsandCompileOptions: values forsys.inputs, PDF standards (PDF
version, PDF/A, PDF/UA-1), a fixed creation timestamp (also used bydatetime.today()), page
ranges and untagged output.PdfStandardandPageRangeparse the names thetypstCLI uses.- CLI flags
--input KEY=VALUE,--pdf-standard,--creation-timestamp(falls back to
SOURCE_DATE_EPOCH),--pagesand--no-pdf-tags. - The Wasm request accepts
inputs,pdf_standards,creation_timestamp,pagesand
pdf_tags.
typstgen 0.2.0
Breaking
Config::resolve_template_pathandError::TemplatePathNotFoundare removed; use
Config::template_roots, which returns every existing template directory.- Minimum supported Rust version is now 1.92 (required by Typst 0.15).
Added
compile_with_warningsreturns the PDF together with Typst's warnings; the CLI prints them to
stderr.- Errors and warnings name the file, line and column.
Changed
- Typst 0.15 (was 0.13).
- Template directories are optional: documents without imports compile without any.
- Every existing entry of
template_pathsis searched per import, in order, instead of only the
first existing one. Entries that are not directories are skipped. - Fonts found on disk are loaded only when a document uses them, and each face of a font
collection is registered once.
Fixed
datetime.today()returns a date instead of a date and time, and honoursoffset.
Security
- quick-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.