diff options
Diffstat (limited to 'templates/ef/ordo.typ')
| -rw-r--r-- | templates/ef/ordo.typ | 81 |
1 files changed, 51 insertions, 30 deletions
diff --git a/templates/ef/ordo.typ b/templates/ef/ordo.typ index 162a485..85b609e 100644 --- a/templates/ef/ordo.typ +++ b/templates/ef/ordo.typ @@ -8,12 +8,16 @@ // a genuine advantage of this flavour over ordo.tex, not merely a different // syntax for the same thing. // -// 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. Same discipline as ordo.tex; see that file's own header -// for the full reasoning, repeated only where Typst changes it below. +// A5, CONTINUOUS (Defect 2): no forced page break per week any more -- +// see ordo.tex's own header for the measured "why" (a full 7-day week +// already fills most of an A5 page even tightened, so the real saving +// comes from the year's many SHORT boundary weeks no longer wasting a +// whole page each). 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. Same discipline as ordo.tex; +// see that file's own header for the full reasoning, repeated only where +// Typst changes it below. // // The observed day's own display name is a PLAIN resolved string // (View.of_days), never a lang-keyed object, exactly as in every other @@ -42,12 +46,29 @@ // per month with its weeks dotted-and-paginated underneath, because it // walks the months-then-weeks nesting directly in its own hand-built TOC // loop. Typst's outline instead builds its table of contents automatically -// from real document headings, and there is no "is this the month's first -// week" flag in the view model for a template to test -- inventing one -// would be new engine state for a cosmetic grouping, not a real gap. Each -// week page therefore carries ONE flat heading, "Month . Week N", which is -// both what a reader sees at the top of that page and, automatically, its -// own single-line entry in the table of contents below. +// from real document headings, so this stays a flat list of "Month . Week +// N" headings rather than being restructured into two heading levels -- +// changing outline depth/structure is a bigger, riskier change than this +// defect calls for. Defect 2 DID add a "is this the month's first week" +// flag to the view model (lib/render/view.ml's own [first], the same +// "cheap flag beats invented template logic" call [last] already made +// elsewhere) -- used below for a separate, non-heading month BANNER +// printed just above that first week's own heading, not by restructuring +// the heading/outline itself. The banner's own sticky:true (separate from +// the heading show-rule's below) is needed for the identical reason: an +// early draft without it put "Aprilis 2027" alone at the very bottom of +// a page with the entire month below it on the next one -- not caught by +// a check for an orphaned HEADING (a banner is not one), only found by +// looking at the rendered page. Chaining two sticky blocks keeps +// banner+heading+first day box moving together. +// +// Each day box is tightened from an earlier draft (0.6mm inset, 0.42em +// leading, 7pt meta text on its own separate rank/colour line) for this +// same continuous flow -- see ordo.tex's own header for the measured +// reasoning, identical here: a full week already fills most of a page, +// so folding rank/colour onto the SAME line as the citations (this box +// is far wider than it is tall) is what buys back a second week's worth +// of room, not the font/inset trim alone. // // Colour swatch: the six colour names this rite emits (white, red, green, // violet, rose, black -- Colour.to_string's own closed vocabulary) are used @@ -65,9 +86,15 @@ ) #set text(size: 9pt) #set par(justify: false) +// sticky: true keeps a heading from being stranded alone at a page's +// bottom with its own week's first day box pushed to the next page -- +// Typst's own built-in answer to what ordo.tex needs \needspace (an +// external package) for. Verified live: a heading is provably never the +// LAST thing on a page anywhere in the rendered output (the task report +// has the scan). #show heading: it => { set text(size: 12pt, weight: "bold") - block(above: 3mm, below: 2mm)[#it.body] + block(above: 3mm, below: 2mm, sticky: true)[#it.body] } #let licol = ( @@ -92,30 +119,24 @@ {{#months}} {{#weeks}} +{{#first}} +#block(above: 2mm, below: 0mm, sticky: true)[ + #line(length: 100%, stroke: 0.6pt + luma(120)) + #text(size: 15pt, weight: "bold")[{{month_name}} {{year}}] +] +{{/first}} = {{month_name}} #sym.dot.c {{term.week}} {{num}} {{#days}} {{#in_month}} -#block(width: 100%, above: 0.6mm, below: 0mm, breakable: false, stroke: 0.4pt + luma(160), inset: (x: 1.6mm, y: 0.6mm))[ - // A single Typst paragraph throughout, deliberately: two markup lines - // separated only by a bare newline stay on ONE rendered line (they are - // still the same paragraph, soft-wrapped) -- verified live, the first - // draft of this box merged the rank/colour line into the citation line - // for exactly that reason. A trailing backslash forces a real line - // break WITHOUT starting a new paragraph (no inter-paragraph spacing - // to tune down), which is what a compact multi-line box wants; #par's - // own block-level break, used further up for the day/weekday/swatch - // row against the name below it, is reserved for the one place this - // box actually wants a fresh paragraph. - #set par(leading: 0.42em) - #text(weight: "bold")[{{dom}}] #h(2mm) #text(size: 8pt)[{{weekday}}] #h(1fr) #swatch("{{colour}}") \ +#block(width: 100%, above: 0.4mm, below: 0mm, breakable: false, stroke: 0.4pt + luma(160), inset: (x: 1.6mm, y: 0.4mm))[ + #set par(leading: 0.36em) + #text(weight: "bold")[{{dom}}] #h(2mm) #text(size: 7pt)[{{weekday}}] #h(1fr) #swatch("{{colour}}") \ #text(weight: "bold")[{{name}}] \ - #text(size: 7pt)[{{rank_name}} #sym.dot.c {{colour_name}}] \ - #text(size: 7pt)[{{#first}}{{term.epistle}} {{first}}{{/first}}{{#gospel}}{{#first}} #h(2mm) {{/first}}{{term.gospel}} {{gospel}}{{/gospel}}]{{#comms}} \ - #text(size: 7pt)[{{term.commemoration}} {{name}}]{{/comms}} + #text(size: 6.5pt)[{{rank_name}} #sym.dot.c {{colour_name}}{{#first}} #h(2mm) {{term.epistle}} {{first}}{{/first}}{{#gospel}} #h(2mm) {{term.gospel}} {{gospel}}{{/gospel}}]{{#comms}} \ + #text(size: 6.5pt)[{{term.commemoration}} {{name}}]{{/comms}} ] {{/in_month}} {{/days}} -#pagebreak(weak: true) {{/weeks}} {{/months}} |
