From 6aebb3ec513c0177a39c2eb8d4b741e90d6f53f4 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Thu, 20 Aug 2026 10:07:15 +0200 Subject: feat(templates): ordo booklet and wall calendar in Typst Adds templates/ef/ordo.typ (A5, one week per page, each day framed with a colour swatch, real names, every fixed string through term.*) and templates/ef/grid.typ (A4 landscape, one month per page, 7 columns, colour-filled cells, Epistle/Gospel sigla), matching what ordo.tex and grid.tex already do. Typst resolves its own table of contents inside a single compile: no pageref/aux-file dance, unlike pdflatex's own two-pass need for ordo.tex. ordo.typ's TOC is one flat heading per week (Month . Week N) rather than ordo.tex's own month-once/weeks-nested layout, since the view model has no first-of-month flag for a template to test and inventing one would be new engine state for a cosmetic grouping. grid.typ deliberately diverges from grid.tex's own partial-fill behaviour for a 5-week month: Typst's row-size list repeats its own last entry for every remaining row, so a two-entry rows spec fills the page completely regardless of week count, where LaTeX's fixed cellh leaves a 5-week month's bottom sixth blank on purpose. Both divergences are documented in the templates' own headers. Two bugs found and fixed while building these against the real typst 0.14.2 binary: two stray hash characters in grid.typ's header comment that were not actually inside a line-comment (would have been parsed as Typst code, not prose); and two lines merging into one wherever they were separated only by a bare newline (still the same soft-wrapped paragraph in Typst, unlike LaTeX's own explicit paragraph break) -- fixed with a trailing backslash to force a real line break without adding inter-paragraph spacing, verified against a full-year render (zero typst warnings across all 365 days of 2027, in both templates). Goldens (test/golden/ordo-2027.typ, test/golden/grid-2027.typ) were generated through the harness's own View.of_days/Template.render_string path, via a throwaway generator, NOT through the CLI: the CLI's default language table differs from the harness's own English-chained-to-Latin table, confirmed live (diffing CLI output against the harness's own render showed exactly the expected language divergence and nothing else) -- the same trap this project has hit before. make check-templates now typesets both templates with the typst binary, using the same SKIPPED-and-exit-0 shape the pdflatex/groff blocks already use when their own tool is absent, verified in both directions: absent (PATH without typst) skips loudly and exits 0, and a deliberately corrupted template fails the target with a non-zero exit and typst's own error text. --- test/dune | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/dune') diff --git a/test/dune b/test/dune index c1a14fb..84c5ec7 100644 --- a/test/dune +++ b/test/dune @@ -24,6 +24,8 @@ ../templates/ef/grid.tex ../templates/ef/grid.ms ../templates/ef/grid.html + ../templates/ef/ordo.typ + ../templates/ef/grid.typ golden/ordo-2027.tex golden/ordo-2027.ms golden/ordo-2027.html @@ -32,7 +34,9 @@ golden/ordo-2027.txt golden/grid-2027.tex golden/grid-2027.ms - golden/grid-2027.html) + golden/grid-2027.html + golden/ordo-2027.typ + golden/grid-2027.typ) (preprocess (pps ppx_sexp_conv))) -- cgit v1.3