49 lines
No EOL
1.2 KiB
Text
49 lines
No EOL
1.2 KiB
Text
// apply this using:
|
|
// #import "../../template.typ": apply-template
|
|
// #show: apply-template
|
|
|
|
|
|
#let apply-template(body) = [
|
|
#set text(lang: "de")
|
|
#set page(
|
|
margin: auto,
|
|
paper: "a4",
|
|
)
|
|
#set outline(indent: 1.2em)
|
|
#let clean_numbering(..schemes) = {
|
|
(..nums) => {
|
|
let (section, ..subsections) = nums.pos()
|
|
let (section_scheme, ..subschemes) = schemes.pos()
|
|
|
|
if subsections.len() == 0 {
|
|
numbering(section_scheme, section)
|
|
} else if subschemes.len() == 0 {
|
|
numbering(section_scheme, ..nums.pos())
|
|
} else {
|
|
clean_numbering(..subschemes)(..subsections)
|
|
}
|
|
}
|
|
}
|
|
#set heading(numbering: clean_numbering("A.", "I.", "1.a."))
|
|
|
|
// functions for my stuff
|
|
#let title(body) = {
|
|
set align(center)
|
|
[ - #body]
|
|
}
|
|
|
|
// #set math.equation(numbering: "(1)", supplement: "equation")
|
|
|
|
// Customization of text elements
|
|
#set par(justify: true)
|
|
#show link: underline
|
|
#show link: set text(rgb("#1470da"))
|
|
|
|
// here are replacements for commonly used shortcuts
|
|
#show "z.B.": "zum Beispiel"
|
|
#show "zb": "zum Beispiel"
|
|
#show "vllt": "vielleicht"
|
|
#show "CO2": $"CO"_2$
|
|
|
|
#body // IMPORTANT: must be at the very bottom, else the body will be overwritten
|
|
] |