-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.typ
119 lines (110 loc) · 1.55 KB
/
utils.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
#let definintion(body, name: "") = {
box(
fill: yellow.lighten(70%),
width: 100%,
inset: 12pt,
outset: 0pt,
radius: 0pt,
clip: true,
)[
#text(
size: 10pt,
weight: "bold",
)[
定义: #name
]
#set text(size: 9pt)
#body
]
}
#let statement(body, name: "") = {
box(
width: 100%,
stroke: (
paint: blue,
thickness: 0.5pt,
),
inset: 12pt,
outset: 0pt,
radius: 0pt,
clip: true,
)[
#text(
size: 11pt,
weight: "bold",
)[
定理: #name
]
#set text(size: 9pt)
#body
]
}
#let proof(body) = {
box(
width: 100%,
stroke: (
paint: red,
thickness: 0.5pt,
),
inset: 12pt,
outset: 0pt,
radius: 0pt,
clip: true,
)[
#text(
size: 11pt,
weight: "bold",
)[
证明:
]
#set text(size: 9pt)
#body
]
}
#let homework(body) = {
box(
width: 100%,
stroke: (
paint: red,
thickness: 0.5pt,
),
inset: 12pt,
outset: 0pt,
radius: 3pt,
clip: true,
)[
#text(
size: 9pt,
weight: "bold",
)[
请思考/证明:
]
#set text(size: 9pt)
#body
#line(length: 100%, stroke: 0.2pt)
$=>$
#v(2cm)
]
}
#let caption(body) = {
box(
width: 100%,
stroke: (
paint: black,
thickness: 0.5pt,
),
inset: 10pt,
outset: 0pt,
radius: 0pt,
clip: true,
)[
#text(
size: 9pt,
weight: "bold",
)[
提示:
]
#set text(size: 9pt)
#body
]
}