make utils follow font size

This commit is contained in:
Sven Vogel 2024-03-28 17:15:34 +01:00
parent 5968727bbe
commit 9694701024
1 changed files with 21 additions and 18 deletions

View File

@ -1,22 +1,37 @@
#let TitleSize = 24pt // general document information
#let SubtitleSize = 18pt #let format = yaml("../../conf/format.yaml")
#let LargetextSize = 14pt
#let TitleSize = 2
#let SubtitleSize = 1.5
#let LargetextSize = 1.25
#let to_em(x) = {
x * 1em
}
#let to_cm(x) = {
x * 1cm
}
#let to_pt(x) = {
x * 1pt
}
// titles are bold and twice the size of normal text // titles are bold and twice the size of normal text
// also they are centered and not justified // also they are centered and not justified
#let title(x) = { #let title(x) = {
align(center, par(justify: false, text(weight: "regular", size: TitleSize)[#x])) align(center, par(justify: false, text(weight: "regular", size: to_pt(format.font-size) * TitleSize)[#x]))
} }
// subtitles are 1.5x the size of normal text // subtitles are 1.5x the size of normal text
// also they are centered and not justified // also they are centered and not justified
#let subtitle(x) = { #let subtitle(x) = {
par(justify: false, text(size: SubtitleSize)[#x]) par(justify: false, text(size: to_pt(format.font-size) * SubtitleSize)[#x])
} }
#let largetext(x) = { #let largetext(x) = {
par(justify: false, text(size: LargetextSize)[#x]) par(justify: false, text(size: to_pt(format.font-size) * LargetextSize)[#x])
} }
#let signature = { #let signature = {
@ -33,15 +48,3 @@
align(left, "Unterschrift") align(left, "Unterschrift")
) )
} }
#let to_em(x) = {
x * 1em
}
#let to_cm(x) = {
x * 1cm
}
#let to_pt(x) = {
x * 1pt
}