diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 31 |
1 files changed, 23 insertions, 8 deletions
@@ -46,14 +46,14 @@ check-schema: build ## validate emitted XML against schema/colitur-v1.xsd (needs # Typesets every shipped template through the real tool that would typeset it # for a reader, not merely through this program's own renderer. The golden -# tests already prove `colitur table` PRODUCES the expected LaTeX/groff/HTML -# text; only this proves that text actually TYPESETS -- a template can render -# byte-for-byte as pinned and still be malformed LaTeX or groff. Each tool is -# genuinely optional (neither is in colitur's own frozen deps), so absence is -# printed LOUDLY as SKIPPED rather than silently treated as a pass -- a -# silent skip reads as a pass, which is the whole failure mode this guards -# against. -check-templates: build ## typeset every shipped template (needs pdflatex/groff; skipped if absent) +# tests already prove `colitur table` PRODUCES the expected LaTeX/groff/HTML/ +# Typst text; only this proves that text actually TYPESETS -- a template can +# render byte-for-byte as pinned and still be malformed LaTeX, groff or +# Typst. Each tool is genuinely optional (none is in colitur's own frozen +# deps), so absence is printed LOUDLY as SKIPPED rather than silently +# treated as a pass -- a silent skip reads as a pass, which is the whole +# failure mode this guards against. +check-templates: build ## typeset every shipped template (needs pdflatex/groff/typst; skipped per-tool if absent) @ok=1; \ if command -v pdflatex >/dev/null 2>&1; then \ for t in ordo grid; do \ @@ -84,6 +84,21 @@ check-templates: build ## typeset every shipped template (needs pdflatex/groff; fi; \ done; \ else echo "SKIPPED: groff not installed -- groff templates render but are NOT typeset"; fi; \ + if command -v typst >/dev/null 2>&1; then \ + for t in ordo grid; do \ + if opam exec -- dune exec colitur -- table --year 2027 --template templates/ef/$$t.typ \ + > /tmp/$$t.typ 2>/tmp/$$t-render.err; then \ + if typst compile /tmp/$$t.typ /tmp/$$t-typst.pdf 2>/tmp/$$t-typst.err; then \ + echo "typst: $$t.typ OK (one pass -- typst resolves its own"; \ + echo " table-of-contents page numbers inside a single compile, unlike pdflatex above)"; \ + else \ + echo "typst: $$t.typ FAILED:"; cat /tmp/$$t-typst.err; ok=0; \ + fi; \ + else \ + echo "typst: $$t.typ FAILED (colitur table render):"; cat /tmp/$$t-render.err; ok=0; \ + fi; \ + done; \ + else echo "SKIPPED: typst not installed -- Typst templates render but are NOT typeset"; fi; \ test $$ok -eq 1 # lang/la.ini's own discipline: every celebration/season/rank name cites the |
