diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-20 12:47:29 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-20 12:47:47 +0200 |
| commit | aaca1304e9d00880b016d14529cf3809bd98fe39 (patch) | |
| tree | df6b1fcef4edb50277a3c312854033eaaf04b89b /templates/ef/ordo.ms | |
| parent | 900d1d781e62a08a1bda1285c8e8611a7baa0f2f (diff) | |
| download | colitur-aaca1304e9d00880b016d14529cf3809bd98fe39.tar.gz colitur-aaca1304e9d00880b016d14529cf3809bd98fe39.zip | |
feat(templates): retune ordo.tex to ordo.typ's density, fix ordo.ms's own
ordo.tex was 53 pages / 6.9 days-per-page on 2027 against ordo.typ's 27
pages / 13.5 -- the user prefers the tighter Typst booklet. Read ordo.typ's
own typographic decisions (base size, the day-number/name/detail-line size
hierarchy, box padding, inter-box skip, leading) and matched them: an
explicit 9pt/10.5 base (was \normalsize, 10pt), the day number and feast
name both 9pt bold (bold distinguishes them, not size, as ordo.typ decided),
7pt weekday, 6.5pt detail lines, sharp-cornered boxes, and needspace amounts
re-measured for the shorter boxes. Result: 29 pages / 12.6 days-per-page --
within the "a page or two of 27" target, reached without sacrificing
legibility (verified against the rendered PDF, not assumed).
The one real gotcha: \fontsize set inside a brace group that closes before
the line-ending \\ has no effect on the interline glue TeX inserts for that
break -- the glue uses the OUTER scope's \baselineskip, not the just-closed
group's. This is exactly the shape of bug the pre-retune box already had
(every \fontsize group closed before its own \par), which is why the first
retune pass barely moved the page count. Fixed by declaring \fontsize/
\selectfont/\bfseries/\mdseries inline, ungrouped, immediately before the
text each governs. Recorded in the file's own header for next time.
ordo.ms looked comparatively fine (43 pages) but was rendering on A4, not
A5 -- roughly double an A5 page's area, so normalised for area it was
already looser than ordo.tex's own pre-retune baseline. Fixed, each found
by rendering and reading the real PDF rather than assumed: added -P-pa5 to
the Makefile's groff invocation (mirroring grid.ms's existing -P-pa4l);
fixed the day box reading the RAW rank/colour strings (class-2, green)
instead of the resolved Latin pair (rank_name/colour_name) -- exactly the
"printed slugs" defect the ordo rebuild's own commit message named, which
this file had regressed to; added -Kutf8 (groff's default input encoding
produced visible mojibake on an accented Latin name); tightened fonts/
leading the same way as ordo.tex; found and fixed a stray-blank-line bug
present since the file's original authoring (every day/week/month boundary
left an accidental blank template line, read by groff as its own extra
.sp); found and fixed a genuine print-safety bug (text sitting 0.13mm from
the true page edge -- .pl, groff's text page length, is independent of
-P-pa5's device paper selection and needed matching explicitly before ms's
own FM-based bottom margin would fire at all); and added a .ne guard so a
week header can no longer be stranded alone at a page's foot. Net: 43 pages
(A4, broken) to 39 pages (real A5, print-safe, real Latin names, correct
encoding, zero orphans) -- no numeric target set for this flavour, but no
lower number was reachable without leaving one of the above unfixed.
ordo.html and every grid.* flavour are untouched, as scoped.
Both golden/ordo-2027.{tex,ms} regenerated through the real test harness
path (Test_support's loaders + Test_view's en-with-la-fallback view_of),
not the CLI, whose own --lang default (la) differs from the harness's and
would have pinned content the suite never produces.
Full suite green: 503 tests (504 with the exhaustive sweep). make
check-templates/check-schema/check-citations all clean.
Diffstat (limited to 'templates/ef/ordo.ms')
| -rw-r--r-- | templates/ef/ordo.ms | 103 |
1 files changed, 90 insertions, 13 deletions
diff --git a/templates/ef/ordo.ms b/templates/ef/ordo.ms index 1035a0d..3090bc1 100644 --- a/templates/ef/ordo.ms +++ b/templates/ef/ordo.ms @@ -19,25 +19,102 @@ .\" is its own Roman numeral plus the span of in-month dates it covers .\" (e.g. Hebdomada I (Ian 1-2)), not the month name again -- the month's .\" own .SH heading above already establishes it once. +.\" +.\" Density retune (see ordo.tex's own header for the full before/after +.\" account of the same exercise): several separate, independently- +.\" verified fixes below, not one -- the page geometry, the raw-slug +.\" fields, the actual font/leading tightening, a text-column overflow, +.\" a bottom margin that measured 0.13mm on the real page, and a page +.\" break landing inside a week's own header line, each found only by +.\" rendering and reading the real PDF, never by reasoning about the +.\" source alone. +.\" +.\" First, the page itself was never A5. The rebuild that gave every other +.\" flavour a framed A5 booklet (commit feat(templates): the ordo booklet, +.\" rebuilt) never actually set groff's own page geometry for this one -- +.\" the default PDF device paper is Letter/A4-ish, roughly twice an A5 +.\" page's area, so the old days-per-page figure looked far better than it +.\" was: normalised for area it was already looser than ordo.tex's own +.\" pre-retune 53-page baseline, not merely comparable to it. Fixed the +.\" same way grid.ms already fixes its own device paper size -- a +.\" -P-p<name> flag at the groff invocation (Makefile's check-templates +.\" target), not a change in this file, since that is the one existing, +.\" precedented mechanism this codebase already uses for a groff flavour's +.\" page geometry (grid.ms's own -P-pa4l). +.\" +.\" Second, the day's rank/colour fields were reading the RAW internal +.\" strings (class-2, green), not the resolved Latin display names -- +.\" lib/render/view.ml +.\" carries both a raw field and its lang-resolved twin (rank_name, +.\" colour_name) for exactly this reason, and ordo.tex/ordo.typ both +.\" already read the resolved pair. The same rebuild commit's own message +.\" names this defect outright ("the previous version... printed slugs... +.\" was not usable as a printed booklet") -- this file had regressed to +.\" exactly that, undetected because nothing renders groff to a PDF and +.\" reads it in this project's own test suite (Layer paints over the check +.\" -templates target catches a FAILED build, never a wrong but +.\" successfully-produced one). Fixed below by reading the resolved pair +.\" instead of the raw one. +.\" NOTE: this file's own framed-box-and-swatch promise from that same +.\" rebuild commit is STILL not built for this flavour -- groff has no +.\" equivalent of tcolorbox/Typst's block() reached for here, and adding +.\" one is a real feature, not a density fix; out of THIS task's scope, +.\" left for a future one. +.\" +.\" Third, the actual density tightening: an explicit 9pt/10.5 base size +.\" and leading (was groff -ms's own default ~10pt/12pt), a tighter +.\" paragraph distance between day entries, and the citation/commemoration +.\" lines dropped from a relative \s-2 step (whatever the ambient size +.\" happens to be) to an explicit 7pt -- the same "explicit small sizes, +.\" not relative steps off a base" choice ordo.typ made and ordo.tex's own +.\" retune adopted, for the same reason: a relative step silently rides +.\" whatever the surrounding size is, which is exactly what made the +.\" original ordo.tex's own \small/\scriptsize idiom impossible to reason +.\" about. +.\" -P-pa5 (Makefile) only sets the PHYSICAL device page -- ms's own text +.\" area (po/ll, the page offset and line length) still defaults to a +.\" Letter/A4-width column regardless, so a wide line (the .TL title +.\" below is the worst case, but any long citation could do it) overflows +.\" past the real A5 edge unless set explicitly here too; found by +.\" reading the actual rendered PDF, not assumed. +.po 1.4c +.ll 12.4c +.\" .pl (text page length) otherwise stays at ms's OWN pre-A5 default +.\" (it is not derived from -P-pa5 -- that flag only tells the PDF +.\" DEVICE which physical sheet to draw on, groff's own docs are explicit +.\" that .pl is independent of it) -- found by measuring the rendered +.\" PDF directly: the last content line on a full page sat 0.13mm from +.\" the true page edge, not merely tight but genuinely unprintable on a +.\" real press. Matching .pl to the real A5 height is what makes ms's +.\" own FM (footer margin) register -- s.tmac's \n[FM]-from-the-bottom +.\" trap -- land somewhere on the actual page at all; FM alone, tried +.\" first, measurably did nothing (three different values, identical +.\" output) until .pl agreed with reality. +.pl 21c +.nr FM 1.2c +.nr PS 9 +.nr VS 10.5 +.ps 9 +.vs 10.5 +.PD 0.3v .TL {{term.ordo}} {{year}} \(bu {{rite_name}} -{{#months}} -.SH +.ps 9 +.vs 10.5 +{{#months}}.SH {{name}} -{{#weeks}} +{{#weeks}}.ne 7v .LP -\fB{{term.week}} {{num_roman}} ({{month_abbr}} {{first_dom}}{{^single_day}}\(en{{last_dom}}{{/single_day}})\fR -{{#days}}{{#in_month}} +\s(11\fB{{term.week}} {{num_roman}} ({{month_abbr}} {{first_dom}}{{^single_day}}\(en{{last_dom}}{{/single_day}})\fR\s9 +{{#days}}{{#in_month}}.sp 0.25v .IP "{{dom}}" 4 -{{name}} +\fB{{name}}\fR .br -\s-2{{rank}} \(bu {{colour}}\s+2 +\s7{{rank_name}} \(bu {{colour_name}}\s9 {{#first}}.br -\s-2{{term.epistle}} {{first}}\s+2 +\s7{{term.epistle}} {{first}}\s9 {{/first}}{{#gospel}}.br -\s-2{{term.gospel}} {{gospel}}\s+2 +\s7{{term.gospel}} {{gospel}}\s9 {{/gospel}}{{#comms}}.br -\s-2{{term.commemoration}} {{name}}\s+2 -{{/comms}}{{/in_month}}{{/days}} -{{/weeks}} -{{/months}} +\s7{{term.commemoration}} {{name}}\s9 +{{/comms}}{{/in_month}}{{/days}}{{/weeks}}{{/months}} |
