diff options
Diffstat (limited to 'templates/ef')
| -rw-r--r-- | templates/ef/ordo.adoc | 23 | ||||
| -rw-r--r-- | templates/ef/ordo.html | 25 | ||||
| -rw-r--r-- | templates/ef/ordo.md | 23 | ||||
| -rw-r--r-- | templates/ef/ordo.ms | 25 | ||||
| -rw-r--r-- | templates/ef/ordo.tex | 99 | ||||
| -rw-r--r-- | templates/ef/ordo.txt | 10 |
6 files changed, 137 insertions, 68 deletions
diff --git a/templates/ef/ordo.adoc b/templates/ef/ordo.adoc index 13d09ec..3146f2e 100644 --- a/templates/ef/ordo.adoc +++ b/templates/ef/ordo.adoc @@ -4,22 +4,25 @@ // A feast name containing `*` or `_` will render as emphasis. That is a // documented limitation, not a bug to fix. // -// Day label falls back to the slug when the day carries no Latin name (most -// temporal days, and most sanctoral entries, which are Latin-less in the -// shipped data) -- see ordo.tex's own comment for why the fallback is -// written as a name-section wrapping a plain var and its inverse, rather -// than a single dotted lookup and its inverse. -= Ordo {{year}} · {{rite}} +// The observed day's own display name is a PLAIN resolved string +// (View.of_days, Task 5), not a lang-keyed object -- there is no +// dotted-la-with-slug-fallback idiom to write here any more; a +// commemoration entry carries its own resolved display name too, so a +// commemoration line no longer prints the bare slug. Every fixed label +// (Ordo, Epistle, Gospel, Commemoration) comes from the view's term +// vocabulary rather than being written into this file, so a translated +// booklet needs no template edit. += {{term.ordo}} {{year}} · {{rite}} :toc: {{#months}} -== {{name.la}} +== {{name}} {{#days}} -*{{dom}}* {{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}} + +*{{dom}}* {{name}} + {{rank}} · {{colour}} + -{{#first}}Ep. {{first}} {{/first}}{{#gospel}}Ev. {{gospel}}{{/gospel}} +{{#first}}{{term.epistle}} {{first}} {{/first}}{{#gospel}}{{term.gospel}} {{gospel}}{{/gospel}} {{#comms}} + -Com. {{slug}}{{/comms}} +{{term.commemoration}} {{name}}{{/comms}} {{/days}}{{/months}} diff --git a/templates/ef/ordo.html b/templates/ef/ordo.html index e516816..3353000 100644 --- a/templates/ef/ordo.html +++ b/templates/ef/ordo.html @@ -1,12 +1,15 @@ <!-- colitur ordo booklet -- HTML. flavour: html --> -<!-- Day label falls back to the slug when the day carries no Latin name - (most temporal days, and most sanctoral entries, which are Latin-less - in the shipped data) -- see ordo.tex's own comment for why the fallback - is written as a name-section wrapping a plain var and its inverse, - rather than a single dotted lookup and its inverse. --> +<!-- The observed day's own display name is a PLAIN resolved string + (View.of_days, Task 5), not a lang-keyed object -- there is no + dotted-la-with-slug-fallback idiom to write here any more; a + commemoration entry carries its own resolved display name too, so a + commemoration line no longer prints the bare slug. Every fixed label + (Ordo, Epistle, Gospel, Commemoration) comes from the view's term + vocabulary rather than being written into this file, so a translated + booklet needs no template edit. --> <!doctype html> <html lang="la"><head><meta charset="utf-8"> -<title>Ordo {{year}}</title> +<title>{{term.ordo}} {{year}}</title> <style> body{font-family:serif;max-width:40em;margin:2em auto;line-height:1.4} .day{margin:.6em 0;padding-left:2.5em;text-indent:-2.5em} @@ -17,12 +20,12 @@ .rose{border-left:4px solid #e7a} .black{border-left:4px solid #000} @media print{body{margin:0}} </style></head><body> -<h1>Ordo {{year}} · {{rite}}</h1> -{{#months}}<h2>{{name.la}}</h2> +<h1>{{term.ordo}} {{year}} · {{rite}}</h1> +{{#months}}<h2>{{name}}</h2> {{#days}}<div class="day {{colour}}"> - <span class="dom">{{dom}}</span>{{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}} - <div class="meta">{{rank}} · {{colour}}{{#first}} · Ep. {{first}}{{/first}}{{#gospel}} · Ev. {{gospel}}{{/gospel}}</div> - {{#comms}}<div class="meta">Com. {{slug}}</div>{{/comms}} + <span class="dom">{{dom}}</span>{{name}} + <div class="meta">{{rank}} · {{colour}}{{#first}} · {{term.epistle}} {{first}}{{/first}}{{#gospel}} · {{term.gospel}} {{gospel}}{{/gospel}}</div> + {{#comms}}<div class="meta">{{term.commemoration}} {{name}}</div>{{/comms}} </div> {{/days}}{{/months}} </body></html> diff --git a/templates/ef/ordo.md b/templates/ef/ordo.md index 606ea01..805bf67 100644 --- a/templates/ef/ordo.md +++ b/templates/ef/ordo.md @@ -3,21 +3,24 @@ so this template's flavour deliberately does NOT escape interpolated values. A feast name containing `*` or `_` will render as emphasis. That is a documented limitation, not a bug to fix. --> -<!-- Day label falls back to the slug when the day carries no Latin name - (most temporal days, and most sanctoral entries, which are Latin-less - in the shipped data) -- see ordo.tex's own comment for why the fallback - is written as a name-section wrapping a plain var and its inverse, - rather than a single dotted lookup and its inverse. --> -# Ordo {{year}} · {{rite}} +<!-- The observed day's own display name is a PLAIN resolved string + (View.of_days, Task 5), not a lang-keyed object -- there is no + dotted-la-with-slug-fallback idiom to write here any more; a + commemoration entry carries its own resolved display name too, so a + commemoration line no longer prints the bare slug. Every fixed label + (Ordo, Epistle, Gospel, Commemoration) comes from the view's term + vocabulary rather than being written into this file, so a translated + booklet needs no template edit. --> +# {{term.ordo}} {{year}} · {{rite}} {{#months}} -## {{name.la}} +## {{name}} {{#days}} -**{{dom}}** {{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}} -`{{rank}}` · {{colour}}{{#first}} · Ep. {{first}}{{/first}}{{#gospel}} · Ev. {{gospel}}{{/gospel}} +**{{dom}}** {{name}} +`{{rank}}` · {{colour}}{{#first}} · {{term.epistle}} {{first}}{{/first}}{{#gospel}} · {{term.gospel}} {{gospel}}{{/gospel}} {{#comms}} -- Com. {{slug}} +- {{term.commemoration}} {{name}} {{/comms}} {{/days}}{{/months}} diff --git a/templates/ef/ordo.ms b/templates/ef/ordo.ms index db9b9fc..88dcb6c 100644 --- a/templates/ef/ordo.ms +++ b/templates/ef/ordo.ms @@ -1,27 +1,30 @@ .\" colitur ordo booklet -- groff ms. flavour: groff .\" Build: colitur table --year 2027 --template ordo.ms | groff -ms -Tpdf > ordo.pdf .\" -.\" Day label falls back to the slug when the day carries no Latin name (most -.\" temporal days, and most sanctoral entries, which are Latin-less in the -.\" shipped data) -- see ordo.tex's own comment for why the fallback is -.\" written as a name-section wrapping a plain var and its inverse, rather -.\" than a single dotted lookup and its inverse. +.\" The observed day's own display name is a PLAIN resolved string +.\" (View.of_days, Task 5), not a lang-keyed object -- there is no +.\" dotted-la-with-slug-fallback idiom to write here any more; a +.\" commemoration entry carries its own resolved display name too, so a +.\" commemoration line no longer prints the bare slug. Every fixed label +.\" (Ordo, Epistle, Gospel, Commemoration) comes from the view's term +.\" vocabulary rather than being written into this file, so a translated +.\" booklet needs no template edit. .TL -ORDO {{year}} \(bu {{rite}} +{{term.ordo}} {{year}} \(bu {{rite}} {{#months}} .SH -{{name.la}} +{{name}} .LP {{#days}} .IP "{{dom}}" 4 -{{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}} +{{name}} .br \s-2{{rank}} \(bu {{colour}}\s+2 {{#first}}.br -\s-2Ep. {{first}}\s+2 +\s-2{{term.epistle}} {{first}}\s+2 {{/first}}{{#gospel}}.br -\s-2Ev. {{gospel}}\s+2 +\s-2{{term.gospel}} {{gospel}}\s+2 {{/gospel}}{{#comms}}.br -\s-2Com. {{slug}}\s+2 +\s-2{{term.commemoration}} {{name}}\s+2 {{/comms}}{{/days}} {{/months}} diff --git a/templates/ef/ordo.tex b/templates/ef/ordo.tex index 6012753..c4a15d1 100644 --- a/templates/ef/ordo.tex +++ b/templates/ef/ordo.tex @@ -1,33 +1,90 @@ % colitur ordo booklet -- LaTeX. flavour: latex -% Build: colitur table --year 2027 --template ordo.tex > ordo.tex && pdflatex ordo.tex +% Build: colitur table --year 2027 --template ordo.tex > ordo.tex && pdflatex ordo.tex && +% pdflatex ordo.tex (twice, so \pageref in the table of contents settles) % -% Day label falls back to the slug when the day carries no Latin name (most -% temporal days, and most sanctoral entries, which are Latin-less in the -% shipped data). The fallback is written as a name-section wrapping a plain -% var and its inverse, deliberately NOT as a single dotted-path lookup -% followed by its own inverse: a dotted lookup that misses climbs to the -% enclosing scope for the WHOLE path, and the month object also carries a -% same-named key one level up, so the naive form would render the month's -% own Latin name on every day lacking one, and never fall back at all. -\documentclass[10pt,twoside]{article} -\usepackage[a5paper,margin=15mm]{geometry} +% A5, one week per page, each day in a framed box with a colour swatch. Every +% fixed string (headings, the Epistle/Gospel/Commemoration/Week labels) +% comes from the view's term vocabulary rather than being written into this +% file, so a translated booklet needs no template edit -- only a different +% --lang. +% +% The observed day's own display name is a PLAIN resolved string +% (View.of_days, Task 5), never a lang-keyed object -- there is no +% dotted-la-with-slug-fallback idiom to write here at all; a day with no +% name in the shipped data still resolves to something printable (its slug, +% under --raw, or the lang table's own miss-echoes-the-key behaviour), so +% the plain name field alone is always enough. +% +% The engine has no parent-path syntax: nested inside a month's own week +% loop, a bare week-number reference finds the WEEK's own number, and there +% is no way to reach the enclosing month's from there. That is why each +% week object carries its own month number and month name fields +% (lib/render/view.ml, Task 5) -- used throughout below instead of a +% parent-path reference, which this engine cannot express. +% +% This template's own %-comments are plain text to the engine: it has no +% awareness of LaTeX's comment syntax, and a stray double-brace pair inside +% one would still be parsed as a tag -- which is why this whole header is +% deliberately written without ever typing two curly braces next to each +% other, even to name a field. +\documentclass[10pt]{article} +\usepackage[a5paper,top=11mm,bottom=12mm,inner=14mm,outer=10mm]{geometry} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} +\usepackage{xcolor} +\usepackage{tikz} +\usepackage{tcolorbox} \usepackage{fancyhdr} -\pagestyle{fancy} -\fancyhead[C]{ORDO {{year}} \textperiodcentered\ {{rite}}} +\usepackage[hidelinks]{hyperref} +\definecolor{licolwhite}{HTML}{FFFFFF} +\definecolor{licolred}{HTML}{C1272D} +\definecolor{licolgreen}{HTML}{2E7D32} +\definecolor{licolviolet}{HTML}{6A1B9A} +\definecolor{licolrose}{HTML}{E91E8C} +\definecolor{licolblack}{HTML}{000000} +% A framed square, always outlined in black regardless of fill -- so white +% (and, on a black background page, black) still reads as a swatch rather +% than a gap. tikz (a tcolorbox dependency already) draws the border; xcolor +% 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}}} +\fancyfoot[C]{\small\thepage} +\renewcommand{\headrulewidth}{0.4pt} \setlength{\parindent}{0pt} \begin{document} + +\begin{center} +\Large\bfseries {{term.ordo}} {{year}}\\[2pt] +\normalsize\mdseries {{rite}} +\end{center} +\vspace{4mm} +{\bfseries {{term.contents}}}\par\vspace{2mm} +\begin{small} {{#months}} -\section*{ {{name.la}} } -{{#days}} -\textbf{ {{dom}} } \quad {{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}}\\ -\small {{rank}} \textperiodcentered\ {{colour}}\\ -{{#first}}\small Ep. {{first}}\quad{{/first}}{{#gospel}}\small Ev. {{gospel}}{{/gospel}}\\ -{{#comms}}\small Com. {{slug}}\\ -{{/comms}} -\medskip +\textbf{ {{name}} }\par +{{#weeks}}\hspace*{4mm}{{term.week}} {{num}}\dotfill\pageref{w{{month_num}}-{{num}}}\par +{{/weeks}} +{{/months}} +\end{small} +\clearpage +{{#months}} +{{#weeks}} +\label{w{{month_num}}-{{num}}} +{\bfseries\large {{month_name}} }\hfill{\small {{term.week}} {{num}}}\par\vspace{0.5mm} +{{#days}} +{{#in_month}} +\begin{tcolorbox}[colback=white,colframe=black!35,boxrule=0.4pt,left=1.6mm,right=1.6mm,top=0.4mm,bottom=0.4mm,before skip=0.5mm,after skip=0mm] +{\bfseries {{dom}} } \;\; {\scriptsize {{weekday}} } \hfill \swatch{licol{{colour}}}\par +{\bfseries {{name}} }\par +{\scriptsize {{rank_name}} \textperiodcentered\ {{colour_name}} }\par +{{#first}}{\scriptsize {{term.epistle}}\ {{first}} }\quad{{/first}}{{#gospel}}{\scriptsize {{term.gospel}}\ {{gospel}} }{{/gospel}} +{{#comms}}\par{\scriptsize {{term.commemoration}}\ {{name}} }{{/comms}} +\end{tcolorbox} +{{/in_month}} {{/days}} +\clearpage +{{/weeks}} {{/months}} \end{document} diff --git a/templates/ef/ordo.txt b/templates/ef/ordo.txt index aba121a..3301652 100644 --- a/templates/ef/ordo.txt +++ b/templates/ef/ordo.txt @@ -1,10 +1,10 @@ {{#months}} -{{name.la}} {{year}} +{{name}} {{year}} {{#days}} -{{dom}} {{slug}} +{{dom}} {{name}} {{rank}} · {{colour}} -{{#first}} Ep. {{first}} -{{/first}}{{#gospel}} Ev. {{gospel}} -{{/gospel}}{{#comms}} Com. {{slug}} +{{#first}} {{term.epistle}} {{first}} +{{/first}}{{#gospel}} {{term.gospel}} {{gospel}} +{{/gospel}}{{#comms}} {{term.commemoration}} {{name}} {{/comms}}{{/days}} {{/months}} |
