aboutsummaryrefslogtreecommitdiff
path: root/man/colitur.1
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-20 10:11:48 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-20 10:11:48 +0200
commitcd46163fa347bbc49bf8008d70d408f62feabda5 (patch)
tree36d3b7e910dfafe7740b12e6b206cd3b9c089d1e /man/colitur.1
parent6aebb3ec513c0177a39c2eb8d4b741e90d6f53f4 (diff)
downloadcolitur-cd46163fa347bbc49bf8008d70d408f62feabda5.tar.gz
colitur-cd46163fa347bbc49bf8008d70d408f62feabda5.zip
fix(cli): close the flavour-list call sites Typst's addition exposed
The task this branch of work set out to test was whether the template engine is genuinely flavour-agnostic outside lib/render/escape.ml. It is not, quite: bin/main.ml's own --flavour error/help text and both man pages hand-typed the flavour list and its count ("the six flavours") as literal prose, so adding Typst as a seventh left three places silently wrong (an incomplete flavour list in two error messages, and "six" where the true count is now seven) until this commit. bin/main.ml's two error messages (unknown --flavour value, and cannot infer a flavour from an extension) now build their flavour list by walking Escape.all/to_string instead of a literal string, so the next flavour added will not reintroduce the same drift; the static --help body text and colitur(1)/colitur-templates(5) still name flavours and their count by hand; there was no equivalent gain available for prose formatted this specifically, so those were updated by hand instead, along with colitur-templates(5)'s FLAVOURS section, which gained typst's own subsection alongside latex/groff/html/xml/ics/none. test/cli.t's two pinned error-text assertions are updated to match, and gained a new case: .typ inferred from extension, and a real shipped citation's hyphen surviving --flavour typst's own escaping live, the same shape the 2035 Ss. Petri et Pauli case already proves for latex's ampersand just above it.
Diffstat (limited to 'man/colitur.1')
-rw-r--r--man/colitur.111
1 files changed, 6 insertions, 5 deletions
diff --git a/man/colitur.1 b/man/colitur.1
index b9ce1d1..df7ad3e 100644
--- a/man/colitur.1
+++ b/man/colitur.1
@@ -265,7 +265,7 @@ below.
.BI \-\-flavour " FLAVOUR"
.RB ( "colitur table" " and " "colitur render" " only)"
One of
-.BR latex ", " groff ", " html ", " xml ", " ics " or " none .
+.BR latex ", " typst ", " groff ", " html ", " xml ", " ics " or " none .
Overrides the flavour that would otherwise be inferred from
.BR \-\-template 's
own extension. See
@@ -602,7 +602,7 @@ literal markup, which is the author's and is trusted as\-is. One of:
.RS
.nf
-latex groff html xml ics none
+latex typst groff html xml ics none
.fi
.RE
.PP
@@ -615,6 +615,7 @@ own file extension:
.nf
.I .tex -> latex
+.I .typ -> typst
.I .ms .mom .me -> groff
.I .html .htm -> html
.I .xml -> xml
@@ -630,7 +631,7 @@ leaving them alone.
.PP
An extension
.B colitur
-does not recognise is a hard error naming the six flavours above; it is
+does not recognise is a hard error naming the seven flavours above; it is
.I never
a silent fallback to
.BR none .
@@ -641,7 +642,7 @@ document.
.nf
.B colitur table \-\-year 2027 \-\-template invite.wat
-colitur: cannot infer a flavour from ".wat"; pass \-\-flavour latex|groff|html|xml|ics|none
+colitur: cannot infer a flavour from ".wat"; pass \-\-flavour latex|typst|groff|html|xml|ics|none
.fi
.RE
.PP
@@ -1127,7 +1128,7 @@ shapes and worked examples.
.BR colitur\-templates (5)
for the template format used by
.BR table ", " render " and " publish
-\(em the four syntax forms, the six flavours and their escaping, the full
+\(em the four syntax forms, the seven flavours and their escaping, the full
view\-model field reference, and the one remaining scope hazard a template
author can still hit.
.PP