-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy paththesis.tex
186 lines (148 loc) · 4.35 KB
/
thesis.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
% This is the root file of the thesis: thesis.tex
%%===================================
% \documentclass[12pt, oneside]{report}
\documentclass[12pt, twoside]{report}
\usepackage{url}
\usepackage[utf8]{inputenc} % This defines the font-encoding you prefer to use
\usepackage[pdftex]{graphicx}
\usepackage[bindingoffset=1cm,centering,includeheadfoot,margin=2cm]{geometry}
\usepackage[
citestyle=numeric-comp,
backend=biber,
bibencoding=inputenc
]{biblatex}
\addbibresource{refs.bib}
\usepackage{setspace}
\linespread{1.5}
\setcounter{tocdepth}{2}
\usepackage[colorlinks=true, pdfstartview=FitV,
linkcolor=blue, citecolor=blue, urlcolor=blue]{hyperref}
\setlength{\parindent}{0pt} % No indentation between paragraphs
\setlength{\parskip}{10pt} % Space between paragraphs
% Tables
\usepackage{ltxtable}
\usepackage{booktabs}
% Needed for code listings
\usepackage{listings}
\usepackage{color}
% Subfigure
\usepackage{subcaption}
\usepackage{floatpag} % to move floatpagenr to topright
% Fußnote
\usepackage[hang]{footmisc}
\setlength{\footnotemargin}{-0.8em}
\usepackage{csquotes}
\usepackage{afterpage} % needed for empty page after front
%%===================================
% Custom definitions
% Signal color
\definecolor{signalColor}{RGB}{164, 63, 114}
\newcommand\signal[1]{\textbf{\textcolor{signalColor}{#1}}}
% List with less space between items
\newenvironment{cList}{
\begin{itemize}
\setlength{\itemsep}{0pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{\end{itemize}}
% Enumeration with less space between items
\newenvironment{cEnum}{
\begin{enumerate}
\setlength{\itemsep}{0pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{\end{enumerate}}
% Space LoL
\let\Chapter\chapter
\def\chapter{\addtocontents{lol}{\protect\addvspace{10pt}}\Chapter}
% Code definition JSON
\definecolor{numberColor}{RGB}{24,118,129}
\newcommand\JSONnumbervaluestyle{\color{numberColor}}
\newcommand\JSONstringvaluestyle{\color{signalColor}}
\newif\ifcolonfoundonthisline
\makeatletter
\lstdefinestyle{json}{
showstringspaces = false,
keywords = {false,true},
alsoletter = 0123456789.,
morestring = [s]{"}{"},
stringstyle = \ifcolonfoundonthisline\JSONstringvaluestyle\fi,
MoreSelectCharTable =%
\lst@DefSaveDef{`:}\colon@json{\processColon@json},
basicstyle = \ttfamily,
keywordstyle = \ttfamily\bfseries
}
\lstset{
numbers=left,
lineskip={-1.5pt},
captionpos=b,
basicstyle=\footnotesize\ttfamily,
xleftmargin=1cm,
breaklines=true
}
\newcommand\processColon@json{%
\colon@json%
\ifnum\lst@mode=\lst@Pmode%
\global\colonfoundonthislinetrue%
\fi
}
\lst@AddToHook{Output}{%
\ifcolonfoundonthisline%
\ifnum\lst@mode=\lst@Pmode%
\def\lst@thestyle{\JSONnumbervaluestyle}%
\fi
\fi
\lsthk@DetectKeywords%
}
\lst@AddToHook{EOL}%
{\global\colonfoundonthislinefalse}
\makeatother
% End code definition JSON
% Rename listings and toc
\renewcommand{\contentsname}{Table of Contents}
\renewcommand{\lstlistlistingname}{List of Listings}
\begin{document}
%%========================================
% Frontmatter
\include{frontmatter/front} % This is the titlepage
\setcounter{page}{0}
\pagenumbering{Roman}
\include{frontmatter/declaration}
\include{frontmatter/acknowledgment}
\include{frontmatter/summary}
\tableofcontents
\clearpage
\phantomsection
\addcontentsline{toc}{section}{\listfigurename}
\listoffigures
\clearpage
\phantomsection
\addcontentsline{toc}{section}{\listtablename}
\listoftables
\clearpage
\phantomsection
\addcontentsline{toc}{section}{\lstlistlistingname}
\lstlistoflistings
%%=========================================
% Mainmatter
\cleardoublepage
\setcounter{page}{0}
\pagenumbering{arabic}
\include{mainmatter/01_introduction}
% Include more chapters as required.
%%=========================================
%Backmatter
\appendix
\include{backmatter/00_lessImportantText}
\include{backmatter/01_acronyms}
\include{backmatter/02_lexicon}
\include{backmatter/03_listings}
% Include more appendices as required.
\cleardoublepage
\addcontentsline{toc}{chapter}{Bibliography}
\defbibheading{notonline}{\chapter*{Bibliography}}
\printbibliography[heading=notonline, nottype=online]
\defbibheading{online}{\chapter*{Bibliography (Online)}}
\printbibliography[heading=online, type=online]
%%=============================================
\end{document}