aboutsummaryrefslogtreecommitdiff
path: root/man/colitur-templates.5
blob: e668b5526bd98f18f527e744632756e207ae7f63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
.TH COLITUR\-TEMPLATES 5 "2026" "colitur" "File Formats"
.SH NAME
colitur\-templates \- template format for colitur(1)'s table, render and publish
.SH SYNOPSIS
.I booklet.tex
.br
.I calendar.html
.br
.I feed.ics
.SH DESCRIPTION
A
.B colitur
template is the file named by
.BR "colitur table" 's
and
.BR "colitur render" 's
.B \-\-template
flag (and used internally by
.BR "colitur publish" ).
It is a deliberately logic\-less, Mustache\-family format: the file is
.I data,
never a program. There are exactly four constructs \(em variable
interpolation, a section, an inverted section, and a comment \(em and nothing
else.
.PP
.B There are no partials, no lambdas, no arithmetic, no expression
.B evaluation, and no "raw" or triple\-brace form that could opt out of
.B escaping.
A template cannot include another file, cannot compute anything, and cannot
choose to skip the escaping its own flavour applies. Everything a rendered
document needs \(em conditionals on emptiness, iteration over days or weeks,
formatting \(em is expressed with the four constructs below over the fields
.B VIEW MODEL
describes; nothing else is available, and nothing else will be added by
supplying cleverer template syntax \(em that is what the escaping and
scope rules exist to prevent.
.SH SYNTAX
.TP
.BI "{{" name "}}"
Interpolates the value at
.I name,
a dot\-separated path resolved against the current scope (see
.B SCOPE AND LOOKUP
below). A string value is escaped per the active flavour and inserted; a
boolean
.B true
renders as the literal text
.RB \(lq true \(rq,
.B false
renders as nothing; a list or an object value used as a plain variable also
renders as nothing \(em only a section can iterate one. A path that resolves
to nothing renders as nothing, silently: this is the one deliberate silence
in the engine, so a template survives a day that does not carry every
optional field (an empty
.I week
on a day the rite does not number, an empty
.I first
or
.I gospel
citation, and so on).
.TP
.BI "{{#" name "}}...{{/" name "}}"
A section. If
.I name
resolves to a
.B list,
the body is rendered once per item, with each item pushed onto the scope
stack (see below). If it resolves to a truthy non\-list value (a non\-empty
string, or an object), the body is rendered once, with that value pushed onto
the stack. If it resolves to nothing, or to a falsy value (an empty string,
.BR false ,
or an empty list), the body is skipped entirely.
.TP
.BI "{{^" name "}}...{{/" name "}}"
An inverted section: the mirror image of
.BR # .
The body renders \(em exactly once, without pushing anything new onto the
scope \(em only when
.I name
resolves to nothing, or to a falsy value. This is how a template supplies a
fallback for an optional or absent field.
.TP
.BI "{{!" " text " "}}"
A comment. Everything between
.B {{!
and the closing
.B }}
is discarded; nothing is written to the rendered output. See
.B HOST\-LANGUAGE COMMENTS
below before relying on this for documentation inside a template that also
has its own comment syntax.
.PP
A section and its inverted counterpart, and a section and its close tag, must
name the identical path \(em
.BR {{#days}} " ... " {{/months}}
is a parse error, not a silently mismatched close. An empty path
(
.BR {{.}} ", " {{#}} ", " {{^}} ", " {{/}}
) is also a parse error: there is no "current context" concept for a bare dot
to mean, so nothing is guessed on a template's behalf.
.PP
A malformed template \(em an unterminated
.BR {{ ,
a section left unclosed, a close tag with no matching open \(em is reported
with the parser's own reason and exits 2. A template is user input, exactly
like an
.BR colitur\-overlay (5)
file, and is never allowed to crash the program that reads it.
.SH SCOPE AND LOOKUP
Scope is a stack. Rendering starts with the whole view (the year) as the one
entry on the stack; each
.B {{#section}}
pushes the value it iterates or opens onto the stack for the duration of its
body, and pops it again at
.BR {{/section}} .
A lookup for
.I name
is tried against the
.I innermost
(most recently pushed) entry first. If
.I name
is not found there, the lookup falls back to the
.I next
entry outward, and so on to the outermost (the year itself). This fallback is
deliberate and necessary \(em without it, a cell deep inside
.B {{#months}}{{#weeks}}{{#days}}
could never reach
.BR {{year}} ,
which lives only on the outermost object.
.PP
.B A hazard this section used to document here no longer exists, and is
.B recorded as removed rather than silently dropped from this page.
Before the view model's naming rework,
.B name
was an object keyed by language (e.g.
.BR la " and " en ),
carried on both a
.B month
and a
.BR day .
A dotted path that resolved only part way inward \(em a bare
.B {{name.la}}
on a day with no Latin name of its own \(em fell back WHOLESALE to the
enclosing
.BR month 's
own
.B name.la
instead of failing, because the lookup rule above cannot distinguish "this
key does not apply here" from "look further out": on an ordinary month, most
days carried no Latin name at all, so the naive form silently printed the
.I month's
own name on nearly every day.
.B name
is now a PLAIN STRING, always fully resolved before the template ever sees
it (see
.B VIEW MODEL
below) \(em there is no dotted path left for a partial match to climb out
of, so this specific hazard is unrepresentable, not merely avoided by
convention. A bare
.B {{name}}
inside
.B {{#days}}
always reads that day's own name, nested under
.B {{#months}}
or not, full stop.
.PP
.B One collision of the same underlying shape still exists in the shipped
.B view model, because it involves two PLAIN (non\-dotted) fields that
.B happen to share a name, which the fallback rule above cannot help with
.B either:
.TP
.B num
Both a
.B month
and a
.B week
carry a
.I num
field. Inside
.BR {{#weeks}} ,
a bare
.B {{num}}
is the week's own ordinal (1, 2, 3, ...) within its month, correctly \(em
but only because nothing between the week and wherever
.B {{num}}
is actually written currently redefines it. A
.B day
object has no
.I num
field of its own at all, so a bare
.B {{num}}
written inside
.B {{#days}}
climbs straight past the day to the enclosing
.BR week 's
own
.IR num ,
not the month's, even where a template author reaching for "the month
number" from deep inside a day cell might expect otherwise. Verified live,
not merely reasoned about (a template iterating
.BR {{#months}}{{#weeks}}{{#days}} ,
printing the enclosing week's own
.I num
beside the month's own
.IR month_num ,
both carried on every day and week object for exactly this reason \(em see
.B VIEW MODEL
below):
.RS
.nf

.B colitur table \-\-year 2027 \-\-template num\-hazard.txt
week 1 of month 1
  day\-scope num: 1
week 2 of month 1
  day\-scope num: 2
.fi
.RE
The "day\-scope num" line is reading a bare
.B {{num}}
from inside
.BR {{#days}} .
It changes from week to week, proving it is the enclosing
.BR week 's
own ordinal, not the constant
.B 1
a reader expecting "month number" might assume.
.PP
.B The safe idiom, when a template genuinely needs a number from an
.B ancestor further out than the immediately enclosing section:
use the field the view already carries FOR that purpose rather than a bare,
climbing
.BR {{num}} .
A
.B week
object already carries
.B month_num
(and
.BR month_name )
precisely because the engine has no
.RB \(lq "../" \(rq
parent\-path syntax to reach the enclosing month any other way \(em see
.B week
under
.B VIEW MODEL
below. There is no equivalent shortcut for reaching a
.B week
object's own
.I num
from inside
.BR {{#days}} ,
because no shipped template needs one; a template that does should carry it
down explicitly the same way, rather than relying on the climb.
.SH HOST\-LANGUAGE COMMENTS
.B The engine has no awareness of the target language's own comment syntax.
A
.B {{...}}
tag inside a LaTeX
.BR % ,
a groff
.BR .\e" ,
or an HTML
.B <!\-\- \-\->
comment is still lexed and rendered exactly as if it were live template
markup \(em the engine sees only its own
.B {{
/
.B }}
delimiters, never the host format's comment sigils, because a template is
rendered as one flat character stream, not parsed as LaTeX, groff or HTML
first. This broke a shipped template during development: an explanatory
.B {{example}}
written inside a LaTeX
.B %
comment, meant purely as documentation for a future reader, was parsed as a
real variable reference.
.PP
Write in\-template documentation without any
.B {{
or
.B }}
characters in it, in whatever host\-comment syntax the target format uses.
Use
.B {{!comment}}
only where the surrounding host format has no comment syntax of its own that
would otherwise be preferable (its own body is safe \(em text between
.B {{!
and
.B }}
is discarded unparsed, so a stray
.B {{
inside a
.B {{!...}}
comment is not itself a hazard \(em but the comment's own delimiters are
still ordinary
.B {{
/
.B }}
tokens, so they compete with the host format's own comment syntax for the
same file exactly as any other tag would).
.SH FLAVOURS
.B \-\-flavour
selects how an interpolated
.I value
is escaped before being written. It never touches the template's own literal
markup (the LaTeX, Typst, groff, HTML, XML or ICS surrounding a
.BR {{tag}} ),
which is the template author's and is trusted exactly as written. One of seven:
.TP
.B latex
.BR \e " \(-> " \etextbackslash{} ,
.BR { " \(-> " \e{ ,
.BR } " \(-> " \e} ,
.BR $ " \(-> " \e$ ,
.BR & " \(-> " \e& ,
.BR # " \(-> " \e# ,
.BR _ " \(-> " \e_ ,
.BR % " \(-> " \e% ,
.BR ^ " \(-> " \etextasciicircum{} ,
.BR ~ " \(-> " \etextasciitilde{} .
Every LaTeX special character is covered; nothing else is touched.
.TP
.B typst
.BR \e " \(-> " \e\e ,
.BR # " \(-> " \e# ,
.BR * " \(-> " \e* ,
.BR _ " \(-> " \e_ ,
.BR $ " \(-> " \e$ ,
.BR @ " \(-> " \e@ ,
.BR < " \(-> " \e< ,
.BR > " \(-> " \e> ,
.BR \(ga " \(-> " \e\(ga ,
.BR ~ " \(-> " \e~ ,
.BR \- " \(-> " \e\- .
Verified against the installed
.B typst
binary rather than assumed: each escaped character was confirmed to survive
as the literal character, and each was separately confirmed to do something
else when left bare
.RB ( # " opens code mode, " * / _ " toggle strong/emph, " $ " opens math, "
.B @
opens a reference \(em a bare unresolved
.B @word
is a hard
.B typst
compile error, not merely mangled output \(em
.BR < / > " can close around a bare word into label syntax that swallows it, "
.B \(ga
opens raw text, and
.B ~
is a non\-breaking space). A run of two or three unescaped hyphens becomes an
en or em dash; every
.B \-
is escaped unconditionally, not only inside a detected run, since escaping
is applied one character at a time with no lookahead \(em confirmed live that
escaping every hyphen independently still typesets as literal hyphens for a
run of any length.
.TP
.B groff
A backslash is escaped to
.BR \ee ,
because a bare backslash starts a groff escape. If the ESCAPED string then
begins with
.B .
or
.BR ' ,
the zero\-width non\-printing character
.B \e&
is prefixed \(em a
.B .
or
.B '
in column one would otherwise start a request rather than print literally.
.TP
.B html
(also used for the
.B xml
flavour, identically)
.BR & " \(-> " &amp; ,
.BR < " \(-> " &lt; ,
.BR > " \(-> " &gt; ,
.BR \(dq " \(-> " &quot; ,
.BR ' " \(-> " &#39; .
.TP
.B xml
Identical to
.B html
above.
.TP
.B ics
Per RFC 5545: a backslash doubles, a semicolon and a comma are each
backslash\-escaped, a newline becomes the two\-character sequence
.BR \en ,
and a carriage return is dropped outright (never doubled or passed through).
Line folding at 75 octets, on a UTF\-8 character boundary, is applied
separately to the whole rendered line \(em it is not part of value escaping
and is not something a template can see or control.
.TP
.B none
Escapes nothing at all: the value is inserted byte\-for\-byte. See
.B LIMITATIONS
below \(em this is not an oversight, and it is not safe to treat as one.
.PP
.B \-\-flavour
is inferred from
.BR \-\-template 's
own file extension when the flag is omitted:
.RS
.nf

.I .tex              \(-> latex
.I .typ              \(-> typst
.I .ms .mom .me      \(-> groff
.I .html .htm        \(-> html
.I .xml              \(-> xml
.I .ics              \(-> ics
.I .md .adoc .txt    \(-> none
.fi
.RE
.PP
An extension
.B colitur
does not recognise is a hard
.B ERROR
naming the seven flavours above; it is
.I never
a silent fallback to
.BR none .
Guessing the flavour wrong would produce output that looks fine right up
until the metacharacters it silently failed to escape appear in a rendered
document.
.SH LIMITATIONS
.B AsciiDoc and Markdown are NOT escaped.
The
.B none
flavour (selected for
.IR .md " and " .adoc ,
as well as
.IR .txt )
passes every interpolated value through unchanged. This is a deliberate
choice, not a gap: unlike LaTeX, Typst, groff, HTML, XML or ICS, AsciiDoc and
Markdown have no fixed, small metacharacter set that could be escaped
mechanically \(em their own metacharacters are context\-dependent (a
.B *
means something different at the start of a line than in the middle of a
word), and escaping them here, generically, would produce
.I worse
output than leaving values alone in the ordinary case.
.PP
The consequence is real and is stated here plainly rather than left for a
reader to discover: a feast name, or any other interpolated field, containing
.B *
or
.B _
renders as Markdown/AsciiDoc emphasis in the rendered document, not as a
literal asterisk or underscore. No shipped sanctoral name currently contains
either character, but a
.BR colitur\-overlay (5)
file supplying a local celebration's own name is not validated against this
constraint, and its author is responsible for avoiding both characters, or
accepting the emphasis, in any name rendered through a
.I .md
or
.I .adoc
template.
.PP
Only the Extraordinary Form (1962) view model is documented below; see
.BR colitur (1)
for the rite's own scope and limitations (readings cover only the Epistle
and Gospel; the votive Office of the Blessed Virgin Mary on Saturday does not
yet select among its five seasonal Masses).
.SH VIEW MODEL
.B Every field below is verified against
.I lib/render/view.ml
.B and
.IR schema/day\-v1.json ,
.B not transcribed from memory or from an earlier version of this page.
.PP
The value a template renders against is built once per
.B colitur table
/
.B render
/
.B publish
invocation, from the same resolved calendar
.B colitur emit
uses, and is shaped for two artefacts from one model: a flat booklet (the
top\-level
.B days
list, one entry per day of the requested year) and a month grid (the
.B months
list, each carrying its own
.B weeks
list of Sunday\-started, seven\-cell rows, padded at both ends with blank
cells so every row has exactly seven). This is the same shape published at
.IR schema/day\-v1.json ,
described here in prose; the JSON Schema is the machine\-checked contract and
this page is its worked explanation.
.PP
Every localised field below (marked
.RI \(lq "in the active language" \(rq )
resolves through whichever language
.B \-\-lang
selected, default
.IR la ;
under
.BR \-\-raw ,
each equals its own unlocalised counterpart (a
.B name
equals its
.BR slug ,
a
.B rank_name
equals its
.BR rank ,
and so on) rather than being blank \(em see
.BR colitur (1)'s
own
.B NAMING
section.
.SS Top level
.TP
.B rite
The rite identifier, currently always the string
.BR ef .
.TP
.B year
The civil year requested, as a four\-digit string.
.TP
.B term
A fixed, closed vocabulary of strings in the active language, so a
translated booklet needs no template edit for its own boilerplate words.
Object keys:
.BR ordo ", " contents ", " epistle ", " lesson ", " gospel ", "
.BR commemoration " and " week .
Referenced as
.BR {{term.ordo}} ,
.BR {{term.epistle}} ,
and so on.
.TP
.B weekday_headings
A list of exactly seven objects, Sunday first, each
.RB { name ", " last },
for a localised grid header row \(em
.B name
is the weekday's own name in the active language,
.B last
is true on the seventh (Saturday) entry, the same
.RB \(lq "unless this is the last one" \(rq
flag the
.B day
object's own
.B last
field below provides for a week's row of cells.
.TP
.B months
A list of twelve
.B month
objects, January through December.
.TP
.B days
A flat list of every day's own
.B day
object, in date order, for the whole requested year \(em what a booklet
template iterates over directly, without going through
.BR months .
.SS month
.TP
.BR num ", " month_num
The month number, 1 through 12, as a string. The two spellings are the same
value \(em see the note at the end of this subsection.
.TP
.BR name ", " month_name
The month's own resolved display name in the active language (e.g.
.RB \(lq Ianuarius \(rq ),
a plain string. Both spellings are the same value.
.TP
.B month_abbr
The month's abbreviated name in the active language (e.g.
.RB \(lq Ian \(rq ),
from the language file's own
.B [month_abbr]
section.
.TP
.B days
This month's own
.B day
objects, in date order, only the days that actually fall in this month.
.TP
.B weeks
This month's
.B day
objects grouped into Sunday\-started rows of exactly seven, the first and
last rows padded with blank cells (see
.B day \(->  in_month
below) so every row has seven entries regardless of which weekday the month
starts or ends on.
.PP
.B "Why two spellings."
A
.B week
object (below) carries
.BR month_name ", " month_num " and " month_abbr,
because at that level a bare
.B name
would be ambiguous. An author who learned those names inside
.B {{#weeks}}
naturally reaches for them one level up, inside
.BR {{#months}} .
Before colitur 0.9 they resolved to nothing there, and because an unknown
key renders as the EMPTY STRING by design (see
.B SCOPE AND LOOKUP
above), the result was a silently blank month heading rather than any
error. A month now answers to both. Prefer the short forms in new
templates: a month is the only scope where they are unambiguous.
.SS week
.TP
.B num
The week's ordinal within its month (1, 2, 3, ...), as a string. This is
.I not
a liturgical week number \(em see
.B day \(-> week
below for that, and
.B SCOPE AND LOOKUP
above for the
.B num
collision this field and the enclosing month's own
.B num
share.
.TP
.B month_num
.TQ
.B month_name
The enclosing month's own
.B num
and
.BR name ,
carried onto every week because the engine has no
.RB \(lq "../" \(rq
parent\-path syntax \(em a nested
.B {{month_num}}
or
.B {{name}}
read from inside
.B {{#weeks}}
would otherwise be unable to reach the month at all (a bare
.B {{name}}
here would in fact resolve to the WEEK's enclosing DAY's name once one is
pushed, not the month's, since
.I week
itself carries no
.B name
field of its own \(em carrying
.B month_name
explicitly is what avoids relying on that climb).
.TP
.B days
Exactly seven
.B day
objects, Sunday first.
.SS day
Every key below is always present on every day object, including a padding
cell (see
.BR in_month ),
so a template never hits a missing key on a real day OR a blank grid cell \(em
the one deliberate exception is that a padding cell's own string fields are
all set to the empty string and its boolean and list fields to
.B false
/empty, which read as absent under
.BR # / ^ / {{var}}
exactly as a genuinely unset field would.
.TP
.B iso
The date, ISO\-8601 (\c
.IR YYYY\-MM\-DD ).
Empty on a grid padding cell.
.TP
.B dom
The day of the month, as a string (no leading zero). Empty on a padding
cell.
.TP
.B dow
The day of the week as a string digit,
.B 0
for Sunday through
.B 6
for Saturday. Present, and meaningful, even on a padding cell \(em it is how
a grid template knows which column a blank cell belongs in.
.TP
.B in_month
Boolean.
.B false
on a padding cell (a blank cell added so a month's first or last week has
seven entries); a template checks this, not
.BR iso 's
emptiness, to decide whether to render a cell's contents.
.TP
.B season
The liturgical season's own unlocalised string key (e.g.
.BR paschaltide ", " lent ),
stable across every language \(em unaffected by
.BR \-\-lang / \-\-raw .
.TP
.B season_name
The season's own resolved display name, in the active language.
.TP
.B week
The liturgical week number within the season, as a string, or the empty
string on a day the rite does not number (this is
.I not
the same field as a
.B week
object's own
.BR num ,
described above \(em see
.B SCOPE AND LOOKUP
for why the two identically\-named fields do not collide here: a plain
.B day
object has no
.B num
key of its own at all, only
.BR week ,
so there is nothing for it to shadow).
.TP
.B slug
The observed celebration's stable, unlocalised identifier (e.g.
.BR ef\-easter\-sunday ),
unaffected by
.BR \-\-lang / \-\-raw \(em
the machine key a template or a downstream script keys off, distinct from
.B name
below.
.TP
.B name
The observed celebration's resolved display name, in the active language
\(em a PLAIN STRING, not an object keyed by language. Under
.B \-\-raw
this equals
.B slug
exactly, which is what makes
.B \-\-raw
output byte\-stable; a real language's own table names essentially every
slug the engine can produce (verified: 725 of 725 over the window colitur's
own coverage test measures), so in ordinary operation
.B name
differs from
.B slug
on nearly every day, not only the ones with a proper name in the historical
sense.
.TP
.B weekday
The day's own weekday name in the active language (e.g.
.RB \(lq "Feria V" \(rq ,
.RB \(lq Sabbatum \(rq ), matching
.BR dow 's
numbering (0 = Sunday).
.TP
.B rank
The observed celebration's class, as the kernel's own unlocalised string
key (e.g.
.BR class\-1 ),
unaffected by
.BR \-\-lang / \-\-raw .
.TP
.B rank_name
The rank's own resolved display name, in the active language (e.g.
.RB \(lq "I classis" \(rq ).
.TP
.B colour
The observed celebration's liturgical colour, lowercase, unlocalised (one of
.BR white ", " red ", " green ", " violet ", " rose ", " black ,
or the empty string), unaffected by
.BR \-\-lang / \-\-raw .
.TP
.B colour_name
The colour's own resolved display name, in the active language (e.g.
.RB \(lq albus \(rq
for
.BR white ).
.TP
.BR is_white ", " is_red ", " is_green ", " is_violet ", " is_rose ", " is_black
Six booleans, exactly one true (matching
.BR colour )
on a real day, all false on a padding cell. Provided so a template can
select styling (a cell background colour, a class name) with a plain
.B {{#is_white}}
section instead of a string comparison the engine does not offer \(em there
is no expression evaluation, so this is the only way a template branches on
colour at all.
.TP
.B subject
Whose feast this is, lowercase, unlocalised (one of
.BR lord ", " bvm ", " saint ", " temporal ).
.TP
.B comms
A list of commemoration objects admitted on this day, each carrying
.BR slug " (unlocalised), " name
(the SAME resolved\-string shape as the day's own
.BR name ,
through the identical language table \(em a commemoration's slug is drawn
from the same sanctoral/temporal pool as the observed day's, not a second
vocabulary), and
.B privileged
(boolean: true for a privileged commemoration under RG 109, which survives
even where an ordinary one would be capped out). Empty list on a day with no
commemorations, and always an empty list \(em never absent \(em on a padding
cell.
.TP
.B transferred_in
A list of at most one object, present when a feast impeded elsewhere was
transferred onto THIS day (RG 96\(en98); carries the transferred
celebration's own
.B slug
only \(em
.I not
a resolved
.BR name .
Empty list when nothing transferred in.
.TP
.B transferred_out
A list of objects, one per celebration that would have fallen on this day
but was displaced and moved to a later date; each carries
.B slug
(only, as above) and
.B to
(the ISO\-8601 date it was moved to). Empty on the ordinary day.
.TP
.B first
The Epistle/Lesson reading citation (e.g.
.RB \(lq "Heb 1:1\-12" \(rq ),
never scripture text \(em a reference only. Empty string when none resolved.
Unaffected by
.BR \-\-lang / \-\-raw :
a citation is a reference, not a display name.
.TP
.B gospel
The Gospel reading citation, same shape as
.BR first .
.TP
.B last
Boolean, true on the seventh (final) cell of a grid row, false everywhere
else including every entry of the flat
.B days
list. Exists because the engine offers no "unless this is the last item"
construct, so a template that must print a separator BETWEEN cells but not
after the last one (a table row's column rule, for instance) reads this flag
rather than computing it: without it, a seven\-column LaTeX grid would emit
an eighth, empty column and
.B pdflatex
would reject the file outright.
.SH A WORKED MINIMAL TEMPLATE
.B Every line below is pasted from a real run, not written by hand.
A plain\-text booklet, days nested inside months \(em the shape every
shipped template actually uses:
.RS
.nf

{{rite}} {{year}}
{{#months}}{{#days}}
{{iso}} {{weekday}} {{name}} {{colour_name}}{{#comms}} +{{name}}{{/comms}}
{{/days}}{{/months}}
.fi
.RE
.PP
Rendered (extension
.IR .txt ,
so flavour
.BR none ,
no escaping applied; the blank lines are the template's own \(em its section
body starts and ends with a literal newline, and this engine does not trim
one):
.RS
.nf

.B colitur table \-\-year 2026 \-\-template minimal.txt | head \-7
ef 2026

2026\-01\-01 Feria V In Octava Nativitatis Domini albus

2026\-01\-02 Feria VI Feria VI ante Epiphaniam albus

2026\-01\-03 Sabbatum Officium sanctae Mariae in sabbato albus
.fi
.RE
.PP
Every line names a real celebration in Latin \(em there is no unnamed\-day
fallback to demonstrate here the way an earlier version of this page showed
one: the shipped
.I la
table names every slug the engine can produce (725 of 725 over the window
its own coverage test measures), so
.B name
is never the bare
.B slug
in ordinary operation.
.B \-\-raw
is what produces the bare\-slug form instead, on demand, not a gap in the
data:
.RS
.nf

.B colitur table \-\-year 2026 \-\-template minimal.txt \-\-raw | head \-3
ef 2026

2026\-01\-01 4 ef\-circumcision white
.fi
.RE
.PP
.RB \(lq 4 \(rq
above is
.BR weekday 's
own raw form: with no language table at all,
.I weekday
falls back to the numeral
.BR dow
itself carries (Thursday, 1 January 2026), not a slug\-like string \(em
there is no bare English or Latin word for a weekday to echo back the way a
missing celebration name echoes its own
.BR slug .
.PP
The
.B num
collision from
.B SCOPE AND LOOKUP
above, reproduced here in full \(em a grid\-shaped template, a week nested
inside a month, a day nested inside the week:
.RS
.nf

{{#months}}{{#weeks}}week {{num}} of month {{month_num}}
{{#days}}  day\-scope num: {{num}}
{{/days}}{{/weeks}}{{/months}}
.fi
.RE
.RS
.nf

.B colitur table \-\-year 2027 \-\-template num\-hazard.txt | head \-9
week 1 of month 1
  day\-scope num: 1
  day\-scope num: 1
  day\-scope num: 1
  day\-scope num: 1
  day\-scope num: 1
  day\-scope num: 1
  day\-scope num: 1
week 2 of month 1
.fi
.RE
.PP
Every
.RB \(lq "day\-scope num" \(rq
line inside week 1 reads
.BR 1 ,
and every one inside week 2 (not shown above, but the next seven lines of
the same run) reads
.BR 2 :
a bare
.B {{num}}
written inside
.B {{#days}}
is reading the enclosing
.BR week 's
own ordinal, silently, because
.I day
itself carries no
.I num
field to shadow it with. Nothing here is wrong \(em the lookup rule is
doing exactly what
.B SCOPE AND LOOKUP
documents \(em but a template author who expected "the month number" from
that bare
.B {{num}}
would be reading the wrong field with no warning at all. Compare
.B {{month_num}}
in the same template, which stays
.B 1
throughout January regardless of which week or day it is read from,
because it is carried explicitly rather than reached by climbing.
.SH SEE ALSO
.BR colitur (1)
for
.BR table ", " render " and " publish ,
for the five
.B emit
formats that share this same view model, and for
.BR \-\-lang / \-\-raw
and the
.B NAMING
section that controls every localised field this page documents.
.PP
.BR colitur\-overlay (5)
for the local\-calendar file format that supplies the celebrations a
template's
.B name
and
.B slug
fields can carry.
.PP
.BR colitur\-config (5)
for setting a default
.B \-\-template
so
.B table
/
.B render
need not repeat it on every invocation.
.SH LICENSE
AGPL\-3.0\-or\-later.