Files
TB-Docs/report/utils.typ
T
2026-07-22 12:00:36 +02:00

38 lines
709 B
Typst

#let include-offset(what) = context {
let current-offset = heading.offset
set heading(offset: current-offset + 1)
include what
}
#let quote-block(width: 10cm, who, what) = {
set par(justify: false)
align(
right,
block(
width: width,
inset: (bottom: 1cm),
quote(
attribution: who,
block: true,
what
)
)
)
}
#let fn-link(lbl, url, body, new: true) = context {
link(url, body)
if not new {
footnote(lbl)
} else {
[#footnote(link(url)) #lbl]
}
}
#let code-ref(lbl, path, body: auto) = {
if body == auto {
body = path
}
let url = "https://git.kb28.ch/HEL/midas/src/branch/main/" + path
fn-link(lbl, url, body)
}