diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-20 11:09:34 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-20 11:09:34 +0200 |
| commit | c30a35e1da315f2a44e5b53c714bdcf4d8992d2c (patch) | |
| tree | a72067c2b33aae367c3e859e27f1074bb71503f0 /lib/kernel/date.ml | |
| parent | c00bf135defe69eb303f4bcf32ae862f65c01178 (diff) | |
| download | colitur-c30a35e1da315f2a44e5b53c714bdcf4d8992d2c.tar.gz colitur-c30a35e1da315f2a44e5b53c714bdcf4d8992d2c.zip | |
fix(templates): the Typst grid no longer overflows a 6-week month
grid.typ used rows: (auto, 1fr) on the assumption that a Typst
fractional row always shrinks to share whatever space is left. It
does not: an 'fr' track's size is the LARGER of its fair share and
its content's own minimum, so it grows PAST 1fr when content is
taller than that share rather than compressing to fit. Adding the
sigla line (Epistle/Gospel references) grew every cell's natural
content past what a 1/6-of-remaining-space row allows, and a 6-week
month (three of twelve in 2027) split its own table between rows,
stranding the last week alone on a fresh page with no heading -- the
user's screenshot showed a row sliced mid-cell, 'I classis' cut off,
the next month's own heading printed underneath it.
Fixed the same way grid.tex's own \cellh already was: an explicit
row height (cellh, computed from the page's text height divided by
six, budgeted with 6mm of deliberate slack after a zero-slack first
attempt still split a table between rows), with each cell's content
wrapped in a height-clipped block sized to match -- content that
still does not fit is truncated rather than spilling into the next
cell or page. block(breakable: false) around the whole table is a
second, independent backstop: even if the budget is ever wrong
again, the WHOLE table jumps to a fresh page rather than splitting a
row across two, a loud failure (an odd blank page) rather than a
silent one (a sliced row).
This reverts the file's own prior divergence from grid.tex (Typst
stretching every month to fill the page regardless of row count,
disclosed as deliberate at the time) -- overflow safety now matters
more than that cosmetic fill. A 5-week month still leaves a blank
sixth row, the same trade-off grid.tex's own header already accepts.
Verified against all twelve months of 2027 (three 6-week: January,
May, October; nine 5-week), typeset through typst compile: exactly
12 pages, one month title per page, no clipped or duplicated
content, day 31 of a 6-week January fully visible. grid.tex itself
re-checked for the same latent risk and found unaffected -- its
fixed-height \cellh box already had enough margin.
Golden regenerated through the same Test_view.view_of path the
other affected templates already use.
Diffstat (limited to 'lib/kernel/date.ml')
0 files changed, 0 insertions, 0 deletions
