aboutsummaryrefslogtreecommitdiff
path: root/templates/ef/ordo.tex
diff options
context:
space:
mode:
Diffstat (limited to 'templates/ef/ordo.tex')
-rw-r--r--templates/ef/ordo.tex116
1 files changed, 79 insertions, 37 deletions
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}