-
Notifications
You must be signed in to change notification settings - Fork 0
/
template_slides.typ
194 lines (171 loc) · 3.49 KB
/
template_slides.typ
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
// Get short_title into footer without having to pass short_title to #slide
// #let heading_font = "Futura"
// #let body_font = "Lora"
// #let body_font = "Linux Libertine"
#let title_size = 28pt
#let body_size = 20pt
#let foot_size = 12pt
#let presentation(
title,
author,
date,
body
) = {
set page(
paper: "presentation-16-9",
// margin: 0%,
margin: (bottom: 15pt, rest: 25pt)
)
set text(font: "Verdana")
block(
width: 100%,
height: 100%,
spacing: 0%,
inset: 10%,
// fill: teal,
breakable: false
)[
#set align(center + horizon)
#set text(size: 36pt)
#title
#set text(size: 16pt)
#author
#date
]
counter(page).update(0)
body
}
#let divider(
heading: "Divider heading",
) = {
block(
width: 100%,
height: 100%,
spacing: 0%,
inset: 10%,
// fill: teal,
breakable: false
)[
#set align(center + horizon)
#set text(size: 36pt)
#heading
]
}
#let slide(
heading: "Slide heading",
title_short: "Short title",
lab: "lab",
body,
) = {
pagebreak()
// label(repr([#lab]))
block(
width: 100%,
height: 10%,
spacing: 0%,
// inset: 20pt,
// fill: teal,
breakable: false
)[
// #set align(left + bottom)
#set align(left + horizon)
#set text(
size: title_size,
fill: olive
)
// #label(
// repr(lab)
// )
#heading
// #let s(x: hello) = { x }
// #let f() = { s = "abc" }
// #s()
#label(lab)
// Label portion: #label(repr([#lab]))
// Label portion: #label("a_sample_label")
// Label portion: #label(lab)
// #lab => label(lab)
// #lab => label(lab)
]
block(
width: 100%,
height: 75%,
spacing: 5%,
// inset: 20pt,
// fill: gray,
breakable: false
)[
#set text(
size: body_size,
fill: luma(25)
)
#body
]
block(
width: 100%,
height: 5%,
spacing: 0%,
// inset: (top: 20pt, bottom: 20pt),
// fill: green,
breakable: false
)[
#set text(
size: foot_size,
fill: luma(25)
)
#stack(
dir: ltr,
block(width: 90%, height: 100%)[
#set align(left + horizon)
#title_short
],
block(width: 10%, height: 100%)[
#set align(right + horizon)
#locate(
loc => counter(page).at(loc).at(0)
)
],
)
]
}
#let linkbox(
lab,
fill: maroon,
color: white,
outset: 3pt,
inset: 3pt,
radius: 5pt,
body,
) = {
link(
label(lab),
)[
#box(
fill: fill,
outset: outset,
inset: inset,
radius: radius,
)[
#text(
fill: color,
size: 0.75em,
)[#body]
]
]
}
#let stylebox(
color_bar: gray,
color_fill: gray,
body
) = {
block(
stroke: (left: color_bar + 4pt,),
fill: color_fill.lighten(80%),
width: 100%,
// inset: (left: 10pt, right: 0pt, rest: 4pt,),
inset: (10pt),
breakable: true,
)[
#body
]
}