diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/ef/grid.html | 35 | ||||
| -rw-r--r-- | templates/ef/grid.ms | 25 | ||||
| -rw-r--r-- | templates/ef/grid.tex | 35 |
3 files changed, 95 insertions, 0 deletions
diff --git a/templates/ef/grid.html b/templates/ef/grid.html new file mode 100644 index 0000000..b92e14a --- /dev/null +++ b/templates/ef/grid.html @@ -0,0 +1,35 @@ +<!-- colitur wall calendar -- 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 enclosing month + object also carries its own name.la, and a dotted lookup that misses + climbs the WHOLE path to that outer scope instead of falling back. --> +<!doctype html> +<html lang="la"><head><meta charset="utf-8"> +<title>Calendarium {{year}}</title> +<style> + body{font-family:sans-serif;margin:1em} + table{border-collapse:collapse;width:100%;margin-bottom:1.5em;page-break-inside:avoid} + caption{font-size:1.2em;font-weight:bold;padding:.4em} + th{font-size:.8em;padding:.2em;border-bottom:1px solid #999} + td{border:1px solid #ddd;vertical-align:top;height:5em;width:14.28%;padding:.2em;font-size:.75em} + td.pad{background:#fafafa;border-color:#eee} + .dom{font-weight:bold;display:block} + .white{background:#fff} .red{background:#fdd} .green{background:#dfd} + .violet{background:#eae} .rose{background:#fde} .black{background:#ddd} + @media print{@page{size:landscape}body{margin:0}} +</style></head><body> +<h1>Calendarium {{year}} · {{rite}}</h1> +{{#months}} +<table> + <caption>{{name.la}}</caption> + <tr><th>Dom</th><th>Lun</th><th>Mar</th><th>Mer</th><th>Iov</th><th>Ven</th><th>Sab</th></tr> + {{#weeks}}<tr> + {{#days}}{{#in_month}}<td class="{{colour}}"><span class="dom">{{dom}}</span>{{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}}</td>{{/in_month}}{{^in_month}}<td class="pad"></td>{{/in_month}}{{/days}} + </tr> + {{/weeks}} +</table> +{{/months}} +</body></html> diff --git a/templates/ef/grid.ms b/templates/ef/grid.ms new file mode 100644 index 0000000..0ec2fb3 --- /dev/null +++ b/templates/ef/grid.ms @@ -0,0 +1,25 @@ +.\" colitur wall calendar -- groff ms with tbl. flavour: groff +.\" Build: colitur table --year 2027 --template grid.ms | groff -ms -t -Tpdf > grid.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. +.\" +.\" Every cell also carries a last flag, true on the seventh of its row: tbl +.\" needs the tab separator BETWEEN columns, not after the last one, and the +.\" engine has no unless-last construct, so the flag comes from data. +.TL +Calendarium {{year}} \(bu {{rite}} +{{#months}} +.SH +{{name.la}} +.TS +allbox; +c c c c c c c +l l l l l l l. +Dom Lun Mar Mer Iov Ven Sab +{{#weeks}}{{#days}}{{#in_month}}{{dom}} {{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}}{{/in_month}}{{^last}} {{/last}}{{/days}} +{{/weeks}}.TE +{{/months}} diff --git a/templates/ef/grid.tex b/templates/ef/grid.tex new file mode 100644 index 0000000..51432e9 --- /dev/null +++ b/templates/ef/grid.tex @@ -0,0 +1,35 @@ +% colitur wall calendar -- LaTeX. flavour: latex +% Build: colitur table --year 2027 --template grid.tex > grid.tex && pdflatex grid.tex +% +% 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. +% +% Every cell also carries a last flag, true on the seventh of its row: the +% engine has no unless-last construct, so the separator BETWEEN cells comes +% from data, not the template. A trailing separator on every cell would give +% eight columns for seven and pdflatex would reject the file outright. +\documentclass[10pt,landscape]{article} +\usepackage[a4paper,margin=10mm]{geometry} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[table]{xcolor} +\definecolor{lwhite}{HTML}{FFFFFF}\definecolor{lred}{HTML}{FFDDDD} +\definecolor{lgreen}{HTML}{DDFFDD}\definecolor{lviolet}{HTML}{EEAAEE} +\definecolor{lrose}{HTML}{FFDDEE}\definecolor{lblack}{HTML}{DDDDDD} +\begin{document} +{{#months}} +\section*{ {{name.la}} {{year}} } +\begin{tabular}{|p{2.6cm}|p{2.6cm}|p{2.6cm}|p{2.6cm}|p{2.6cm}|p{2.6cm}|p{2.6cm}|} +\hline Dom & Lun & Mar & Mer & Iov & Ven & Sab \\ \hline +{{#weeks}}{{#days}}{{#in_month}}\cellcolor{l{{colour}}}\textbf{ {{dom}} } \footnotesize {{#name}}{{la}}{{^la}}{{slug}}{{/la}}{{/name}}{{/in_month}}{{^last}} & {{/last}}{{/days}} \\ \hline +{{/weeks}} +\end{tabular} +\newpage +{{/months}} +\end{document} |
