commit 45f896c744ed84509205675813dd812e2af1aff6 Author: Philipp Hofer Date: Thu Apr 24 09:30:33 2025 +0200 add initial version diff --git a/lib.typ b/lib.typ new file mode 100644 index 0000000..b7b8aa9 --- /dev/null +++ b/lib.typ @@ -0,0 +1,39 @@ +#let law( + symbol: "ยง", + cols:3, + title: none, + toc_show: true, + toc_header: "Inhaltsverzeichnis", + body, +)={ + + set page( + paper: "a4", + margin: ( + top: .5cm, + bottom: .5cm, + left: 1.5cm, + right: .5cm + ), + ) + + set par(justify: true) + set text(font: "New Computer Modern", size: 7pt, lang: "de", region: "AT") + set par(leading: 2pt) + + if title != none { + heading(level: 1)[#title] + } + + columns(cols, gutter: 1em)[ + #if toc_show [ + #outline(title: toc_header) + ] + // Show rule for article headers + #show regex("^" + symbol + " \d+.*"): it => { + heading(level: 5, numbering: none, it, outlined: false) + } + #body + ] +} +