summaryrefslogtreecommitdiff
path: root/templates/ef/grid.ms
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 22:00:20 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 22:00:20 +0200
commitd72868ab9ea4f3170eff22a731fdc171469eddf7 (patch)
tree77b43e8c4e84e38675c1d8a36e2d501a0d994bcc /templates/ef/grid.ms
parentceed38372a66580ec584db10db79cf311c6da9ef (diff)
downloadcolitur-d72868ab9ea4f3170eff22a731fdc171469eddf7.tar.gz
colitur-d72868ab9ea4f3170eff22a731fdc171469eddf7.zip
feat(templates): the wall calendar fills its page
The previous version occupied about the top quarter of an A4 page and left the rest blank, and printed slugs. Cell height is now computed from the text height (\textheight-18mm over 6 rows -- every month has 5 or 6 Sunday-started weeks) rather than left to the table's natural size, which is what made it float at the top. Measured: January 2027's last row of content now reaches y=566pt of a 595pt-tall page, not a quarter of the way down. Real names replace the raw slug in every cell (the observed day's own resolved display name, a plain string per View.of_days), and each day's rank name is shown too, so a printed page reads as a calendar rather than machine keys. Weekday headings come from the view as a localised list rather than a hard-coded Dom/Lun/Mar row, so a translated calendar needs no template edit -- and because the engine rejects an empty tag path, the list carries named {name; last} fields rather than bare values. grid.ms and grid.html carry the same two changes (real names, localised weekday headings) for their own flavours. Verified with pdflatex/groff: 12 pages, A4 landscape, every row exactly 7 cells (6 ampersands), zero warnings. Goldens regenerated through the test harness's own render path, not the CLI, whose default language table differs from the test's.
Diffstat (limited to 'templates/ef/grid.ms')
-rw-r--r--templates/ef/grid.ms22
1 files changed, 14 insertions, 8 deletions
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}}