-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnote_en.typ
110 lines (110 loc) · 2.23 KB
/
note_en.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
#import "common.typ": *
#let def = thmbox(
"thm",
"Def",
inset: (x: 0em, top: 0em),
namefmt: x => strong(text(fill: red, x)),
titlefmt: emph,
base: none,
)
#let pst = thmbox(
"thm",
"Post",
inset: (x: 0em, top: 0em),
namefmt: x => strong(text(fill: red, x)),
titlefmt: emph,
base: none,
)
#let thm = thmbox(
"thm",
"Thm",
inset: (x: 0em, top: 0em),
namefmt: x => strong(text(fill: red, x)),
titlefmt: emph,
base: none,
)
#let coll = thmbox(
"coll",
"Coll",
inset: (x: 0em, top: 0em),
namefmt: x => strong(text(fill: red, x)),
titlefmt: emph,
base: "thm",
)
#let exmp = thmbox(
"thm",
"Exmp",
inset: (x: 0em, top: 0em),
namefmt: x => strong(text(fill: red, x)),
titlefmt: emph,
base: none,
)
#let sol = thmproof(
"sol",
"Sol",
inset: (x: 0em, top: 0em),
titlefmt: x => strong(text(fill: red, x)),
base: "exmp",
)
#let proof = thmproof(
"proof",
"Proof",
inset: (x: 0em, top: 0em),
titlefmt: x => text(fill: red, x),
base: "thm",
)
#let conf(
title: none,
author: none,
numbered-equation: false,
mono-font: "LXGW Bright Code TC",
doc,
) = {
if author != none {
set document(title: title, author: author)
} else {
set document(title: title)
}
set heading(numbering: "1.")
show link: it => underline(text(fill: red, it), offset: 0.2em)
show: codly-init.with()
codly(languages: codly-languages)
set page("a4", numbering: "1", margin: (x: 1.2cm, y: 1.2cm))
set text(
size: 12pt,
font: "Libertinus Serif",
lang: "en",
region: "us",
)
set quote(block: true)
set par(leading: 1em)
align(
center,
text(1.4em)[
*#title*
],
)
if author != none {
align(
center,
text(1.2em)[
#author
],
)
}
show: thmrules
show figure.where(kind: table): set block(breakable: true)
set enum(numbering: n => text(fill: red, numbering("1.", n)))
set list(marker: n => text(fill: red, "•"))
show raw.where(block: false): it => text(fill: maroon, it)
show raw: set text(font: mono-font)
show: rest => columns(2, rest)
set align(left)
set table(stroke: none)
if numbered-equation {
set math.equation(numbering: "(1)", number-align: bottom + right, supplement: [Eq.])
doc
} else {
doc
}
}