-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.tex
192 lines (158 loc) · 7.76 KB
/
setup.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
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
%------------------------------------------------------------------------------
% package includes
%------------------------------------------------------------------------------
% font encoding is set up for pdflatex, for other environments see
% http://tex.stackexchange.com/questions/44694/fontenc-vs-inputenc
\usepackage[T1]{fontenc} % 8-bit fonts, improves handling of hyphenations
\usepackage[utf8x]{inputenc}
% provides `old' commands for table of contents. Eases the ability to switch
% between book and scrbook
\usepackage{scrhack}
% AMS Euler font setup
\usepackage{tgpagella}
\usepackage{eulerpx}
\usepackage{eucal}
\usepackage{eufrak}
\newcommand\BbbC{\ensuremath{\mathbb{C}}}
\DeclareSymbolFont{eulerup}{U}{zeur}{m}{n}
\DeclareMathSymbol{\uppi}{\mathalpha}{eulerup}{"19}
\DeclareMathSymbol{\upi}{\mathalpha}{eulerup}{"69}
\setcounter{tocdepth}{1}
% ------------------- layout, default -------------------
% adjust the style of float's captions, separated from text to improve readabilty
\usepackage[labelfont=bf, labelsep=colon, format=hang, textfont=singlespacing]{caption}
% With format = hang your caption will look like this:
% Figure 1: Lorem ipsum dolor sit amet,
% consectetuer adipiscing elit.
% Ut purus elit, vestibulum
% If you instead want
% Figure 1: Lorem ipsum dolor sit amet,
% consectetuer adipiscing elit. Ut purus
% elit, vestibulum
% change to format=plain
\usepackage{chngcntr} % continuous numbering of figures/tables over chapters
\counterwithout{equation}{chapter}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
% Uncomment the following line if you switch from scrbook to book
% and comment the setkomafont line
\usepackage{titlesec} % remove "Chapter" from the chapter title
\titleformat{\chapter}[hang]{\bfseries\huge}{\thechapter}{2pc}{\huge}
% \setkomafont{chapter}{\normalfont\bfseries\huge}
\usepackage{setspace} % Line spacing
\singlespacing
% \onehalfspacing
% \doublespacing % uncomment for double spacing, e.g. for annotations in correction
% \setlength{\parskip}{\baselineskip}%
\setlength{\parindent}{0pt}%
% ------------------- functional, default-------------------
\usepackage{natbib}
\usepackage[dvipsnames]{xcolor} % more colors
\usepackage{array} % custom format per column in table - needed on the title page
\usepackage{graphicx} % include graphics
\usepackage{subfig} % divide figure, e.g. 1(a), 1(b)...
\usepackage{amsmath} % |
\usepackage{amsthm} % | math, bmatrix etc
\usepackage{amsfonts} % |
\usepackage{amssymb}
\usepackage{minted}
\usepackage{calc} % calculate within LaTeX
\usepackage[unicode=true,bookmarks=true,bookmarksnumbered=true,
bookmarksopen=true,bookmarksopenlevel=1,breaklinks=false,
pdfborder={0 0 0},backref=false,colorlinks=false]{hyperref}
%==========================================
% You might not need the following packages, I only included them as they
% are needed for the example floats
% ------------------- functional, custom -------------------
\usepackage{algorithm,algpseudocode}
\usepackage{bm} % bold greek variables (boldmath)
\usepackage{tikz}
\usetikzlibrary{positioning} % use: above left of, etc
% Improves general appearance of the text
\usepackage[protrusion=true,expansion=true, kerning]{microtype}
\usepackage{enumitem}
% usually you don't need this, just for demonstration of a longer caption
\usepackage{lipsum}
%------------------------------------------------------------------------------
% (re)new commands / settings
%------------------------------------------------------------------------------
% ----------------- referencing ----------------
\newcommand{\secref}[1]{Section~\ref{#1}}
\newcommand{\chapref}[1]{Chapter~\ref{#1}}
\renewcommand{\eqref}[1]{Equation~(\ref{#1})}
\newcommand{\figref}[1]{Figure~\ref{#1}}
\newcommand{\tabref}[1]{Table~\ref{#1}}
\newcommand{\listref}[1]{Listing~\ref{#1}}
\newcommand{\lemref}[1]{Lemma~\ref{#1}}
% ------------------- colors -------------------
\definecolor{darkgreen}{rgb}{0.0, 0.5, 0.0}
% Colors of the Albert Ludwigs University as in
% https://www.zuv.uni-freiburg.de/service/cd/cd-manual/farbwelt
\definecolor{UniBlue}{RGB}{0, 74, 153}
\definecolor{UniRed}{RGB}{193, 0, 42}
\definecolor{UniGrey}{RGB}{154, 155, 156}
% ------------------- layout -------------------
% prevents floating objects from being placed ahead of their section
\let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}
\let\mySubSection\subsection\renewcommand{\subsection}{\suppressfloats[t]\mySubSection}
% ------------------- marker commands -------------------
% ToDo command
\newcommand{\todo}[1]{\textbf{\textcolor{red}{(TODO: #1)}}}
\newcommand{\extend}[1]{\textbf{\textcolor{darkgreen}{(EXTEND: #1)}}}
% Lighter color to note down quick drafts
\newcommand{\draft}[1]{\textbf{\textcolor{NavyBlue}{(DRAFT: #1)}}}
% ------------------- math formatting commands -------------------
% define vectors to be bold instead of using an arrow
\renewcommand{\vec}[1]{\mathbf{#1}}
\newcommand{\mat}[1]{\mathbf{#1}}
% tag equation with name
\newcommand{\eqname}[1]{\tag*{#1}}
\newcommand{\coqcode}[1]{\mintinline{coq}{#1}}
% ------------------- pdf settings -------------------
% ADAPT THIS
\hypersetup{pdftitle={\thetitle},
pdfauthor={\theauthor},
pdfsubject={Master's thesis at the Albert Ludwig University of Freiburg},
pdfkeywords={type theory, modal logic, linear logic},
pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false}
%==========================================
% You might not need the following commands, I only included them as they
% are needed for the example floats
% ------------------- Tikz styles -------------------
\tikzset{>=latex} % arrow style
% ------------------- Theorems ----------------------
\newcommand{\lqed}{\hfill\hbox{$\lozenge$}}
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{axiom}[theorem]{Axiom}
\theoremstyle{definition}
\newtheorem{definitionX}[theorem]{Definition}
\newenvironment{definition} %
{\renewcommand{\qedsymbol}{$\lozenge$}%
\pushQED{\qed}\begin{definitionX}}
{\popQED\end{definitionX}}
% ------------------- Definitions -------------------
\newcommand{\ang}[1]{\left\langle #1 \right\rangle}
\newcommand{\ceil}[1]{\left\lceil #1 \right\rceil}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\renewcommand{\diamond}{\lozenge}
\newcommand{\T}{\mathfrak{T}}
\newcommand{\A}{\mathfrak{A}}
\renewcommand{\t}{\mathfrak{t}}
\newcommand{\e}{\mathfrak{e}}
\renewcommand{\v}{\mathfrak{v}}
\newcommand{\n}{\mathfrak{n}}
% ------------------- algorithm ---------------------
% Command to align comments in algorithm
\newcommand{\alignedComment}[1]{\Comment{\parbox[t]{.35\linewidth}{#1}}}
% define a foreach command in algorithms
\algnewcommand\algorithmicforeach{\textbf{foreach}}
\algdef{S}[FOR]{ForEach}[1]{\algorithmicforeach\ #1\ \algorithmicdo}
% line spacing should be 1.5
\renewcommand{\baselinestretch}{1.5}
% % more paragraph spacing
% \setlength{\parskip}{1em}
% set distance between items in a list, for more details see the
% enumitem package: https://www.ctan.org/pkg/enumitem
\setlist{itemsep=.5em}