| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds templates/ef/ordo.typ (A5, one week per page, each day framed with
a colour swatch, real names, every fixed string through term.*) and
templates/ef/grid.typ (A4 landscape, one month per page, 7 columns,
colour-filled cells, Epistle/Gospel sigla), matching what ordo.tex and
grid.tex already do.
Typst resolves its own table of contents inside a single compile: no
pageref/aux-file dance, unlike pdflatex's own two-pass need for
ordo.tex. ordo.typ's TOC is one flat heading per week (Month . Week N)
rather than ordo.tex's own month-once/weeks-nested layout, since the
view model has no first-of-month flag for a template to test and
inventing one would be new engine state for a cosmetic grouping.
grid.typ deliberately diverges from grid.tex's own partial-fill
behaviour for a 5-week month: Typst's row-size list repeats its own
last entry for every remaining row, so a two-entry rows spec fills the
page completely regardless of week count, where LaTeX's fixed cellh
leaves a 5-week month's bottom sixth blank on purpose. Both divergences
are documented in the templates' own headers.
Two bugs found and fixed while building these against the real typst
0.14.2 binary: two stray hash characters in grid.typ's header comment
that were not actually inside a line-comment (would have been parsed
as Typst code, not prose); and two lines merging into one wherever they
were separated only by a bare newline (still the same soft-wrapped
paragraph in Typst, unlike LaTeX's own explicit paragraph break) --
fixed with a trailing backslash to force a real line break without
adding inter-paragraph spacing, verified against a full-year render
(zero typst warnings across all 365 days of 2027, in both templates).
Goldens (test/golden/ordo-2027.typ, test/golden/grid-2027.typ) were
generated through the harness's own View.of_days/Template.render_string
path, via a throwaway generator, NOT through the CLI: the CLI's default
language table differs from the harness's own English-chained-to-Latin
table, confirmed live (diffing CLI output against the harness's own
render showed exactly the expected language divergence and nothing
else) -- the same trap this project has hit before.
make check-templates now typesets both templates with the typst binary,
using the same SKIPPED-and-exit-0 shape the pdflatex/groff blocks
already use when their own tool is absent, verified in both directions:
absent (PATH without typst) skips loudly and exits 0, and a
deliberately corrupted template fails the target with a non-zero exit
and typst's own error text.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
geometry's top=11mm/bottom=12mm seated the text block without accounting
for fancyhdr's own header/footer, which live OUTSIDE that block by
default -- pushing the running header ('Ordo 2027 . ef') 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. The user hit this and
reported the header as clipped.
Adds includehead/includefoot to the geometry options (a5paper,
top=10mm, bottom=10mm) so the header/footer live inside the margins
instead, with headsep/footskip set explicitly (3mm/7mm) rather than
left at article's defaults -- those defaults alone would still overflow
a 10mm margin and silently added 20 extra pages to the whole booklet by
shrinking every day box.
Verified: two pdflatex passes produce a 65-page A5 PDF with the full
'Ordo 2027 . ef' header intact on every page and zero pdflatex
warnings. Golden regenerated through the test harness's own render
path (English-with-Latin-fallback), not the CLI, which defaults to
Latin only and would otherwise pin output the tests never produce.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pdftotext -layout of the shipped grid.ms showed only 3-4 of 7 columns and
roughly a third of each month's day numbers: tbl's plain columns (no
w()) size to their widest single entry and never wrap, so a long
fallback slug (some run past 40 characters) forced every column that
wide, the table ran far past the page, and whatever fell past the
physical edge was gone, not merely ugly. groff exited 0 throughout
(warnings, not errors), so make check-templates reported OK on a broken
artefact.
Fixed both halves. (a) The table now fits: true landscape via gropdf's
own -P-pa4l (an in-document Xpapersize=a4l escape was tried and
rejected -- it does not rotate the page in this groff), ms's own title
macro widened back out after narrowing the line length for the title
text (a second, independent way the original lost its width, found by
reading s.tmac), and every column rewritten as a genuine tbl text-block
(T{/T}, not a plain w() cell -- w() alone does not wrap, confirmed
against tbl's own generated troff code) so long, hyphenated slugs wrap
at their own hyphens instead of forcing the column wider. (b)
check-templates now captures groff's stderr per template and fails the
target if it is non-empty, rather than trusting groff's exit code.
Verified: 0 warnings (was 12), pdftotext -layout shows all 7 columns and
every day number for all 12 months (was 3-4 columns, ~12-23 of each
month's day numbers). The golden fixture is regenerated: 0 "{{", 12
month headings, exactly one Ianuarius, and each week's block (now spread
across several physical lines by the T{/T} wrap) carries exactly 6 tabs
joining its 7 cells.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
LaTeX and groff are the print paths; HTML carries a print stylesheet;
AsciiDoc, Markdown and plain text are the plain-consumer paths.
AsciiDoc and Markdown use flavour none, and say so in a comment: their
metacharacters are context-dependent and escaping them aggressively
produces worse output than not escaping. The consequence is real and
documented -- a feast name containing * renders as emphasis.
Golden tests pin all six byte-for-byte for 2027. They prove the
templates RENDER, not that they TYPESET; compiling needs TeX and groff,
which is Task 13's opt-in make check-templates.
|