-
Notifications
You must be signed in to change notification settings - Fork 3
/
shortcuts2.sty
377 lines (357 loc) · 13.7 KB
/
shortcuts2.sty
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
%---- ENVIRONMENTS ----
%
\NewDocumentEnvironment{diagram*}{O{} O{}}{\diagramenvv{#1}{#2}}{\enddiagramenvv}
\NewEnviron{diagramenvv}[2]{\begin{align*}#2\begin{tikzpicture}[line cap=round, line join=round,#1]\BODY\end{tikzpicture}\end{align*}}
\NewDocumentEnvironment{diagram}{O{} O{}}{\diagramenv{#1}{#2}}{\enddiagramenv}
\NewEnviron{diagramenv}[2]{\begin{align}#2\begin{tikzpicture}[line cap=round, line join=round,#1]\BODY\end{tikzpicture}\end{align}}
\NewDocumentCommand\object{O{ob} m m O{}}{\node[#1] (#4) at (#2) {#3}}
\NewDocumentCommand\arrow{O{->} m m O{} O{}}{\draw[#1] (#2) to node[pos=0.5,#4] {#5} (#3)}
\NewDocumentCommand\isoarrow{O{->} m m O{} O{}}{\draw[#1] (#2) to node[pos=0.5, above=-0.25ex, sloped] {$\sim$} node[pos=0.5,#4] {#5} (#3)}
\newcommand{\pushout}[1]{\draw (#1) ++ (-0.75ex,-0.75ex) -- ++(0ex,1.5ex) -- ++ (1.5ex,0ex);\fill (#1) ++ (0.5ex,-0.5ex) circle (0.5pt)}
\newcommand{\pullback}[1]{\draw (#1) ++ (-0.75ex,-0.75ex) -- ++(1.5ex,0ex) -- ++ (0ex,1.5ex);\fill (#1) ++ (-0.5ex,0.5ex) circle (0.5pt)}
\newlength{\arrowlength}
\settowidth{\arrowlength}{$\longrightarrow$}
%---- MANY ALPHABETS ----
%
\renewcommand{\phi}{\varphi}
\renewcommand{\epsilon}{\varepsilon}
\newcommand{\Aa}{\mathcal{A}}
\newcommand{\Bb}{\mathcal{B}}
\newcommand{\Cc}{\mathcal{C}}
\newcommand{\Dd}{\mathcal{D}}
\newcommand{\Ee}{\mathcal{E}}
\newcommand{\Ff}{\mathcal{F}}
\newcommand{\Gg}{\mathcal{G}}
\newcommand{\Hh}{\mathcal{H}}
\newcommand{\Ii}{\mathcal{I}}
\newcommand{\Jj}{\mathcal{J}}
\newcommand{\Kk}{\mathcal{K}}
\newcommand{\Ll}{\mathcal{L}}
\newcommand{\Mm}{\mathcal{M}}
\newcommand{\Nn}{\mathcal{N}}
\newcommand{\Oo}{\mathcal{O}}
\newcommand{\Pp}{\mathcal{P}}
\newcommand{\Qq}{\mathcal{Q}}
\newcommand{\Rr}{\mathcal{R}}
\newcommand{\Ss}{\mathcal{S}}
\newcommand{\Tt}{\mathcal{T}}
\newcommand{\Uu}{\mathcal{U}}
\newcommand{\Vv}{\mathcal{V}}
\newcommand{\Ww}{\mathcal{W}}
\newcommand{\Xx}{\mathcal{X}}
\newcommand{\Yy}{\mathcal{Y}}
\newcommand{\Zz}{\mathcal{Z}}
\newcommand{\IA}{\mathbb{A}}
\newcommand{\IB}{\mathbb{B}}
\newcommand{\IC}{\mathbb{C}}
\newcommand{\ID}{\mathbb{D}}
\newcommand{\IE}{\mathbb{E}}
\newcommand{\IF}{\mathbb{F}}
\newcommand{\IG}{\mathbb{G}}
\newcommand{\IH}{\mathbb{H}}
%\newcommand{\II}{\mathbb{I}}
%\newcommand{\IJ}{\mathbb{J}}
\newcommand{\IK}{\mathbb{K}}
\newcommand{\IL}{\mathbb{L}}
\newcommand{\IM}{\mathbb{M}}
\newcommand{\IN}{\mathbb{N}}
\newcommand{\IO}{\mathbb{O}}
\newcommand{\IP}{\mathbb{P}}
\newcommand{\IQ}{\mathbb{Q}}
\newcommand{\IR}{\mathbb{R}}
\newcommand{\IS}{\mathbb{S}}
\newcommand{\IT}{\mathbb{T}}
\newcommand{\IU}{\mathbb{U}}
\newcommand{\IV}{\mathbb{V}}
\newcommand{\IW}{\mathbb{W}}
\newcommand{\IX}{\mathbb{X}}
\newcommand{\IY}{\mathbb{Y}}
\newcommand{\IZ}{\mathbb{Z}}
\renewcommand{\AA}{\mathfrak{A}}
\newcommand{\BB}{\mathfrak{B}}
\newcommand{\CC}{\mathfrak{C}}
\newcommand{\DD}{\mathfrak{D}}
\newcommand{\EE}{\mathfrak{E}}
\newcommand{\FF}{\mathfrak{F}}
\newcommand{\GG}{\mathfrak{G}}
\newcommand{\HH}{\mathfrak{H}}
\newcommand{\II}{\mathfrak{I}}
\newcommand{\JJ}{\mathfrak{J}}
\newcommand{\KK}{\mathfrak{K}}
\newcommand{\LL}{\mathfrak{L}}
\newcommand{\MM}{\mathfrak{M}}
\newcommand{\NN}{\mathfrak{N}}
\newcommand{\OO}{\mathfrak{O}}
\newcommand{\PP}{\mathfrak{P}}
\newcommand{\QQ}{\mathfrak{Q}}
\newcommand{\RR}{\mathfrak{R}}
\renewcommand{\SS}{\mathfrak{S}}
\newcommand{\TT}{\mathfrak{T}}
\newcommand{\UU}{\mathfrak{U}}
\newcommand{\VV}{\mathfrak{V}}
\newcommand{\WW}{\mathfrak{W}}
\newcommand{\XX}{\mathfrak{X}}
\newcommand{\YY}{\mathfrak{Y}}
\newcommand{\ZZ}{\mathfrak{Z}}
\renewcommand{\aa}{\mathfrak{a}}
\newcommand{\bb}{\mathfrak{b}}
\newcommand{\cc}{\mathfrak{c}}
\newcommand{\dd}{\mathfrak{d}}
\newcommand{\ee}{\mathfrak{e}}
\newcommand{\ff}{\mathfrak{f}}
\let\gge\gg
\renewcommand{\gg}{\mathfrak{g}}
\newcommand{\hh}{\mathfrak{h}}
\newcommand{\ii}{\mathfrak{i}}
\newcommand{\jj}{\mathfrak{j}}
\newcommand{\kk}{\mathfrak{k}}
\let\lle\ll
\renewcommand{\ll}{\mathfrak{l}}
\newcommand{\mm}{\mathfrak{m}}
\newcommand{\nn}{\mathfrak{n}}
\newcommand{\oo}{\mathfrak{o}}
\newcommand{\pp}{\mathfrak{p}}
\newcommand{\qq}{\mathfrak{q}}
\newcommand{\rr}{\mathfrak{r}}
%\newcommand{\ss}{\mathfrak{s}}
%\newcommand{\tt}{\mathfrak{t}}
\newcommand{\uu}{\mathfrak{u}}
\newcommand{\vv}{\mathfrak{v}}
\newcommand{\ww}{\mathfrak{w}}
\newcommand{\xx}{\mathfrak{x}}
\newcommand{\yy}{\mathfrak{y}}
\newcommand{\zz}{\mathfrak{z}}
%---- OPERATORS
%
\newcommand{\newoperator}[1]{\expandafter\def\csname #1\endcsname{\operatorname{#1}}}
\newcommand{\Ann}{\operatorname{Ann}}
\newcommand{\Aann}{\operatorname{\Aa nn}}
\newoperator{Ass}
\newcommand{\Aut}{\operatorname{Aut}}
\newcommand{\cha}{\operatorname{char}}
\newcommand{\codim}{\operatorname{codim}}
\newcommand{\End}{\operatorname{End}}
\newcommand{\Gal}{\operatorname{Gal}}
\newcommand{\Hom}{\operatorname{Hom}}
\newcommand{\Hhom}{\operatorname{\Hh om}}
\newcommand{\hoehe}{\operatorname{ht}}
\newcommand{\id}{\operatorname{id}}
\newoperator{lcm}
\renewcommand{\Im}{\operatorname{Im}}
\newoperator{Coim}
\newcommand{\mSpec}{\mm\operatorname{-Spec}}
\newoperator{Ob}
\newoperator{GL}
\newoperator{SL}
\newoperator{Min}
\newoperator{Sheaf}
\newcommand{\sh}{\mathrm{sh}}
\newcommand{\red}{\mathrm{red}}
\newcommand{\alt}{\mathrm{alt}}
\newoperator {Cl}
\newoperator{Pic}
\newcommand{\PIC}{\mathbf{Pic}}
\newoperator{Sym}
\newcommand{\sym}{\mathrm{sym}}
\newoperator{Div}
\renewcommand{\det}{\operatorname{det}}%otherwise, det_K behaves strangely in displaymode
\newoperator{Mat}
\newoperator{Tr}
\newcommand{\norm}{\operatorname{N}}
\newcommand{\op}{\mathrm{op}}
\newcommand{\sep}{\mathrm{sep}}
\newoperator{rad}
\newoperator{Cov}
\newoperator{Con}
\newoperator{Der}
\newoperator{Funct}
\newoperator{Coeq}
\newoperator{Eq}
\newoperator{Bil}
\newoperator{Cone}
\newoperator{coker}
\newoperator{supp}
\newoperator{im}
\newoperator{coim}
\newoperator{length}
\newoperator{depth}
\newoperator{rank}
\newcommand{\trdeg}{\operatorname{tr.deg}}
\newcommand{\idim}{\operatorname{inj.dim}}
\newcommand{\pdim}{\operatorname{pr.dim}}
\newcommand{\gdim}{\operatorname{gl.dim}}
\newcommand{\fdim}{\operatorname{fl.dim}}
\newoperator{gr}
\renewcommand{\div}{\operatorname{div}}
\newoperator{Tor}
\newoperator{Tot}
\newoperator{Ext}
\newoperator{sgn}
\DeclareMathOperator{\SPEC}{\mathbf{Spec}}
\DeclareMathOperator{\PROJ}{\mathbf{Proj}}
\newcommand{\proj}{\mathrm{proj}}
\newcommand{\aff}{\mathrm{aff}}
\newcommand{\nil}{\operatorname{nil}}
\newcommand{\Spec}{\operatorname{Spec}}
\newoperator{Proj}
\newoperator{res}
\newoperator{Frob}
\renewcommand*\d{\mathop{}\!\mathrm{d}}
\newcommand{\an}{\mathrm{an}}
\newcommand{\Top}{\mathrm{Top}}
\newcommand{\Zar}{\mathrm{Zar}}
\newcommand{\et}{\mathrm{\acute{e}t}}
\newcommand{\fppf}{\mathrm{fppf}}
\newcommand{\fpqc}{\mathrm{fpqc}}
\newcommand{\hor}{\mathrm{hor}}
\newcommand{\ver}{\mathrm{vert}}
\newcommand{\tr}{\operatorname{tr}}
\newcommand{\cat}[1]{\StrLen{#1}[\temp]%\temp
\ifnum\temp=1%
\boldsymbol{#1}%
\else%
\mathbf{#1}%
\fi%
}%style of categories
%inductive limit
\NewDocumentCommand\colimit{O{} O{}}{
\mathchoice{\underset{\substack{\displaystyle{\longrightarrow}\\[-1pt]#1}}{\lim}#2}%displaystyle
{\underset{\textstyle\longrightarrow}{\lim}#2_{#1}}%textstyle
{\underset{\scriptstyle\longrightarrow}{\lim}#2_{#1}}
{\underset{\longrightarrow}{\lim}#2_{#1}}\ %
}
%projective limit
\NewDocumentCommand\limit{O{} O{}}{
\mathchoice{\underset{\substack{\displaystyle{\longleftarrow}\\[-1pt]#1}}{\lim}#2}%displaystyle
{\underset{\textstyle\longleftarrow}{\lim}#2_{#1}}%textstyle
{\underset{\scriptstyle\longleftarrow}{\lim}#2_{#1}}
{\underset{\longleftarrow}{\lim}#2_{#1}}\ %
}
%---- FANCY ARROWS ----
%
\newcommand{\longto}{\longrightarrow}
\newcommand{\longot}{\longleftarrow}
\newcommand{\isomorphism}[1][]{
\mathrel{\tikz[baseline=(a.base)] \node (a) at (0,0) {$\!\!\longrightarrow\!\!$} node[above=-0.25ex] {\smash{\tiny $\sim$}} node[below=-0.25ex] {$\scriptstyle #1$};}}
\newcommand{\lisomorphism}[1][]{
\mathrel{\tikz[baseline=(a.base)] \node (a) at (0,0) {$\!\!\longleftarrow\!\!$} node[above=-0.25ex] {\tiny $\sim$} node[below=-0.25ex] {$\scriptstyle #1$};}}
\NewDocumentCommand{\doublemorphism}{O{} O{}}{\mathrel{\overset{#1}{\underset{#2}{\substack{\textstyle\longrightarrow\\[-0.67ex]
\textstyle\longrightarrow}}}}}
\NewDocumentCommand{\doublelmorphism}{O{} O{}}{\mathrel{\overset{#1}{\underset{#2}{\substack{\textstyle\longleftarrow\\[-0.67ex]
\textstyle\longleftarrow}}}}}
\NewDocumentCommand{\doublelrmorphism}{O{} O{}}{\mathrel{\overset{#1}{\underset{#2}{\substack{\textstyle\longrightarrow\\[-0.67ex]
\textstyle\longleftarrow}}}}}
\NewDocumentCommand{\xdoublemorphism}{O{} O{}}{\mathrel{\substack{\textstyle\xrightarrow[\hphantom{#2}]{#1}\\[-2.45ex]
\textstyle\xrightarrow[#2]{\hphantom{#1}}}}}
\NewDocumentCommand{\xdoublelmorphism}{O{} O{}}{\mathrel{\substack{\textstyle\xleftarrow{#1}\\[-0.67ex]
\textstyle\xleftarrow[#2]{}}}}
\NewDocumentCommand{\xdoublelrmorphism}{O{} O{}}{\mathrel{\substack{\textstyle\xleftrightarrow{#1}\\[-0.67ex]
\textstyle\xleftrightarrow[#2]{}}}}
\newcommand{\IsArgEmpty}[3]{%
\if\relax\detokenize{#1}\relax%
#2%
\else%
#3%
\fi}
\DeclareRobustCommand\longtwoheadrightarrow
{\relbar\joinrel\twoheadrightarrow}
\DeclareRobustCommand\longtwoheadleftarrow
{\twoheadleftarrow\joinrel\relbar}
\newcommand{\morphism}[1][]{%
\mathchoice{\overset{#1}{\longto}}%
{\IsArgEmpty{#1}{\rightarrow}{\overset{#1}{\longrightarrow}}}%
{\IsArgEmpty{#1}{\rightarrow}{\overset{#1}{\longrightarrow}}}%
{\IsArgEmpty{#1}{\rightarrow}{\overset{#1}{\longrightarrow}}}%
}
\newcommand{\lmorphism}[1][]{%
\mathchoice{\overset{#1}{\longot}}%
{\IsArgEmpty{#1}{\leftarrow}{\overset{#1}{\longleftarrow}}}%
{\IsArgEmpty{#1}{\leftarrow}{\overset{#1}{\longleftarrow}}}%
{\IsArgEmpty{#1}{\leftarrow}{\overset{#1}{\longleftarrow}}}%
}
\newcommand{\lrmorphism}[1][]{%
\mathchoice{\overset{#1}{\longleftrightarrow}}%
{\IsArgEmpty{#1}{\leftrightarrow}{\overset{#1}{\longleftrightarrow}}}%
{\IsArgEmpty{#1}{\leftrightarrow}{\overset{#1}{\longleftrightarrow}}}%
{\IsArgEmpty{#1}{\leftrightarrow}{\overset{#1}{\longleftrightarrow}}}%
}
\newcommand{\monomorphism}[1][]{%
\mathchoice{\overset{#1}{\mathrel{\smash{\longhookrightarrow}\vphantom{\rightarrow}}}}%
{\IsArgEmpty{#1}{\hookrightarrow}{\overset{#1}{\mathrel{\smash{\longhookrightarrow}\vphantom{\rightarrow}}}}}%
{\IsArgEmpty{#1}{\hookrightarrow}{\overset{#1}{\mathrel{\smash{\longhookrightarrow}\vphantom{\rightarrow}}}}}%
{\IsArgEmpty{#1}{\hookrightarrow}{\overset{#1}{\mathrel{\smash{\longhookrightarrow}\vphantom{\rightarrow}}}}}%
}
\newcommand{\lmonomorphism}[1][]{%
\mathchoice{\overset{#1}{\mathrel{\smash{\longhookleftarrow}\vphantom{\rightarrow}}}}%
{\IsArgEmpty{#1}{\hookleftarrow}{\overset{#1}{\mathrel{\smash{\longhookleftarrow}\vphantom{\rightarrow}}}}}%
{\IsArgEmpty{#1}{\hookleftarrow}{\overset{#1}{\mathrel{\smash{\longhookleftarrow}\vphantom{\rightarrow}}}}}%
{\IsArgEmpty{#1}{\hookleftarrow}{\overset{#1}{\mathrel{\smash{\longhookleftarrow}\vphantom{\rightarrow}}}}}%
}
\newcommand{\epimorphism}[1][]{%
\mathchoice{\overset{#1}{\mathrel{\smash{\longtwoheadrightarrow}\vphantom{\rightarrow}}}}%
{\IsArgEmpty{#1}{\twoheadrightarrow}{\overset{#1}{\mathrel{\smash{\longtwoheadrightarrow}\vphantom{\rightarrow}}}}}%
{\IsArgEmpty{#1}{\twoheadrightarrow}{\overset{#1}{\mathrel{\smash{\longtwoheadrightarrow}\vphantom{\rightarrow}}}}}%
{\IsArgEmpty{#1}{\twoheadrightarrow}{\overset{#1}{\mathrel{\smash{\longtwoheadrightarrow}\vphantom{\rightarrow}}}}}%
}
\newcommand{\lepimorphism}[1][]{%
\mathchoice{\overset{#1}{\mathrel{\smash{\longtwoheadleftarrow}\vphantom{\rightarrow}}}}%
{\IsArgEmpty{#1}{\twoheadleftarrow}{\overset{#1}{\mathrel{\smash{\longtwoheadleftarrow}\vphantom{\rightarrow}}}}}%
{\IsArgEmpty{#1}{\twoheadleftarrow}{\overset{#1}{\mathrel{\smash{\longtwoheadleftarrow}\vphantom{\rightarrow}}}}}%
{\IsArgEmpty{#1}{\twoheadleftarrow}{\overset{#1}{\mathrel{\smash{\longtwoheadleftarrow}\vphantom{\rightarrow}}}}}%
}
\newcommand{\converge}{%
\mathchoice{\Longrightarrow}%
{\Rightarrow}%
{\Rightarrow}%
{\Rightarrow}%
}
\newcommand{\lconverge}{%
\mathchoice{\Longleftarrow}%
{\Leftarrow}%
{\Leftarrow}%
{\Leftarrow}%
}
%---- MODIFIERS ----
%
\newcommand{\ov}{\overline}
\newcommand{\hacek}[1]{\check{#1}\hspace{0.06125em}}
\DeclareMathSymbol{\widehatsym}{\mathord}{largesymbols}{"62}
\newcommand\lowerwidehatsym{%
\text{\smash{\raisebox{-1.3ex}{%
$\widehatsym$}}}}
\newcommand\fixwidehat[1]{\accentset{\displaystyle\lowerwidehatsym}{#1}}%
%\mathchoice
%{\accentset{\displaystyle\lowerwidehatsym}{#1}}
%{\accentset{\textstyle\lowerwidehatsym}{#1}}
%{\accentset{\scriptstyle\lowerwidehatsym}{#1}}
%{\accentset{\scriptscriptstyle\lowerwidehatsym}{#1}}
%}
\DeclareMathSymbol{\widetildesym}{\mathord}{largesymbols}{"65}
\newcommand\lowerwidetildesym{%
\text{\smash{\raisebox{-1.3ex}{%
$\widetildesym$}}}}
\newcommand\fixwidetilde[1]{\accentset{\displaystyle\lowerwidetildesym}{#1}}%
%\mathchoice
%{\accentset{\displaystyle\lowerwidetildesym}{#1}}
%{\accentset{\textstyle\lowerwidetildesym}{#1}}
% {\accentset{\scriptstyle\lowerwidetildesym}{#1}}
%{\accentset{\scriptscriptstyle\lowerwidetildesym}{#1}}
%}
\newcommand{\snake}[1]{\fixwidetilde{#1}}%space adjusting hack
\newcommand{\roof}[1]{\fixwidehat{#1}}
\newcommand{\complete}{\lowerwidehatsym}
\newcommand{\qcmod}{\lowerwidetildesym}
%---- MISCELLANEOUS ----
%
\newcommand{\defemph}[1]{\textbf{\upshape#1}} %emphasize style of a to-be-defined object in a definition
\newcommand{\itememph}[1]{$(#1)$} %style of alphabetically ordered items
\newcommand{\NAK}{\hyperref[prop:NAK]{[NAK]}}
\newcommand{\ldotspam}{,\ldots,}
\newcommand{\ordinalst}{^{\text{st}}}
\newcommand{\ordinalnd}{^{\text{nd}}}
\newcommand{\ordinalrd}{^{\text{rd}}}
\newcommand{\ordinalth}{^{\text{th}}}
\newcommand{\st}{\ \middle|\ }
%\newcommand{\dashed}{dash pattern = on 2pt off 2pt}
%fibre products
\newcommand{\fprod}[1]{\sideset{}{_{#1}}\prod}