forked from jbirnick/typst-great-theorems
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.typ
65 lines (49 loc) · 1.01 KB
/
example.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
#import "@preview/great-theorems:0.1.1": *
#import "@preview/rich-counters:0.2.1": *
#set heading(numbering: "1.1")
#show: great-theorems-init
#show link: text.with(fill: blue)
#let mathcounter = rich-counter(
identifier: "mathblocks",
inherited_levels: 1
)
#let theorem = mathblock(
blocktitle: "Theorem",
counter: mathcounter,
)
#let lemma = mathblock(
blocktitle: "Lemma",
counter: mathcounter,
)
#let remark = mathblock(
blocktitle: "Remark",
prefix: [_Remark._],
inset: 5pt,
fill: lime,
radius: 5pt,
)
#let proof = proofblock()
= Some Heading
#theorem[
This is some theorem.
]
#theorem(number: "A")[
This is a theorem with a custom number.
] <mythm>
#lemma[
This is a lemma. Maybe it's used to prove @mythm.
]
#proof[
This is a proof.
]
= Another Heading
#theorem(title: "some title")[
This is a theorem with a title.
] <thm2>
#proof(of: <thm2>)[
This is a proof of the theorem which has a title.
]
#remark[
This is a remark.
The remark box has some custom styling applied.
]