| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Every ordo booklet week header used to print the month name again
even though the month heading right above it already established it
-- pure noise, repeated once per week for the whole year. All seven
ordo flavours now print the week's own Roman numeral plus the span of
dates it covers instead, e.g. "Hebdomada I (Ian 1-2)", with no month
name on the line; the LaTeX table of contents and the Typst outline
(built automatically from its own headings, so editing the heading is
the whole fix there) read the same way.
A single-day week (e.g. a lone trailing Sunday) renders "Ian 31", not
"Ian 31-31": each flavour's dash sits inside an inverted single_day
section, so the engine -- which cannot itself compare first_dom to
last_dom -- never has to decide anything, it only follows the data.
The dash character matches each flavour's own existing convention:
LaTeX/Typst's own "--" ligature, groff's \(en escape (alongside its
existing \(bu), HTML's – entity (alongside its existing
·), and a literal en dash for the three flavours with no
escaping (adoc/md/txt).
Every in-template comment describing the new fields is written without
ever typing two curly braces together, including in the two comments
this touches that used to embed a live {{month_name}}/{{term.week}}
tag pair inside a LaTeX % comment -- harmless only because that whole
line already started with %, not because the engine has any comment
awareness (it has none).
Goldens regenerated through test_render_golden.ml's own render path
(Test_view.view_of + Template.render_string), not the CLI -- the two
differ in default language and would otherwise pin output the test
suite never produces. Grid goldens are untouched, matching the grid
templates, which have no week header.
Verified against real pdflatex (two passes) and typst compile output,
not merely the golden pins: both flavours print "Hebdomada I (Ian
1-2)", "Hebdomada II (Ian 3-9)", "Hebdomada III (Ian 10-16)" as their
first three week headers and identical text in the table of
contents/outline, and both show "Hebdomada VI (Ian 31)" for January's
own trailing single-day week with no dash.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One week per page filled roughly the top third of every A5 page and
cost 65 pages for a year that needed far fewer -- the original
requirement, reversed here: a full 7-day week already occupies most
of an A5 page even at reduced type, so the real saving was always in
the year's many SHORT boundary weeks (a month's first/last week is
rarely a full seven days), not in packing two full weeks together.
lib/render/view.ml gains a [first] field on every week object (true
on a month's own first week, the same 'cheap flag beats invented
template logic' call [last] already made for grid rows) -- there is
still no {{../}} parent-path syntax for a template to test this any
other way.
ordo.tex: the per-week \clearpage is gone. Every week keeps its
existing small header line; the month's own first week additionally
prints a large, ruled banner. \needspace (a template-local LaTeX
dependency, not one of the frozen OCaml deps) keeps a header from
being stranded alone at a page's bottom -- and a real, separate bug
surfaced building it: \label placed BEFORE \needspace captured the
OLD page number when \needspace went on to force a break, producing
a step-stale \pageref in the TOC (fixed by moving \label after both
needspace checks). The day box itself is tightened (rank/colour
folded onto the same line as the citations -- an A5 box is far wider
than tall, so this fits even Holy Week's longest citations with room
to spare) so a second week routinely shares a page with the first.
Measured result: 65 -> 53 pages, two pdflatex passes still settle the
TOC, zero orphaned headers, zero overfull boxes.
ordo.typ: the per-week #pagebreak is gone; #show heading's own
block gains sticky:true, Typst's built-in answer to what ordo.tex
needs \needspace for. The month banner needed its OWN sticky:true,
found live: without it a banner could sit alone at a page's bottom
with the entire month pushed to the next page -- not caught by a
check for an orphaned HEADING, since the banner is plain markup, not
one. Measured result: 65 -> 27 pages (Typst's own page-fill packs
tighter than ordo.tex's needspace-driven approach), one compile pass,
zero orphans.
The five non-paginated flavours (ms/html/md/adoc/txt) never had a
forced page break to remove -- they mainly needed the same header
treatment for structural consistency: a week-level header nested
under each month's existing one, walking months>weeks>days (the
week's own padded, in-month-guarded day list) in place of the old
months>days flat loop. Verified against groff, asciidoctor and an
HTML parser -- zero warnings.
Goldens regenerated through the Test_view.view_of path
test_render_golden.ml itself uses, not the CLI (whose --lang default
would have pinned 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.
|
|
|
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.
|