aboutsummaryrefslogtreecommitdiff
path: root/templates/ef/grid.tex
Commit message (Collapse)AuthorAgeFilesLines
* fix(templates): clear the wall calendar's class label of the border, add siglaLukasz Kasprzak2026-08-201-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem 1: grid.tex's \daycell pushed the rank/class line to the exact bottom edge of its fixed-height parbox with \vfill, the same edge \hline draws the cell's bottom rule along, so 'I classis'/'IV classis'/'II classis' printed as if sliced by the rule. Fixed by nesting a second, shorter parbox (\cellh minus a new \cellpad, 1.5mm) inside the unchanged \cellh-tall outer one, so the \vfill only ever reaches to \cellpad above the rule, never touching it. \strut on both trailing lines belt-and-suspenders the fix for lines with no descenders. Problem 2: each cell now also carries the day's Epistle and Gospel references (view fields first/gospel), joined by a centred dot/bullet rather than repeated Ep./Ev. labels -- the same compact convention ordo.tex already uses between rank_name and colour_name. A grid cell is only ~3.5cm wide and Holy Week's own citations run 20-30 characters each, so class label and sigla get their own \tiny line apiece rather than being crammed onto one line and shrunk past readability; \cellh leaves about eleven \tiny lines of room, so two short lines cost little. Both first and gospel are wrapped in their own conditional section so a day missing either prints no stray separator (defensive: every day in the shipped EF lectionary has both, but nothing guarantees that of a future rite or overlay). grid.ms gains the same sigla, on their own .br line, using tbl's existing w() wrap rather than any manual line-splitting -- it was never subject to problem 1 (tbl auto-sizes row height, no fixed-height clipping risk) and never carried a class label to begin with, so none was added here. grid.html gains the sigla as a small, muted block-level span; unlike the two paper flavours it isn't boxed onto a fixed physical page, so the browser just grows the cell rather than needing any line-budget compromise. Verified with two pdflatex passes and groff -ms -t -Tpdf against all twelve 2027 months: zero Overfull warnings, 7 columns every row, class label and sigla both fully clear of every rule. test/golden/grid-2027.* regenerated through test_render_golden.ml's own render path (View.of_days + Template.render_string, the EN-with-LA-fallback lang table), not the CLI, per this project's own standing trap about the two tables differing.
* feat(templates): the wall calendar fills its pageLukasz Kasprzak2026-08-191-22/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* feat(templates): wall calendar grid in LaTeX, groff and HTMLLukasz Kasprzak2026-08-191-0/+35
Three flavours, not six: a month grid in Markdown or plain text is a worse artefact than the booklet already is, and shipping a template we would not use ourselves is maintenance with no reader. These are the first templates to use weeks and in_month, so this is where the view model earns its keep -- the booklet and the grid come from one model with no second code path. Every cell carries a per-cell 'last' boolean (already in the view). A table row needs a separator BETWEEN cells and the engine deliberately has no 'unless last' construct; the rule is shape the data, not the template. Without it the LaTeX grid emits eight columns for seven cells and pdflatex rejects the file. Day cells resolve their label as {{#name}}{{la}}{{^la}}{{slug}}{{/la}} {{/name}}, never a bare {{name.la}}: the enclosing month object has its own name.la, and the engine's scope lookup falls back outward, so a bare dotted lookup would render the month's own Latin name on every day lacking one -- a wall calendar where every day reads "January". Verified on the goldens: Ianuarius appears exactly once per file, the month heading, never as a day label.