bachelor-thesis/utils.typ
lukas-heilgenbrunner 53d11ae459
Some checks failed
Build Typst document / build_typst_documents (push) Failing after 10s
on git build release mode add some todos
2024-12-20 11:52:51 +01:00

40 lines
789 B
Plaintext

#import "@preview/drafting:0.2.1": margin-note
#let inp = sys.inputs
#let inwriting = inp.at("inwriting", default: "true") == "true"
#let draft = inp.at("draft", default: "true") == "true"
#assert(not(inwriting and not(draft)), message: "If inwriting is true, draft should be true as well.")
#let todo(it) = [
#if inwriting [
#margin-note(it)
]
]
#let silentheading(level, body) = [
#heading(outlined: false, level: level, numbering: none, bookmarked: true)[#body]
]
#let in-outline = state("in-outline", false)
#let flex-caption-styles = rest => {
show outline: it => {
in-outline.update(true)
it
in-outline.update(false)
}
rest
}
#let flex-caption(long, short) = (
context (
if in-outline.get() {
short
} else {
long
}
)
)