-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaside_style.typ
More file actions
34 lines (26 loc) · 964 Bytes
/
aside_style.typ
File metadata and controls
34 lines (26 loc) · 964 Bytes
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
// Custom typst element (https://typst.app/docs/reference/)
#let aside(title, body) = {
// Title block
block(
// Outer block styled like a note block
fill: rgb(244, 147, 147), // background - VS code automatically changes this to rgba sometimes which does not work.
stroke: (left: 1pt + red), // red line on the left
width: 100%,
// add padding top and bottom
inset: (x: 0.8em, y: 0.4em),
above: 0.5em, //distance top to next element above
below: 0em, //distance bottom to next element below
strong(title)
)
block(
// Inner block for the body of the aside
fill: rgb(240, 240, 240), // white background
stroke: (left: 1pt + red),
width: 100%,
// add padding top and bottom
inset: (x: 0.8em, y: 0.6em),
above: 0em,
below: 0.5em,
body
)
}