diff options
Diffstat (limited to 'templates/ef/grid.tex')
| -rw-r--r-- | templates/ef/grid.tex | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/templates/ef/grid.tex b/templates/ef/grid.tex index 8f90372..9b7a3ef 100644 --- a/templates/ef/grid.tex +++ b/templates/ef/grid.tex @@ -32,6 +32,36 @@ % the last one, and the engine has no unless-last construct, so the flag % is data -- rendered only when NOT last. A trailing ampersand gives eight % columns for seven cells and pdflatex rejects the file outright. +% +% Border clipping, fixed: the original \daycell put \vfill directly inside +% the \cellh-tall parbox, so the rank line's own text sat flush against the +% box's bottom edge -- the identical edge \hline draws the cell's bottom +% rule along -- and printed as if sliced in half by the rule. The fix +% keeps the OUTER parbox exactly \cellh tall (every cell in a row must +% still be identical height, or the table stops being a grid), but nests a +% SECOND parbox inside it that is only \cellh minus \cellpad tall and +% carries the actual \vfill. That leaves a strip of \cellpad, genuinely +% blank, between the last line of content and the rule -- not merely +% smaller type or a hopeful \strut. \strut on both bottom lines is kept +% too, belt and suspenders, so a line with no descenders still reserves a +% descender's worth of depth. +% +% Sigla, compactly: each cell also carries the day's Epistle and Gospel +% references (view fields first/gospel), joined by a centred dot rather +% than repeating "Ep."/"Ev." labels -- the same choice ordo.tex already +% made between rank_name and colour_name, kept consistent rather than +% invented a second way. A cell is only about 3.5cm wide, and Holy Week's +% own citations run to 20-30 characters each (a Passion narrative spanning +% several chapters), so "rank_name . first . gospel" does not fit one +% \tiny line together in the worst case -- measured against the rendered +% width, not assumed. The rank line and the sigla therefore get their OWN +% line each rather than being crammed onto one and shrunk past \tiny: +% \cellh leaves ample vertical room (about eleven \tiny lines per cell), +% so two short lines cost far less than illegible type would. Both first +% and gospel are wrapped in their own conditional section (mirroring +% ordo.tex's own idiom) so a day missing either (there is none in the +% shipped EF lectionary, but a future rite or overlay is not guaranteed to +% keep that invariant) prints no stray separator. \documentclass[11pt,landscape]{article} \usepackage[a4paper,margin=10mm]{geometry} \usepackage[T1]{fontenc} @@ -51,14 +81,23 @@ % for why a fixed row height, not \arraystretch, is what makes this work. \newlength{\cellw}\setlength{\cellw}{\dimexpr(\textwidth-14\tabcolsep-8\arrayrulewidth)/7\relax} \newlength{\cellh}\setlength{\cellh}{\dimexpr(\textheight-18mm)/6\relax} -\newcommand{\daycell}[3]{\parbox[t][\cellh][t]{\cellw}{\raggedright\textbf{#1}\ \footnotesize #2\par\vfill\tiny #3}} +\newlength{\cellpad}\setlength{\cellpad}{1.5mm} +\newcommand{\daycell}[4]{% + \parbox[t][\cellh][t]{\cellw}{% + \parbox[t][\dimexpr\cellh-\cellpad\relax][t]{\cellw}{% + \raggedright\textbf{#1}\ \footnotesize #2\par\vfill + \tiny #3\strut\par + \tiny #4\strut + }% + }% +} \begin{document} {{#months}} {\LARGE\bfseries {{name}} {{year}}}\par\vspace{2mm} \renewcommand{\arraystretch}{1} \begin{tabular}{|*{7}{p{\cellw}|}}\hline {{#weekday_headings}}\textbf{ {{name}} }{{^last}} & {{/last}}{{/weekday_headings}} \\ \hline -{{#weeks}}{{#days}}{{#in_month}}\cellcolor{c{{colour}}}\daycell{ {{dom}} }{ {{name}} }{ {{rank_name}} }{{/in_month}}{{^last}} & {{/last}}{{/days}} \\ \hline +{{#weeks}}{{#days}}{{#in_month}}\cellcolor{c{{colour}}}\daycell{ {{dom}} }{ {{name}} }{ {{rank_name}} }{ {{#first}}{{first}}{{/first}}{{#gospel}}{{#first}}\ \textperiodcentered\ {{/first}}{{gospel}}{{/gospel}} }{{/in_month}}{{^last}} & {{/last}}{{/days}} \\ \hline {{/weeks}} \end{tabular} \clearpage |
