From 5f95f36214e6ce406539a5a59295473f4fe96780 Mon Sep 17 00:00:00 2001 From: MultisampledNight Date: Wed, 10 Jan 2024 21:54:29 +0100 Subject: [PATCH] docs: place strategic pagebreaks automatically --- docs/design/iowo-design.typ | 2 -- docs/template.typ | 14 +++++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/design/iowo-design.typ b/docs/design/iowo-design.typ index ad1849d..f8b4316 100644 --- a/docs/design/iowo-design.typ +++ b/docs/design/iowo-design.typ @@ -19,8 +19,6 @@ - algebraic enums - traits (`Numeric`...) -#pagebreak() - = Execution stages #graphics.stages-overview diff --git a/docs/template.typ b/docs/template.typ index 602d96a..3077478 100644 --- a/docs/template.typ +++ b/docs/template.typ @@ -73,8 +73,10 @@ set text(..fonts.main) set heading(numbering: "A.1") - show link: text.with(fill: blue) show heading: it => text(..fonts.heading, it) + // color links + show link: text.with(fill: blue) + // prettify codeblocks show raw.where(block: true): box.with( fill: luma(95%), inset: 1.25em, @@ -93,6 +95,16 @@ it } + // semi-strategically place pagebreaks for better orientation + let pagebreak-before(it) = pagebreak() + it + show heading.where(outlined: true): it => { + if it.level <= 2 { + pagebreak() + } + + it + } + // highlight important terms in bold show raw: it => { // avoid making terms in codeblocks bold