-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.sty
More file actions
348 lines (308 loc) · 10.3 KB
/
style.sty
File metadata and controls
348 lines (308 loc) · 10.3 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
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
\ProvidesPackage{style}
\usepackage[a4paper, total={6in, 9in}]{geometry}
\usepackage[utf8]{inputenc}
\setlength{\parindent}{0ex}
\usepackage{microtype}
\usepackage{physics}
\usepackage[most]{tcolorbox}
\usepackage{xparse}
% \usepackage{accents}
\usepackage{pdfpages}
\usepackage{wrapfig}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{bbm}
\usepackage[english]{babel}
\usepackage[autostyle]{csquotes}
\usepackage{tikz-cd}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{thmtools}
\usepackage{float}
\usepackage{multicol}
\usepackage{pgfplots}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{enumitem}
\usepackage{mathtools}
\usepackage{titlesec}
\usepackage{import}
\usepackage{xifthen}
\usepackage{transparent}
\usepackage{tocloft}
\usepackage{tocbibind}
\usepackage{imakeidx}
\usepackage{fancyhdr}
\usepackage{hyperref}
\hypersetup{colorlinks = true, linkcolor = blue, urlcolor = cyan}
\pgfplotsset{compat=1.18}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.pathmorphing}
\usepackage[style={long}]{glossaries-extra} % Load this last
% Activate externalization!
% \usepgfplotslibrary{external}
% \tikzexternalize[prefix=figures/]
% Colours (from https://latexcolor.com)
\definecolor{royalazure}{rgb}{0.0, 0.22, 0.66}
\definecolor{beige}{rgb}{0.96, 0.96, 0.86}
\definecolor{richlavender}{rgb}{0.67, 0.38, 0.8}
\definecolor{cosmiclatte}{rgb}{1.0, 0.97, 0.91}
\definecolor{lavenderblush}{rgb}{1.0, 0.94, 0.96}
\definecolor{electriclavender}{rgb}{0.96, 0.73, 1.0}
\definecolor{frenchrose}{rgb}{0.96, 0.29, 0.54}
\definecolor{nadeshikopink}{rgb}{0.96, 0.68, 0.78}
\definecolor{lawngreen}{rgb}{0.49, 0.99, 0.0}
\definecolor{limegreen}{rgb}{0.2, 0.8, 0.2}
\definecolor{azure(web)(azuremist)}{rgb}{0.94, 1.0, 1.0}
\definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0}
\definecolor{anti-flashwhite}{rgb}{0.95, 0.95, 0.96}
\definecolor{darkcerulean}{rgb}{0.03, 0.27, 0.49}
\definecolor{grrr}{HTML}{fcfcfa}
\definecolor{blue(ncs)}{rgb}{0.0, 0.53, 0.74}
\definecolor{bluegray}{rgb}{0.4, 0.6, 0.8}
\definecolor{darkblue}{rgb}{0.0, 0.0, 0.55}
\definecolor{brightmaroon}{rgb}{0.76, 0.13, 0.28}
\definecolor{cerulean}{rgb}{0.0, 0.48, 0.65}
\setcounter{tocdepth}{1}
\allowdisplaybreaks
\titleformat{\chapter}[display]{\normalfont\sffamily\Large\bfseries}{\chaptertitlename\ \thechapter}{0pt}{\Huge}
\titleformat{\section}{\normalfont\sffamily\Large\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}{\normalfont\sffamily\large\bfseries}{\thesubsection}{1em}{}
% Font changes to ToC content of sectional units
\renewcommand{\cftchapfont}{\normalfont\sffamily\bfseries} % \chapter font in ToC
\renewcommand{\cftsecfont}{\normalfont\sffamily} % \section font in ToC
\renewcommand{\cftsubsecfont}{\normalfont\sffamily} % \section font in ToC
\renewcommand{\cfttoctitlefont}{\normalfont\sffamily\Huge\bfseries}
\renewcommand{\cftchappagefont}{\normalfont\sffamily\bfseries}
\renewcommand{\cftsecpagefont}{\normalfont\sffamily}
% Theorem styles
\declaretheoremstyle[name=Theorem, headfont={\sffamily\color{darkblue}}, bodyfont={\itshape}]{thmsty}
\declaretheorem[style=thmsty,numberwithin=section]{theorem}
\declaretheoremstyle[name=Proposition,]{prosty}
\declaretheorem[style=prosty,numberlike=theorem]{proposition}
\declaretheoremstyle[name=Definition, headfont={\sffamily\color{cerulean}}]{defsty}
\declaretheorem[style=defsty,numberlike=theorem]{definition}
\declaretheoremstyle[name=Corollary, bodyfont={\itshape}, headfont={\sffamily\color{darkblue}}]{corsty}
\declaretheorem[style=corsty,numberlike=theorem]{corollary}
\declaretheoremstyle[name=Remark, headfont={\sffamily\color{brightmaroon}}]{rmksty}
\declaretheorem[style=rmksty,numberlike=theorem]{remark}
% Custom environments
\newtcbtheorem[number within=section]{Def}{Definition}{
breakable, enhanced,
attach boxed title to top left={xshift=3mm, yshift=-3mm, yshifttext=-1mm},
coltitle=black,
colbacktitle=black!5,
fonttitle=\sffamily,
colback=white,
colframe=black,
leftrule=0.5mm,
rightrule=0.2mm,
toprule=0.2mm,
bottomrule=0.2mm,
arc=2.5mm,
separator sign={\ $\blacktriangleright$},
description delimiters none,
description font=\mdseries}{def}
\newtcbtheorem[no counter]{Quote}{}{
breakable, enhanced,
attach boxed title to bottom right={xshift=-3mm, yshift=3mm, yshifttext=1mm},
fonttitle=\sffamily,
coltitle=black,
colbacktitle=cosmiclatte,
colback=black!10!white,
colframe=black,
arc=2.5mm,
separator sign none,
description delimiters none,
description font=\mdseries}{quote}
\newtcbtheorem[number within=section]{Thm}{\textcolor{darkcerulean}{\textbf{Theorem}}}{
detach title,
fonttitle=\bfseries,
coltitle=black,
colbacktitle=white,
colback=grrr,
colframe=black,
sharp corners,
bottomrule= -0.1cm,
rightrule=-0.1cm,
toprule=-0.1cm,
leftrule=0.065cm,
separator sign none, description delimiters={(}{)\,},
description font=\scshape,
before upper={\tcbtitle}}{th}
\newtcbtheorem[no counter]{ThmN}{Theorem}{
breakable, enhanced,
attach boxed title to top left={xshift=3mm, yshift=-3mm, yshifttext=-1mm},
fonttitle=\sffamily,
coltitle=black,
colbacktitle=cosmiclatte,
colback=teal!6,
colframe=richlavender,
separator sign none, description delimiters parenthesis,
description font=\mdseries}{th}
\newtcbtheorem[number within=section]{Lem}{Lemma}{
breakable, enhanced,
fonttitle=\sffamily,
coltitle = black,
colbacktitle = black!5,
titlerule = 0mm,
colback = black!5,
colframe = black,
arc = 0mm,
leftrule = 1.5mm,
rightrule = 0mm,
toprule = 0mm,
bottomrule = 0mm,
separator sign none, description delimiters parenthesis}{lem}
\newtcbtheorem[no counter]{LemN}{Lemma}{
breakable, enhanced,
fonttitle=\sffamily,
coltitle = black,
colbacktitle = black!5,
titlerule = 0mm,
colback = black!5,
colframe = black,
arc = 0mm,
leftrule = 1.5mm,
rightrule = 0mm,
toprule = 0mm,
bottomrule = 0mm,
separator sign none, description delimiters parenthesis}{lem}
\newtcbtheorem[no counter]{Cor}{Corollary}{
breakable, enhanced,
fonttitle=\sffamily,
colbacktitle = lavenderblush,
coltitle = frenchrose,
titlerule = 0mm,
colback = lavenderblush,
colframe = nadeshikopink,
arc = 4mm,
sharp corners = southwest,
sharp corners = northeast,
separator sign none, description delimiters parenthesis}{cor}
\newtcbtheorem[number within=section]{Eg}{\textbf{Example}}{
breakable, enhanced,
% attach boxed title to top left={xshift=3mm, yshift=-3mm, yshifttext=-1mm},
fonttitle=\sffamily,
coltitle=black,
colbacktitle=white,
colback=white,
colframe=white,
separator sign none, description delimiters parenthesis,
description font=\mdseries}{eg}
\newtcolorbox{clmBox}{
title = \sbold{Claim},
coltitle = white,
titlerule = 0.5mm,
halign title = flush left,
halign = flush left,
colback = azure(web)(azuremist),
colframe = black!70,
arc = 2mm
}
\newtcolorbox{notnBox}{
breakable, enhanced,
title = \textsf{Now we will introduce some notation},
coltitle = black,
colbacktitle = white,
titlerule = 0.5mm,
halign title = flush left,
halign = flush left,
colback = white,
colframe = white,
arc = 0mm}
\newtcolorbox{noteBox}{
title = \sbold{Note},
coltitle = black,
titlerule = 0.5mm,
halign title = flush left,
halign = flush left,
colback = anti-flashwhite,
colframe = white,
arc = 0mm}
\newenvironment{proofFig}[6][\proofname]{\par
\pushQED{\qed}%
\normalfont \topsep6\p@\@plus6\p@\relax
{\noindent\textit{#1}\@addpunct{.}\hspace{\the\labelsep}}%
\begin{wrapfigure}[{#5}]{r}{#6}
\centering
#2
\caption{#3}
#4
\end{wrapfigure}%
\ignorespaces
}{%
\popQED\@endpefalse
\par
\vspace*{\the\parsep}
}
\newcommand{\sbold}[1]{\textsf{\textbf{#1}}}
\newcommand{\bb}[1]{\mathbbm{#1}}
\newcommand{\N}{\bb{N}}
\newcommand{\Z}{\bb{Z}}
\newcommand{\Q}{\bb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\bb{C}}
\newcommand{\mO}{\mathcal{O}}
\newcommand{\Op}[1]{\mathcal{O}_{#1}}
\newcommand{\msk}{\medskip}
\newcommand{\ssk}{\smallskip}
\newcommand{\bsk}{\bigskip}
\newcommand{\Qed}{\quad \blacksquare}
\newcommand{\contra}{\rightarrow \leftarrow}
\newcommand{\heart}{\ensuremath\heartsuit}
\newcommand{\butt}{\rotatebox[origin=c]{180}{\heart}}
% More math commands
\newcommand{\ltag}[2]{\label{#1} \tag{#2}}
\newcommand{\floor}[1]{\lfloor {#1} \rfloor}
\newcommand{\inp}[2]{\left\langle {#1}, {#2} \right\rangle}
\newcommand{\vphi}{\varphi}
\newcommand{\veps}{\varepsilon}
\newcommand{\pdot}[2]{{#1} \cdot {#2}}
\newcommand{\Hol}{\operatorname{\mathbf{Hol}}}
\newcommand{\Area}{\operatorname{Area}}
\newcommand{\ran}{\operatorname{ran}}
\newcommand{\Vol}{\operatorname{Vol}}
% for commutative diagrams
\tikzset{curve/.style={settings={#1},to path={(\tikztostart)
.. controls ($(\tikztostart)!\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$)
and ($(\tikztostart)!1-\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$)
.. (\tikztotarget)\tikztonodes}},
settings/.code={\tikzset{quiver/.cd,#1}
\def\pv##1{\pgfkeysvalueof{/tikz/quiver/##1}}},
quiver/.cd,pos/.initial=0.35,height/.initial=0}
% TikZ arrowhead/tail styles.
\tikzset{tail reversed/.code={\pgfsetarrowsstart{tikzcd to}}}
\tikzset{2tail/.code={\pgfsetarrowsstart{Implies[reversed]}}}
\tikzset{2tail reversed/.code={\pgfsetarrowsstart{Implies}}}
% TikZ arrow styles.
\tikzset{no body/.style={/tikz/dash pattern=on 0 off 1mm}}
% taken from quiver
%----Helper code for dealing with external references----
% (by cyberSingularity at http://tex.stackexchange.com/a/69832/226)
\usepackage{xr}
\makeatletter
\newcommand*{\addFileDependency}[1]{% argument=file name and extension
\typeout{(#1)}% latexmk will find this if $recorder=0
% however, in that case, it will ignore #1 if it is a .aux or
% .pdf file etc and it exists! If it doesn't exist, it will appear
% in the list of dependents regardless)
%
% Write the following if you want it to appear in \listfiles
% --- although not really necessary and latexmk doesn't use this
%
\@addtofilelist{#1}
%
% latexmk will find this message if #1 doesn't exist (yet)
\IfFileExists{#1}{}{\typeout{No file #1.}}
}\makeatother
\newcommand*{\myexternaldocument}[1]{%
\externaldocument{#1}%
\addFileDependency{#1.tex}%
\addFileDependency{#1.aux}%
}
%------------End of helper code--------------
\endinput