-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.tex
167 lines (148 loc) · 4.98 KB
/
settings.tex
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
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}
\counterwithin{figure}{section}
% Packages
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=true,factor=1100,stretch=10,shrink=10]{microtype}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{
colormap={diverging}{
rgb255=(215,25,28)
rgb255=(253,174,97)
rgb255=(255,255,191)
rgb255=(171,221,164)
rgb255=(43,131,186)
},
colormap={sequential}{
rgb255=(255,255,204)
rgb255=(161,218,180)
rgb255=(65,182,196)
rgb255=(44,127,184)
rgb255=(37,52,148)
},
compat=1.16,
}
\usetikzlibrary{calc,arrows,shapes,positioning}
\usepgfplotslibrary{fillbetween}
\usepackage{xparse}
\usepackage{xcolor}
\usepackage{xspace}
\usepackage{amsmath,amsfonts,amsthm,amssymb,mathrsfs,bbm,mathtools,nicefrac,bm,centernot}
\usepackage{enumitem}
\usepackage{hyperref}
\usepackage[font+=footnotesize,justification=justified,singlelinecheck=false,labelfont=bf,labelsep=period,hypcap=false]{caption}
\usepackage[justification=c]{subcaption}
\usepackage{float}
\usepackage{longtable}
\usepackage{derivative}
\usepackage[most]{tcolorbox}
\usepackage[parfill]{parskip}
\usepackage{graphicx}
\usepackage{cleveref}
\usepackage{booktabs}
\usepackage{algpseudocode}
\usepackage{makecell}
\usepackage{mdframed}
\usepackage{thmtools}
\usepackage{natbib}
% Figure support as explained in Gilles Castel's blog post
\usepackage{import}
\usepackage{xifthen}
\usepackage{pdfpages}
\usepackage{transparent}
\newcommand{\incfig}[1]{
\def\svgwidth{\columnwidth}
\import{./figures/}{#1.pdf_tex}
}
\geometry{
paperwidth=210mm,
paperheight=297mm,
left=42pt,
top=72pt,
textwidth=320pt,
marginparsep=20pt,
marginparwidth=180pt,
textheight=650pt,
footskip=40pt,
}
% Fix some stuff
% http://tex.stackexchange.com/questions/76273/multiple-pdfs-with-page-group-included-in-a-single-page-warning
\pdfsuppresswarningpagegroup=1
% Theorem environments
\mdfsetup{skipabove=1em,skipbelow=0em, innertopmargin=10pt, innerbottommargin=10pt}
\declaretheoremstyle[headfont=\bfseries, bodyfont=\normalfont, mdframed={ nobreak }]{box_style}
\declaretheoremstyle[headfont=\bfseries, bodyfont=\normalfont, numbered=no]{nobox_style}
\declaretheoremstyle[headfont=\bfseries, bodyfont=\normalfont, mdframed={ nobreak }, numbered=no]{box_nonumber_style}
\declaretheorem[numberwithin=section, style=box_style, name=Theorem]{theorem}
\declaretheorem[sibling=theorem, style=box_style, name=Example]{example}
\declaretheorem[sibling=theorem, style=box_style, name=Definition]{definition}
\declaretheorem[sibling=theorem, style=box_style, name=Lemma]{lemma}
\declaretheorem[style=nobox_style, name=Remark]{remark}
\declaretheorem[style=nobox_style, name=Properties]{properties}
\declaretheorem[style=nobox_style, name=Observation]{observation}
\declaretheorem[style=box_nonumber_style, name=Corollary]{corollary}
\newmdenv[nobreak]{important}
% Listing environment
\newcounter{listing}
\newcommand\listingname{Listing}
\makeatletter
\newcommand\listoflistings{
\section*{List of listings}
% \begin{fullwidth}%
\@starttoc{loe}
% \end{fullwidth}%
}
\renewcommand\thelisting
{\@arabic\c@listing}
\def\fps@listing{tbp}
\def\ftype@listing{1}
\def\ext@listing{loe}
\def\fnum@listing{\listingname\nobreakspace\thelisting}
\newenvironment{listing}[1][htbp]
{\begin{@tufte@float}[#1]{listing}{}
\begin{mdframed}[backgroundcolor=black!5]}
{\end{mdframed}
\end{@tufte@float}}
\let\l@listing\l@figure
\makeatother
% Algorithm environment
\newcounter{algorithm}
\newcommand\algorithmname{Algorithm}
\makeatletter
\newcommand\listofalgorithms{
\section*{List of algorithms}
\@starttoc{loe}
}
\renewcommand\thealgorithm
{\@arabic\c@algorithm}
\def\fps@algorithm{tbp}
\def\ftype@algorithm{1}
\def\ext@algorithm{loe}
\def\fnum@algorithm{\algorithmname\nobreakspace\thealgorithm}
\newenvironment{algorithm}[1][htbp]
{\begin{@tufte@float}[#1]{algorithm}{}
\begin{mdframed}[backgroundcolor=white]}
{\end{mdframed}
\end{@tufte@float}}
\let\l@algorithm\l@figure
\makeatother
\algdef{SE}[REPEATN]{RepeatN}{End}[1]{\algorithmicrepeat\ #1 \textbf{times}}{\algorithmicend}
\renewcommand{\qedsymbol}{$\blacksquare$}
\usepackage{authoraftertitle}
\renewcommand*{\maketitle}{%
\begin{titlepage}
\setlength{\parindent}{0pt}%
\setlength{\parskip}{4pt}%
{\LARGE\itshape\MyTitle\par}
{\Large\itshape\MyAuthor\par}
{\Large\itshape\today\par}
\vfill
{Note that these are not the official lecture notes of the course, but only notes
written by a student of the course. As such, there might be mistakes. The source code can be found at
\url{github.com/cristianpjensen/eth-cs-notes}. If you find a mistake, please create an
issue or open a pull request.}
\vspace{4cm}
\end{titlepage}
}