diff options
Diffstat (limited to 'templates/ef')
| -rw-r--r-- | templates/ef/ordo.ms | 103 | ||||
| -rw-r--r-- | templates/ef/ordo.tex | 116 |
2 files changed, 169 insertions, 50 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}} diff --git a/templates/ef/ordo.tex b/templates/ef/ordo.tex index 4ffc9e9..434fb1e 100644 --- a/templates/ef/ordo.tex +++ b/templates/ef/ordo.tex @@ -17,13 +17,13 @@ % \needspace (a genuine, tiny dependency, not one of the deps this project % freezes at the OCaml level -- LaTeX packages are a template author's own % concern) keeps a header from being stranded alone at a page's bottom -% with its first day box pushed to the next one: 29mm covers the month -% banner's own rule+title (~11.5mm) plus the week header below it -% (~5.5mm) plus room for at least one day box (~10mm); 16mm covers just -% the week header plus one day box. Both re-verified against the actual -% typeset output, not derived from theory alone (the task report has the -% before/after page counts and a scan proving no header is ever left -% alone at a page's foot with nothing under it). +% with its first day box pushed to the next one: 18mm covers the month +% banner's own rule+title plus the week header below it plus room for at +% least one (now much shorter, see the density retune below) day box; +% 9mm covers just the week header plus one day box. Both re-verified +% against the actual typeset output, not derived from theory alone (the +% task report has the before/after page counts and a scan proving no +% header is ever left alone at a page's foot with nothing under it). % % \label fires AFTER both \needspace calls below, not before: a \label % placed before a \needspace that goes on to force a break captures the @@ -43,17 +43,57 @@ % page even at reduced size (measured: 55-65% of the text height for a % typical week, more with commemorations), so simply dropping the forced % per-week \clearpage only let the year's many PARTIAL boundary weeks -% double up, not full ones -- a real but small saving on its own. Three -% changes together fit a genuinely useful second (often third, on a short -% week) week onto the same page: \fontsize explicitly (not \scriptsize, -% whose 7pt/8.4pt leading is looser than a dense booklet needs), the -% feast name still a clearly-bolder 9pt, and rank/colour folded onto the -% SAME line as the citations rather than a line of its own -- an A5 box -% is far wider than it is tall (roughly 120mm of usable width here), so -% "I classis . albus Epistola ... Evangelium ..." fits with room to -% spare even on Holy Week's own longest citations (measured against the -% rendered output, not assumed; see the task report for the page count -% this bought). +% double up, not full ones -- a real but small saving on its own. Rank/ +% colour folded onto the SAME line as the citations rather than a line of +% its own -- an A5 box is far wider than it is tall (roughly 120mm of +% usable width here), so "I classis . albus Epistola ... Evangelium ..." +% fits with room to spare even on Holy Week's own longest citations +% (measured against the rendered output, not assumed). +% +% DENSITY RETUNE (matched to ordo.typ's own decisions, task: bring ordo.tex +% to Typst's density -- 53 pages/6.9 days-per-page down to 29 pages/12.6): +% the document's own base size drops from \normalsize (10pt) to an explicit +% 9pt/10.5 leading set once after \begin{document} (mirrors Typst's global +% #set text(size: 9pt)); within a day box the SAME size hierarchy Typst +% uses -- the day number and the feast name are BOTH the 9pt base (bold +% is what distinguishes them, not size, exactly as ordo.typ decided), the +% weekday name is 7pt, and every detail line (rank/colour/citations/ +% commemorations) is 6.5pt. +% +% The one genuinely non-obvious lesson from getting there (cost a full +% false-start): \fontsize{n}{lead}\selectfont 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 whatever \baselineskip +% is active in the OUTER scope at the point \\ actually executes, not the +% value the just-closed group asked for. This is not a stylistic +% preference; it was measured directly (a synthetic two-baselineskip test +% file, \fontsize{9}{9.7}...\\ in a closed group nested inside an OUTER +% \fontsize{9}{20}, produced an exact 20pt gap, not 9.7pt) and it is +% exactly the shape of bug the ORIGINAL (pre-retune) day box already had: +% every one of its \fontsize groups closed before its own \par, so the +% only thing actually controlling interline spacing throughout the whole +% box was the ambient \normalsize baselineskip (12pt at the old 10pt base) +% -- the box's own careful-looking 9pt/6.5pt \fontsize choices were, for +% LEADING purposes, inert. The fix used throughout below: \fontsize and +% \selectfont are issued INLINE (no enclosing group), immediately before +% the text they size, with \\ following in the SAME scope -- the size +% declared right before a line's own text is what governs the gap ABOVE +% that line, confirmed by the same synthetic test the other way (a 6.5pt/ +% 7pt declaration right before a small line tightens only that one gap). +% \bfseries/\mdseries are toggled the same inline way (no groups), which +% is why a stray unbalanced brace anywhere in this box would fail loudly +% at compile time rather than silently leak weight into later text. +% +% Two further, smaller finds while measuring the actual PDF, not assumed: +% tcolorbox's default rounded corners undercount a box's own true height +% when probed by scanning a fixed pixel column (the arc pulls the vertical +% edge away near each corner) -- \texttt{sharp corners} removes the +% ambiguity and, as a side effect, also matches Typst's own plain +% rectangular block() more closely. And \parskip is set to 0pt globally +% (\setlength{\parindent}{0pt} already was) since several day-box lines +% are still separate \LaTeX{} paragraphs (broken by \\, not \par, so this +% is defensive rather than load-bearing) and a nonzero default \parskip +% would otherwise add unpredictable glue between them. % % Every fixed string (headings, the Epistle/Gospel/Commemoration/Week % labels) comes from the view's term vocabulary rather than being written @@ -120,48 +160,50 @@ % alone cannot outline a filled rule. \newcommand{\swatch}[1]{\tikz[baseline=-0.6ex]{\fill[draw=black,line width=0.4pt,fill=#1] (0,0) rectangle (2.4ex,2.4ex);}} \pagestyle{fancy}\fancyhf{} -\fancyhead[C]{\small {{term.ordo}} {{year}} \textperiodcentered\ {{rite_name}}} -\fancyfoot[C]{\small\thepage} +\fancyhead[C]{\fontsize{8}{9}\selectfont {{term.ordo}} {{year}} \textperiodcentered\ {{rite_name}}} +\fancyfoot[C]{\fontsize{8}{9}\selectfont\thepage} \renewcommand{\headrulewidth}{0.4pt} \setlength{\parindent}{0pt} +\setlength{\parskip}{0pt} \begin{document} +\fontsize{9}{10.5}\selectfont \begin{center} -\Large\bfseries {{term.ordo}} {{year}}\\[2pt] -\normalsize\mdseries {{rite_name}} +\fontsize{18}{20}\selectfont\bfseries {{term.ordo}} {{year}}\\[2pt] +\fontsize{9}{10.5}\selectfont\mdseries {{rite_name}} \end{center} -\vspace{4mm} -{\bfseries {{term.contents}}}\par\vspace{2mm} -\begin{small} +\vspace{3mm} +{\bfseries {{term.contents}}}\par\vspace{1.5mm} +{\fontsize{8}{9.2}\selectfont {{#months}} \textbf{ {{name}} }\par {{#weeks}}\hspace*{4mm}{{term.week}} {{num_roman}} ({{month_abbr}} {{first_dom}}{{^single_day}}--{{last_dom}}{{/single_day}})\dotfill\pageref{w{{month_num}}-{{num}}}\par {{/weeks}} {{/months}} -\end{small} +} \clearpage {{#months}} {{#weeks}} {{#first}} -\needspace{29mm} -\vspace{2mm}\noindent\rule{\linewidth}{1pt}\par\vspace{0.8mm} -{\LARGE\bfseries {{month_name}} {{year}} }\par\vspace{1mm} +\needspace{18mm} +\vspace{1.5mm}\noindent\rule{\linewidth}{1pt}\par\vspace{0.6mm} +{\fontsize{15}{16.5}\selectfont\bfseries {{month_name}} {{year}} }\par\vspace{0.8mm} {{/first}} -\needspace{16mm} +\needspace{9mm} +\vspace{0.6mm} \label{w{{month_num}}-{{num}}} -{\bfseries\large {{term.week}} {{num_roman}} }{\small ({{month_abbr}} {{first_dom}}{{^single_day}}--{{last_dom}}{{/single_day}})}\par\vspace{0.5mm} +{\fontsize{12}{13}\selectfont\bfseries {{term.week}} {{num_roman}} ({{month_abbr}} {{first_dom}}{{^single_day}}--{{last_dom}}{{/single_day}})}\par\vspace{0.3mm} {{#days}} {{#in_month}} -\begin{tcolorbox}[colback=white,colframe=black!35,boxrule=0.3pt,left=1.4mm,right=1.4mm,top=0.2mm,bottom=0.2mm,before skip=0.2mm,after skip=0mm] -{\bfseries {{dom}} } \;{\fontsize{6.5}{7.4}\selectfont {{weekday}} }\hfill\swatch{licol{{colour}}}\par -{\fontsize{9}{10.2}\selectfont\bfseries {{name}} }\par -{\fontsize{6.5}{7.4}\selectfont {{rank_name}} \textperiodcentered\ {{colour_name}} {{#first}}\quad {{term.epistle}}\ {{first}} {{/first}}{{#gospel}}\quad {{term.gospel}}\ {{gospel}} {{/gospel}}} -{{#comms}}\par{\fontsize{6.5}{7.4}\selectfont {{term.commemoration}}\ {{name}} }{{/comms}} +\begin{tcolorbox}[colback=white,colframe=black!35,boxrule=0.3pt,sharp corners,boxsep=0mm,left=1.6mm,right=1.6mm,top=0.4mm,bottom=0.4mm,before skip=0.3mm,after skip=0mm] +\fontsize{9}{9}\selectfont\bfseries {{dom}} \fontsize{7}{9}\selectfont\mdseries\;{{weekday}}\hfill\swatch{licol{{colour}}}\\ +\fontsize{9}{9.7}\selectfont\bfseries {{name}}\\ +\fontsize{6.5}{7.4}\selectfont\mdseries {{rank_name}} \textperiodcentered\ {{colour_name}} {{#first}}\quad {{term.epistle}}\ {{first}} {{/first}}{{#gospel}}\quad {{term.gospel}}\ {{gospel}} {{/gospel}}{{#comms}}\\ +\fontsize{6.5}{7.4}\selectfont\mdseries {{term.commemoration}}\ {{name}}{{/comms}} \end{tcolorbox} {{/in_month}} {{/days}} -\vspace{1mm} {{/weeks}} {{/months}} \end{document} |
