aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 23:48:35 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 23:48:35 +0200
commitecadd969e1d96918820a1fdac0cf0d520d96ba06 (patch)
treea06ed1160bfd28ae4578d9445242e48ac9ac3ea4 /templates
parent6762ce46af3cb12bc6ae37cda762c5d95add7903 (diff)
parent329d07b49e397cb65ab52e7ca019b47313027136 (diff)
downloadcolitur-ecadd969e1d96918820a1fdac0cf0d520d96ba06.tar.gz
colitur-ecadd969e1d96918820a1fdac0cf0d520d96ba06.zip
feat: naming, localisation and the rebuilt printed output
colitur computed the calendar correctly and could not say what it had computed. A printed ordo read ef-septuagesima-sunday-2 where a reader expects Dominica in Sexagesima, and the wall calendar showed slugs in every cell. lib/naming a language table and a config file, both pure and total, parsing the INI reader Overlay_ini already had lang/ la.ini and en.ini -- 725 names, every one transcribed from the 1962 Missal and citing the line it came from templates the ordo rebuilt as an A5 booklet: one week per page, a table of contents, framed days, a colour swatch; the wall calendar now fills its sheet instead of a quarter of it tools check_citations.py verifies all 400 citations resolve, with 33 self-tests of its own Names resolve through lang -> declared fallback -> the slug, so a partial translation is usable from its first line and the fully degraded case is the old output rather than a blank page. colitur day and colitur readings are BYTE-IDENTICAL to before, verified against main rather than asserted; --lang, --raw and the lang/config subcommands are still to come, and man/colitur-templates.5 still documents the pre-naming view, so writing a custom template needs the source until that lands.
Diffstat (limited to 'templates')
-rw-r--r--templates/ef/grid.html20
-rw-r--r--templates/ef/grid.ms22
-rw-r--r--templates/ef/grid.tex75
-rw-r--r--templates/ef/ordo.adoc23
-rw-r--r--templates/ef/ordo.html25
-rw-r--r--templates/ef/ordo.md23
-rw-r--r--templates/ef/ordo.ms25
-rw-r--r--templates/ef/ordo.tex112
-rw-r--r--templates/ef/ordo.txt10
9 files changed, 227 insertions, 108 deletions
diff --git a/templates/ef/grid.html b/templates/ef/grid.html
index b92e14a..b6ed229 100644
--- a/templates/ef/grid.html
+++ b/templates/ef/grid.html
@@ -1,11 +1,11 @@
<!-- colitur wall calendar -- HTML. flavour: html -->
-<!-- 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 enclosing month
- object also carries its own name.la, and a dotted lookup that misses
- climbs the WHOLE path to that outer scope instead of falling back. -->
+<!-- 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 (see
+ ordo.html's own header comment for the full reasoning).
+ The weekday header row comes from the view's own top-level
+ weekday_headings list (name/last objects), not a hard-coded
+ Dom/Lun/Mar row, so a translated calendar needs no template edit. -->
<!doctype html>
<html lang="la"><head><meta charset="utf-8">
<title>Calendarium {{year}}</title>
@@ -24,10 +24,10 @@
<h1>Calendarium {{year}} &middot; {{rite}}</h1>
{{#months}}
<table>
- <caption>{{name.la}}</caption>
- <tr><th>Dom</th><th>Lun</th><th>Mar</th><th>Mer</th><th>Iov</th><th>Ven</th><th>Sab</th></tr>
+ <caption>{{name}}</caption>
+ <tr>{{#weekday_headings}}<th>{{name}}</th>{{/weekday_headings}}</tr>
{{#weeks}}<tr>
- {{#days}}{{#in_month}}<td class="{{colour}}"><span class="dom">{{dom}}</span>{{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}}</td>{{/in_month}}{{^in_month}}<td class="pad"></td>{{/in_month}}{{/days}}
+ {{#days}}{{#in_month}}<td class="{{colour}}"><span class="dom">{{dom}}</span>{{name}}</td>{{/in_month}}{{^in_month}}<td class="pad"></td>{{/in_month}}{{/days}}
</tr>
{{/weeks}}
</table>
diff --git a/templates/ef/grid.ms b/templates/ef/grid.ms
index 703f46b..2244815 100644
--- a/templates/ef/grid.ms
+++ b/templates/ef/grid.ms
@@ -63,11 +63,17 @@
.\" every such row -- another warning `make check-templates` must fail on.
.\" Ragged-right removes the stretching, not the wrapping.
.\"
-.\" 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 (see
+.\" ordo.ms's own header comment for the full reasoning).
+.\"
+.\" The weekday header row comes from the view's own top-level
+.\" weekday_headings list (name/last objects), not a hard-coded Dom/Lun/Mar
+.\" row -- the same localisation reasoning as grid.tex's own header
+.\" comment, and the same reason it cannot be a bare current-value
+.\" reference: this engine rejects an empty tag path as a parse error, so a
+.\" loop over this list must name a field on each heading object.
.\"
.\" Every cell also carries a last flag, true on the seventh of its row: tbl
.\" needs the tab separator BETWEEN columns, not after the last one, and the
@@ -82,14 +88,14 @@ Calendarium {{year}} \(bu {{rite}}
.na
{{#months}}
.SH
-{{name.la}}
+{{name}}
.TS
allbox;
cw(1.3i) cw(1.3i) cw(1.3i) cw(1.3i) cw(1.3i) cw(1.3i) cw(1.3i)
lw(1.3i) lw(1.3i) lw(1.3i) lw(1.3i) lw(1.3i) lw(1.3i) lw(1.3i).
-Dom Lun Mar Mer Iov Ven Sab
+{{#weekday_headings}}{{name}}{{^last}} {{/last}}{{/weekday_headings}}
{{#weeks}}{{#days}}T{
-{{#in_month}}\fB{{dom}}\fP \s-2{{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}}\s+2{{/in_month}}
+{{#in_month}}\fB{{dom}}\fP \s-2{{name}}\s+2{{/in_month}}
{{#last}}T}{{/last}}{{^last}}T} {{/last}}{{/days}}
{{/weeks}}.TE
{{/months}}
diff --git a/templates/ef/grid.tex b/templates/ef/grid.tex
index 51432e9..8f90372 100644
--- a/templates/ef/grid.tex
+++ b/templates/ef/grid.tex
@@ -1,35 +1,66 @@
-% colitur wall calendar -- LaTeX. flavour: latex
+% colitur wall calendar -- A4 landscape, one month per page. flavour: latex
% Build: colitur table --year 2027 --template grid.tex > grid.tex && pdflatex grid.tex
+% This template has no table of contents and no cross-references (unlike
+% ordo.tex), so a single pdflatex pass is enough -- there is nothing for a
+% second pass to resolve.
%
-% 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). The fallback is written as a name-section wrapping a plain
-% var and its inverse, deliberately NOT as a single dotted-path lookup
-% followed by its own inverse: a dotted lookup that misses climbs to the
-% enclosing scope for the WHOLE path, and the month object also carries a
-% same-named key one level up, so the naive form would render the month's
-% own Latin name on every day lacking one, and never fall back at all.
+% The grid must FILL the page, not sit in its top quarter: \arraystretch
+% alone only pads a row's NATURAL height, it cannot make a table taller
+% than its own content wants to be, which is exactly why the previous
+% version floated at the top with the rest of the page blank. The fix is
+% to compute an explicit row height from the text height itself (\cellh
+% below) and give every cell a fixed-height parbox of that size, so the
+% table's total height is dictated by the page, not by its content. Every
+% month in the 1583-9999 domain has either 5 or 6 Sunday-started weeks
+% (never fewer), so dividing the available height by 6 fills at least 5/6
+% of it on a 5-week month and all of it on a 6-week one -- never a quarter.
%
-% Every cell also carries a last flag, true on the seventh of its row: the
-% engine has no unless-last construct, so the separator BETWEEN cells comes
-% from data, not the template. A trailing separator on every cell would give
-% eight columns for seven and pdflatex would reject the file outright.
-\documentclass[10pt,landscape]{article}
+% Real names, not slugs: the observed day's own display name is a PLAIN
+% resolved string (View.of_days, Task 5), interpolated directly as a plain
+% var below -- there is no dotted-la-with-slug-fallback idiom left to
+% write (see ordo.tex's own header comment for the full reasoning; it
+% applies here unchanged).
+%
+% The weekday header row comes from the view's top-level weekday_headings
+% list (name/last objects), not a hard-coded "Dom Lun Mar" row: the engine
+% rejects an EMPTY tag path -- a bare dot inside a section, on its own --
+% as a parse error, so the loop below must name a field on each heading
+% object rather than interpolate the section's own value directly, and a
+% hard-coded row would not be localised anyway. Every cell (day and
+% heading alike) also carries a last flag, true on the seventh of its row:
+% a LaTeX table row needs the ampersand separator BETWEEN cells, not after
+% the last one, and the engine has no unless-last construct, so the flag
+% is data -- rendered only when NOT last. A trailing ampersand gives eight
+% columns for seven cells and pdflatex rejects the file outright.
+\documentclass[11pt,landscape]{article}
\usepackage[a4paper,margin=10mm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[table]{xcolor}
-\definecolor{lwhite}{HTML}{FFFFFF}\definecolor{lred}{HTML}{FFDDDD}
-\definecolor{lgreen}{HTML}{DDFFDD}\definecolor{lviolet}{HTML}{EEAAEE}
-\definecolor{lrose}{HTML}{FFDDEE}\definecolor{lblack}{HTML}{DDDDDD}
+\usepackage{array}
+\definecolor{cwhite}{HTML}{FFFFFF}
+\definecolor{cred}{HTML}{F8DCDC}
+\definecolor{cgreen}{HTML}{DDEEDD}
+\definecolor{cviolet}{HTML}{E6DAF0}
+\definecolor{crose}{HTML}{FADCE8}
+\definecolor{cblack}{HTML}{DCDCDC}
+\setlength{\parindent}{0pt}
+\pagestyle{empty}
+% Seven equal columns filling the text width, and rows stretched so six
+% possible week rows fill the text height -- see the header comment above
+% for why a fixed row height, not \arraystretch, is what makes this work.
+\newlength{\cellw}\setlength{\cellw}{\dimexpr(\textwidth-14\tabcolsep-8\arrayrulewidth)/7\relax}
+\newlength{\cellh}\setlength{\cellh}{\dimexpr(\textheight-18mm)/6\relax}
+\newcommand{\daycell}[3]{\parbox[t][\cellh][t]{\cellw}{\raggedright\textbf{#1}\ \footnotesize #2\par\vfill\tiny #3}}
\begin{document}
{{#months}}
-\section*{ {{name.la}} {{year}} }
-\begin{tabular}{|p{2.6cm}|p{2.6cm}|p{2.6cm}|p{2.6cm}|p{2.6cm}|p{2.6cm}|p{2.6cm}|}
-\hline Dom & Lun & Mar & Mer & Iov & Ven & Sab \\ \hline
-{{#weeks}}{{#days}}{{#in_month}}\cellcolor{l{{colour}}}\textbf{ {{dom}} } \footnotesize {{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}}{{/in_month}}{{^last}} & {{/last}}{{/days}} \\ \hline
+{\LARGE\bfseries {{name}} {{year}}}\par\vspace{2mm}
+\renewcommand{\arraystretch}{1}
+\begin{tabular}{|*{7}{p{\cellw}|}}\hline
+{{#weekday_headings}}\textbf{ {{name}} }{{^last}} & {{/last}}{{/weekday_headings}} \\ \hline
+{{#weeks}}{{#days}}{{#in_month}}\cellcolor{c{{colour}}}\daycell{ {{dom}} }{ {{name}} }{ {{rank_name}} }{{/in_month}}{{^last}} & {{/last}}{{/days}} \\ \hline
{{/weeks}}
\end{tabular}
-\newpage
+\clearpage
{{/months}}
\end{document}
diff --git a/templates/ef/ordo.adoc b/templates/ef/ordo.adoc
index 13d09ec..3146f2e 100644
--- a/templates/ef/ordo.adoc
+++ b/templates/ef/ordo.adoc
@@ -4,22 +4,25 @@
// A feast name containing `*` or `_` will render as emphasis. That is a
// documented limitation, not a bug to fix.
//
-// 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.
-= Ordo {{year}} · {{rite}}
+// 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.
+= {{term.ordo}} {{year}} · {{rite}}
:toc:
{{#months}}
-== {{name.la}}
+== {{name}}
{{#days}}
-*{{dom}}* {{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}} +
+*{{dom}}* {{name}} +
{{rank}} · {{colour}} +
-{{#first}}Ep. {{first}} {{/first}}{{#gospel}}Ev. {{gospel}}{{/gospel}}
+{{#first}}{{term.epistle}} {{first}} {{/first}}{{#gospel}}{{term.gospel}} {{gospel}}{{/gospel}}
{{#comms}} +
-Com. {{slug}}{{/comms}}
+{{term.commemoration}} {{name}}{{/comms}}
{{/days}}{{/months}}
diff --git a/templates/ef/ordo.html b/templates/ef/ordo.html
index e516816..3353000 100644
--- a/templates/ef/ordo.html
+++ b/templates/ef/ordo.html
@@ -1,12 +1,15 @@
<!-- colitur ordo booklet -- HTML. flavour: html -->
-<!-- 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. -->
<!doctype html>
<html lang="la"><head><meta charset="utf-8">
-<title>Ordo {{year}}</title>
+<title>{{term.ordo}} {{year}}</title>
<style>
body{font-family:serif;max-width:40em;margin:2em auto;line-height:1.4}
.day{margin:.6em 0;padding-left:2.5em;text-indent:-2.5em}
@@ -17,12 +20,12 @@
.rose{border-left:4px solid #e7a} .black{border-left:4px solid #000}
@media print{body{margin:0}}
</style></head><body>
-<h1>Ordo {{year}} &middot; {{rite}}</h1>
-{{#months}}<h2>{{name.la}}</h2>
+<h1>{{term.ordo}} {{year}} &middot; {{rite}}</h1>
+{{#months}}<h2>{{name}}</h2>
{{#days}}<div class="day {{colour}}">
- <span class="dom">{{dom}}</span>{{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}}
- <div class="meta">{{rank}} &middot; {{colour}}{{#first}} &middot; Ep. {{first}}{{/first}}{{#gospel}} &middot; Ev. {{gospel}}{{/gospel}}</div>
- {{#comms}}<div class="meta">Com. {{slug}}</div>{{/comms}}
+ <span class="dom">{{dom}}</span>{{name}}
+ <div class="meta">{{rank}} &middot; {{colour}}{{#first}} &middot; {{term.epistle}} {{first}}{{/first}}{{#gospel}} &middot; {{term.gospel}} {{gospel}}{{/gospel}}</div>
+ {{#comms}}<div class="meta">{{term.commemoration}} {{name}}</div>{{/comms}}
</div>
{{/days}}{{/months}}
</body></html>
diff --git a/templates/ef/ordo.md b/templates/ef/ordo.md
index 606ea01..805bf67 100644
--- a/templates/ef/ordo.md
+++ b/templates/ef/ordo.md
@@ -3,21 +3,24 @@
so this template's flavour deliberately does NOT escape interpolated
values. A feast name containing `*` or `_` will render as emphasis.
That is a documented limitation, not a bug to fix. -->
-<!-- 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. -->
-# Ordo {{year}} · {{rite}}
+<!-- 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. -->
+# {{term.ordo}} {{year}} · {{rite}}
{{#months}}
-## {{name.la}}
+## {{name}}
{{#days}}
-**{{dom}}** {{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}}
-`{{rank}}` · {{colour}}{{#first}} · Ep. {{first}}{{/first}}{{#gospel}} · Ev. {{gospel}}{{/gospel}}
+**{{dom}}** {{name}}
+`{{rank}}` · {{colour}}{{#first}} · {{term.epistle}} {{first}}{{/first}}{{#gospel}} · {{term.gospel}} {{gospel}}{{/gospel}}
{{#comms}}
-- Com. {{slug}}
+- {{term.commemoration}} {{name}}
{{/comms}}
{{/days}}{{/months}}
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}}
diff --git a/templates/ef/ordo.tex b/templates/ef/ordo.tex
index 6012753..6a298df 100644
--- a/templates/ef/ordo.tex
+++ b/templates/ef/ordo.tex
@@ -1,33 +1,103 @@
% colitur ordo booklet -- LaTeX. flavour: latex
-% Build: colitur table --year 2027 --template ordo.tex > ordo.tex && pdflatex ordo.tex
+% Build: colitur table --year 2027 --template ordo.tex > ordo.tex && pdflatex ordo.tex &&
+% pdflatex ordo.tex (twice, so \pageref in the table of contents settles)
%
-% 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). The fallback is written as a name-section wrapping a plain
-% var and its inverse, deliberately NOT as a single dotted-path lookup
-% followed by its own inverse: a dotted lookup that misses climbs to the
-% enclosing scope for the WHOLE path, and the month object also carries a
-% same-named key one level up, so the naive form would render the month's
-% own Latin name on every day lacking one, and never fall back at all.
-\documentclass[10pt,twoside]{article}
-\usepackage[a5paper,margin=15mm]{geometry}
+% A5, one week per page, each day in a framed box with a colour swatch. Every
+% fixed string (headings, the Epistle/Gospel/Commemoration/Week labels)
+% comes from the view's term vocabulary rather than being written into this
+% file, so a translated booklet needs no template edit -- only a different
+% --lang.
+%
+% The observed day's own display name is a PLAIN resolved string
+% (View.of_days, Task 5), never a lang-keyed object -- there is no
+% dotted-la-with-slug-fallback idiom to write here at all; a day with no
+% name in the shipped data still resolves to something printable (its slug,
+% under --raw, or the lang table's own miss-echoes-the-key behaviour), so
+% the plain name field alone is always enough.
+%
+% The engine has no parent-path syntax: nested inside a month's own week
+% loop, a bare week-number reference finds the WEEK's own number, and there
+% is no way to reach the enclosing month's from there. That is why each
+% week object carries its own month number and month name fields
+% (lib/render/view.ml, Task 5) -- used throughout below instead of a
+% parent-path reference, which this engine cannot express.
+%
+% This template's own %-comments are plain text to the engine: it has no
+% awareness of LaTeX's comment syntax, and a stray double-brace pair inside
+% one would still be parsed as a tag -- which is why this whole header is
+% deliberately written without ever typing two curly braces next to each
+% other, even to name a field.
+\documentclass[10pt]{article}
+% includehead/includefoot: without them geometry seats the text block at
+% top=/bottom= and fancyhdr then places the running header/footer OUTSIDE
+% that block -- above the top margin and below the bottom one -- which on
+% this page's original top=11mm/bottom=12mm pushed the header partly above
+% the physical page edge (measured: yMin -5.5pt on a 0..595pt page) and the
+% footer to within 1pt of the bottom edge. With includehead/includefoot the
+% header/footer live INSIDE top=/bottom= instead, so headsep/footskip are
+% also set explicitly (3mm/7mm) rather than left at article's defaults
+% (25pt/30pt) -- those defaults alone would still overflow a 10mm margin
+% and, measured, silently added 20 extra pages to the whole booklet by
+% shrinking every day box. \headheight is left at fancyhdr's own default
+% (12pt, confirmed by the log, no "increase \headheight" warning) since a
+% single \small header line fits it without complaint.
+\usepackage[a5paper,top=10mm,bottom=10mm,inner=14mm,outer=10mm,includehead,includefoot,headsep=3mm,footskip=7mm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
+\usepackage{xcolor}
+\usepackage{tikz}
+\usepackage{tcolorbox}
\usepackage{fancyhdr}
-\pagestyle{fancy}
-\fancyhead[C]{ORDO {{year}} \textperiodcentered\ {{rite}}}
+\usepackage[hidelinks]{hyperref}
+\definecolor{licolwhite}{HTML}{FFFFFF}
+\definecolor{licolred}{HTML}{C1272D}
+\definecolor{licolgreen}{HTML}{2E7D32}
+\definecolor{licolviolet}{HTML}{6A1B9A}
+\definecolor{licolrose}{HTML}{E91E8C}
+\definecolor{licolblack}{HTML}{000000}
+% A framed square, always outlined in black regardless of fill -- so white
+% (and, on a black background page, black) still reads as a swatch rather
+% than a gap. tikz (a tcolorbox dependency already) draws the border; xcolor
+% alone cannot outline a filled rule.
+\newcommand{\swatch}[1]{\tikz[baseline=-0.6ex]{\fill[draw=black,line width=0.4pt,fill=#1] (0,0) rectangle (2.4ex,2.4ex);}}
+\pagestyle{fancy}\fancyhf{}
+\fancyhead[C]{\small {{term.ordo}} {{year}} \textperiodcentered\ {{rite}}}
+\fancyfoot[C]{\small\thepage}
+\renewcommand{\headrulewidth}{0.4pt}
\setlength{\parindent}{0pt}
\begin{document}
+
+\begin{center}
+\Large\bfseries {{term.ordo}} {{year}}\\[2pt]
+\normalsize\mdseries {{rite}}
+\end{center}
+\vspace{4mm}
+{\bfseries {{term.contents}}}\par\vspace{2mm}
+\begin{small}
{{#months}}
-\section*{ {{name.la}} }
-{{#days}}
-\textbf{ {{dom}} } \quad {{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}}\\
-\small {{rank}} \textperiodcentered\ {{colour}}\\
-{{#first}}\small Ep. {{first}}\quad{{/first}}{{#gospel}}\small Ev. {{gospel}}{{/gospel}}\\
-{{#comms}}\small Com. {{slug}}\\
-{{/comms}}
-\medskip
+\textbf{ {{name}} }\par
+{{#weeks}}\hspace*{4mm}{{term.week}} {{num}}\dotfill\pageref{w{{month_num}}-{{num}}}\par
+{{/weeks}}
+{{/months}}
+\end{small}
+\clearpage
+{{#months}}
+{{#weeks}}
+\label{w{{month_num}}-{{num}}}
+{\bfseries\large {{month_name}} }\hfill{\small {{term.week}} {{num}}}\par\vspace{0.5mm}
+{{#days}}
+{{#in_month}}
+\begin{tcolorbox}[colback=white,colframe=black!35,boxrule=0.4pt,left=1.6mm,right=1.6mm,top=0.4mm,bottom=0.4mm,before skip=0.5mm,after skip=0mm]
+{\bfseries {{dom}} } \;\; {\scriptsize {{weekday}} } \hfill \swatch{licol{{colour}}}\par
+{\bfseries {{name}} }\par
+{\scriptsize {{rank_name}} \textperiodcentered\ {{colour_name}} }\par
+{{#first}}{\scriptsize {{term.epistle}}\ {{first}} }\quad{{/first}}{{#gospel}}{\scriptsize {{term.gospel}}\ {{gospel}} }{{/gospel}}
+{{#comms}}\par{\scriptsize {{term.commemoration}}\ {{name}} }{{/comms}}
+\end{tcolorbox}
+{{/in_month}}
{{/days}}
+\clearpage
+{{/weeks}}
{{/months}}
\end{document}
diff --git a/templates/ef/ordo.txt b/templates/ef/ordo.txt
index aba121a..3301652 100644
--- a/templates/ef/ordo.txt
+++ b/templates/ef/ordo.txt
@@ -1,10 +1,10 @@
{{#months}}
-{{name.la}} {{year}}
+{{name}} {{year}}
{{#days}}
-{{dom}} {{slug}}
+{{dom}} {{name}}
{{rank}} · {{colour}}
-{{#first}} Ep. {{first}}
-{{/first}}{{#gospel}} Ev. {{gospel}}
-{{/gospel}}{{#comms}} Com. {{slug}}
+{{#first}} {{term.epistle}} {{first}}
+{{/first}}{{#gospel}} {{term.gospel}} {{gospel}}
+{{/gospel}}{{#comms}} {{term.commemoration}} {{name}}
{{/comms}}{{/days}}
{{/months}}