-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmacros.typ
More file actions
69 lines (67 loc) · 1.42 KB
/
macros.typ
File metadata and controls
69 lines (67 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#import "@preview/zebraw:0.6.1": *
#show: zebraw
// creates the titlepage
#let titlePage(
fachbereich: none,
titel: none,
name: none,
matikelnummer: none,
email: none,
erstprüfer: none,
zweitprüfer: none,
betreuer: none,
) = {
page(
footer: text(align(center)[#datetime.today().display("[day]. [month repr:long] [year]")], lang: "de`"),
header: none,
// margin: 2em,
paper: "a4",
)[
#align(center)[
#grid(
gutter: 1fr,
grid(
row-gutter: 2em,
image("assets/uk-logo.pdf", height: 1.5cm),
text(size: 1.6em)[Universität Kassel],
text(size: 1.4em)[#fachbereich],
),
grid(
row-gutter: 1em,
text(size: 1.4em)[#smallcaps()[Bachelor Arbeit]],
v(2em),
title(titel),
v(2em),
text(size: 1.4em)[_#name _],
v(0.2em),
[Mat.-Nr.: #matikelnummer],
email,
),
grid(
row-gutter: 0.6em,
"betreut von",
erstprüfer,
zweitprüfer,
betreuer,
),
)
]
]
}
// creates a codeblock
#let codeBlock(code, caption: none, subtext: none) = {
figure(
[
#zebraw(numbering-separator: true, code)
#if subtext != none {
block(
subtext,
width: 80%,
)
}
],
caption: caption,
kind: "code",
supplement: "Code Block",
)
}