-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtemplate.typ
More file actions
167 lines (142 loc) · 3.8 KB
/
template.typ
File metadata and controls
167 lines (142 loc) · 3.8 KB
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
#import "@preview/commute:0.3.0": node, arr, commutative-diagram
#let color_style = "./color.typ"
#let link_color = rgb(0, 0, 255)
#if color_style == "./bw.typ" {
link_color = rgb(0, 0, 0)
}
#let textwidth = 100%;
#let img(path, width: textwidth) = {
align(center, image("../imgs/cat/" + path + ".jpg", width: width))
}
#let bd(term) = [ $bold(#term)$]
#let veck = [$bold("Vect")_k$]
#let homk = [$op("Hom")_k$]
#let hom = [$op("Hom")$]
#let Hom(c) = [$op("Hom")_cal(#c)$]
#let end = [$op("End")$]
#let End(c) = [$op("End")_cal(#c)$]
#let tp = [$times.circle$]
#let ds = [$plus.circle$]
#let iso = [$tilde.equiv$]
#let bij = [$attach(->, t: tilde)$]
#let tpk = [$times.circle_k$]
#let tpr = [$times.circle_R$]
#let tpz = [$times.circle_ZZ$]
#let tpzg = [$times.circle_(ZZ G)$]
#let cA = [$cal(A)$]
#let cB = [$cal(B)$]
#let cC = [$cal(C)$]
#let cD = [$cal(D)$]
#let ob = [$"ob"$]
#let Set = [$bd("Set")$]
#let Cat = [$bd("Cat")$]
#let hyphenMod = [-#text(weight: "bold")[Mod]]
#let RMod = [$R hyphenMod$]
#let kMod = [$k hyphenMod$]
#let GMod = [$G hyphenMod$]
#let ZGMod = [$ZZ G hyphenMod$]
#let ZMod = [$ZZ hyphenMod$]
#let SMod = [$S hyphenMod$]
#let ModR = [$bd("Mod")$-$R$]
#let ModS = [$bd("Mod")$-$S$]
#let homr = [$op("Hom")_R$]
#let homg = [$op("Hom")_G$]
#let endr = [$op("End")_R$]
#let Mod = [$bd("Mod")$]
#let Ab = [$bd("Ab")$]
#let Grp = [$bd("Grp")$]
#let Top = [$bd("Top")$]
#let Id = [$op("Id")$]
#let colim = [$op("colim")$]
#let coim = [$op("coim")$]
#let Coim = [$op("Coim")$]
#let IM = [$op("Im")$]
#let Eq = [$op("eq")$]
#let EQ = [$op("Eq")$]
#let Fun = [$op("Fun")$]
#let Coeq = [$op("coeq")$]
#let COeq = [$op("Coeq")$]
#let coker = [$op("coker")$]
#let Coker = [$op("Coker")$]
#let Ker = [$op("Ker")$]
#let ses(A, B, C, f: "", g: "") = [$0 -> #A ->^#f #B ->^#g #C -> 0$]
#let rgt(A) = [$attach(->, t: #A)$]
#let lft(A) = [$attach(<-, t: #A)$]
#let over = [$\/$]
#let lrm = [left $R$-module]
#let rrm = [right $R$-module]
#let lrms = [left $R$-modules]
#let rrms = [right $R$-modules]
#let oo = [$compose$]
#let mapsto = [$|->$]
#let prshv = [$"Psh"$]
#let Psh = [$"Psh"$]
#let cx = [$circle.filled.small$]
#let Ccx = [$C_cx$]
#let Dcx = [$D_cx$]
#let Cco = [$C^cx$]
#let Dco = [$D^cx$]
#let Ch = [$"Ch"$]
#let sest = [short exact sequence]
#let lest = [long exact sequence]
#let sess = [short exact sequences]
#let less = [long exact sequences]
#let iff = [if and only if]
#let Ext = [$"Ext"$]
#let Tor = [$"Tor"$]
#let cone = [$"cone"$]
#let cyl = [$"cyl"$]
#let Tot = [$"Tot"$]
#let triv = [$"triv"$]
#let fJ = [$frak(J)$]
#let Der = [$"Der"$]
#let PDer = [$"PDer"$]
// #let endlec(n) = [_This is the end of lecture #n._]
#let endlec(n) = []
#let TODO = text(blue)[TODO]
#let fw(doc) = box(width: 100%)[#doc]
#let proof(title: "Proof", term) = block(
width: 100%,
breakable: true,
)[_#title._ #term #h(1fr) $qed$]
// Helper to reference theorems/props with their optional name.
#let thmref(id) = {
context {
if query(id).at(0).caption != none {
[#ref(id) (#query(id).at(0).caption.body)]
} else {
[#ref(id)]
}
}
}
#let project(title: "", authors: (), date: none, body) = {
// Set the document's basic properties.
set document(author: authors, title: title)
set page(numbering: "1", number-align: center)
set text(font: "Linux Libertine", lang: "en")
// Title row.
align(center)[
#block(text(weight: 700, 1.75em, title))
#v(1em, weak: true)
#date
]
// Author information.
pad(
top: 0.5em,
bottom: 0.5em,
x: 2em,
grid(
columns: (1fr,) * calc.min(3, authors.len()),
gutter: 1em,
..authors.map(author => align(center, author)),
),
)
// Main body.
set par(justify: true)
set heading(numbering: "1.1.")
set enum(numbering: "(1)")
show ref: set text(link_color)
show link: set text(link_color)
body
}
#import color_style: *