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 /Makefile | |
| 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 'Makefile')
| -rw-r--r-- | Makefile | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -53,6 +53,18 @@ check-schema: build ## validate emitted XML against schema/colitur-v1.xsd (needs # deps), so absence is printed LOUDLY as SKIPPED rather than silently # treated as a pass -- a silent skip reads as a pass, which is the whole # failure mode this guards against. +# +# ordo.ms's own -P-pa5 (added alongside grid.ms's existing -P-pa4l, the +# same mechanism, not a new one) and -Kutf8 (both flavours) fix two +# defects this target's own "did it TYPESET" check could never see on its +# own: groff's default PDF device paper is not A5 (so the booklet was +# roughly twice the intended page area -- half a real density problem +# was hiding in the page, not the type) and groff's default input +# encoding is not UTF-8 (so an accented Latin name like Pe\(~nafort +# rendered as visibly wrong characters) -- neither one is a groff +# WARNING, so this target's own "any stderr is a failure" check was +# silently green through both. Rendering to an actual PDF and reading it +# is what caught them; a byte-identical-to-golden pass would not have. check-templates: build ## typeset every shipped template (needs pdflatex/groff/typst; skipped per-tool if absent) @ok=1; \ if command -v pdflatex >/dev/null 2>&1; then \ @@ -68,9 +80,10 @@ check-templates: build ## typeset every shipped template (needs pdflatex/groff/t for t in ordo grid; do \ gflags=""; \ [ "$$t" = grid ] && gflags="-P-pa4l"; \ + [ "$$t" = ordo ] && gflags="-P-pa5"; \ if opam exec -- dune exec colitur -- table --year 2027 --template templates/ef/$$t.ms \ > /tmp/$$t.ms 2>/tmp/$$t-render.err; then \ - groff -ms -t -Tpdf $$gflags /tmp/$$t.ms > /tmp/$$t-ms.pdf 2>/tmp/$$t-ms.warnings; \ + groff -ms -t -Tpdf -Kutf8 $$gflags /tmp/$$t.ms > /tmp/$$t-ms.pdf 2>/tmp/$$t-ms.warnings; \ if [ -s /tmp/$$t-ms.warnings ]; then \ echo "groff: $$t.ms FAILED (groff exits 0 on a tbl/troff warning -- this target"; \ echo " treats ANY stderr output as a failure, since a warning here has meant"; \ |
