Hi there nice people from the typst community, i’m creating a template for academic writing. So far i have some proof box defined, but there is a pretty annoying layout problem: sometimes the upper block and the bottom one of the problem box gets split across two pages, sometimes the QED block is drawn on the next page but the proof is on the current page.
I’d like to know if there is a way to make sure a block stays on one page, or at least, make sure the top part is. Thanks!
#let problem(content, bg: none) = context {
block(
[ #block(text([*Problem*], fill: white), inset: (top: 8pt, left: 8pt, bottom: -5pt)) // hard-coded but works
#block(
[ #content ],
fill: accent-lighten(bg), // defined above
inset: 8pt,
width: page.width - page.margin.left * 2,
)
],
fill: (bg),
width: page.width - page.margin.left * 2,
)
}
