aboutsummaryrefslogtreecommitdiff
path: root/templates/ef/ordo.ms
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 15:54:23 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 15:54:23 +0200
commit3f5409f79a1b82e09f72930487ca9e42a1175eed (patch)
tree2da27b11302a89ea116420cbe91ff39cc82ad490 /templates/ef/ordo.ms
parentdb82be80c9479398720e7a72d3ab66a3017ae98c (diff)
downloadcolitur-3f5409f79a1b82e09f72930487ca9e42a1175eed.tar.gz
colitur-3f5409f79a1b82e09f72930487ca9e42a1175eed.zip
feat(templates): the ordo booklet, rebuilt
A5, one week per page, with a table of contents, each day in a framed box and a colour swatch so the page is scannable without reading. Real names throughout, and every fixed string routed through the term vocabulary so a translated booklet needs no template edit. The previous version was A4, printed slugs, ran days together with no visual separation, had no contents, and gave the liturgical colour only as the word white. It was not usable as a printed booklet. lib/render/view.ml already carried month_num/month_name on each week object from Task 5, so no kernel/view change was needed here -- the template uses those instead of a parent path the engine cannot express. Box padding, margins and secondary-line font size were tightened past the brief's own starting values: at the brief's sizes a week with several long commemoration names (e.g. Feb 21-27, three of seven days carrying one) overflowed onto a second physical page, breaking one-week-per-page. Verified by measuring page count against the known week count (63 weeks in 2027) until every content page carried exactly one week, not by eye. The header comments of all six flavours were themselves a trap the brief warns about: writing double braces to NAME a template field inside a LaTeX %, groff .\", HTML <!-- -->, or AsciiDoc // comment gets parsed as a real tag by this brace-only engine, not treated as inert prose. An early draft's own comments did this and produced 'empty tag path' parse errors and a silently-unclosed section; every comment in all six templates is now written without ever typing two braces in a row. The other five flavours keep their existing structure; only the dead {{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}} idiom is replaced with a plain {{name}} (extended to comms entries too, which carry their own resolved name), and the fixed labels (Ordo, Epistle, Gospel, Commemoration) now come from {{term.*}}. Golden regeneration could not follow the brief's own `colitur table` shell-out literally: the CLI's current default language is Latin-only (bin/main.ml's Task-5 bridge), while test_render_golden.ml renders through Test_view's English-primary/Latin-fallback table, so the two produce different text for the same slug. The goldens were regenerated through the test's own render path instead (a temporary env-gated block in test_render_golden.ml, reverted before this commit), so they agree with what the suite actually computes. All six ordo golden tests pass; the three grid ones are Task 9's scope. make check-templates passes with zero warnings. The CLI-rendered PDF is A5 (148x210mm), 65 pages -- 2 pages of title/contents plus exactly one page per week (63), verified with no overflow.
Diffstat (limited to 'templates/ef/ordo.ms')
-rw-r--r--templates/ef/ordo.ms25
1 files changed, 14 insertions, 11 deletions
diff --git a/templates/ef/ordo.ms b/templates/ef/ordo.ms
index db9b9fc..88dcb6c 100644
--- a/templates/ef/ordo.ms
+++ b/templates/ef/ordo.ms
@@ -1,27 +1,30 @@
.\" colitur ordo booklet -- groff ms. flavour: groff
.\" Build: colitur table --year 2027 --template ordo.ms | groff -ms -Tpdf > ordo.pdf
.\"
-.\" Day label falls back to the slug when the day carries no Latin name (most
-.\" temporal days, and most sanctoral entries, which are Latin-less in the
-.\" shipped data) -- see ordo.tex's own comment for why the fallback is
-.\" written as a name-section wrapping a plain var and its inverse, rather
-.\" than a single dotted lookup and its inverse.
+.\" The observed day's own display name is a PLAIN resolved string
+.\" (View.of_days, Task 5), not a lang-keyed object -- there is no
+.\" dotted-la-with-slug-fallback idiom to write here any more; a
+.\" commemoration entry carries its own resolved display name too, so a
+.\" commemoration line no longer prints the bare slug. Every fixed label
+.\" (Ordo, Epistle, Gospel, Commemoration) comes from the view's term
+.\" vocabulary rather than being written into this file, so a translated
+.\" booklet needs no template edit.
.TL
-ORDO {{year}} \(bu {{rite}}
+{{term.ordo}} {{year}} \(bu {{rite}}
{{#months}}
.SH
-{{name.la}}
+{{name}}
.LP
{{#days}}
.IP "{{dom}}" 4
-{{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}}
+{{name}}
.br
\s-2{{rank}} \(bu {{colour}}\s+2
{{#first}}.br
-\s-2Ep. {{first}}\s+2
+\s-2{{term.epistle}} {{first}}\s+2
{{/first}}{{#gospel}}.br
-\s-2Ev. {{gospel}}\s+2
+\s-2{{term.gospel}} {{gospel}}\s+2
{{/gospel}}{{#comms}}.br
-\s-2Com. {{slug}}\s+2
+\s-2{{term.commemoration}} {{name}}\s+2
{{/comms}}{{/days}}
{{/months}}