-
Notifications
You must be signed in to change notification settings - Fork 3
/
preamble.tex
executable file
·202 lines (195 loc) · 7.09 KB
/
preamble.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
193
194
195
196
197
198
199
200
201
202
\documentclass[11pt,twoside,a4paper,openright]{book}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Language, Encoding and Fonts
% http://en.wikibooks.org/wiki/LaTeX/Internationalization
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Select encoding of your inputs. Depends on
% your operating system and its default input
% encoding. Typically, you should use
% Linux : utf8 (most modern Linux distributions)
% latin1
% Windows: ansinew
% latin1 (works in most cases)
% Mac : applemac
% Notice that you can manually change the input
% encoding of your files by selecting "save as"
% an select the desired input encoding.
% WARNING: If you decide to change the input encoding to something else than
% UTF-8, you have to change the encoding of ALL files and update the Python
% scripts which is set up to read and write UTF-8 files.
\usepackage[utf8]{inputenc}
% Make latex understand and use the typographic
% rules of the language used in the document.
\usepackage[english]{babel}
% Use the palatine font
\usepackage[sc]{mathpazo}
\linespread{1.05} % Palatino needs more leading (space between lines)
% Choose the font encoding
\usepackage[T1]{fontenc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Graphics and Tables
% http://en.wikibooks.org/wiki/LaTeX/Importing_Graphics
% http://en.wikibooks.org/wiki/LaTeX/Tables
% http://en.wikibooks.org/wiki/LaTeX/Colors
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% load a colour package
\usepackage[usenames,dvipsnames]{xcolor}
%\definecolor{aaublue}{rgb}{0.00,0.41,0.66}% dark blue
\definecolor{aaublue}{RGB}{33,26,82}% dark blue
\definecolor{aaugray}{RGB}{84,97,110}% gray blue
\definecolor{aaulblue}{RGB}{194,193,204} % light blue
% The standard graphics inclusion package
\usepackage{graphicx}
\DeclareGraphicsExtensions{% set the priority
.pdf,.PDF,%
.png,.PNG,%
.jpg,.mps,.jpeg,.jbig2,.jb2,.JPG,.JPEG,.JBIG2,.JB2}
% Create graphics using PGF/TikZ
\usepackage{tikz,pgfplots}
\usetikzlibrary{matrix,backgrounds}
\usetikzlibrary{external}
\tikzexternalize[
mode=convert with system call,% or graphics if exists, no graphics, only graphics
figure list=true]
\tikzexternaldisable
% Set up how figure and table captions are displayed
\usepackage{caption}
\captionsetup{%
font=footnotesize,% set font size to footnotesize
labelfont=bf % bold label (e.g., Figure 3.2) font
}
% Make the standard latex tables look so much better
\usepackage{array,booktabs}
% Enable the use of frames around, e.g., theorems
% The framed package is used in the example environment
\usepackage{framed}
%adobe reader fix when using transparency in tikz
\pdfpageattr{/Group <</S /Transparency /I true /CS /DeviceRGB>>}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Mathematics
% http://en.wikibooks.org/wiki/LaTeX/Mathematics
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Defines new environments such as equation,
% align and split
\usepackage{amsmath}
% Adds new math symbols
\usepackage{amssymb}
% Use theorems in your document
% The ntheorem package is also used for the example environment
% When using thmmarks, amsmath must be an option as well. Otherwise \eqref doesn't work anymore.
\usepackage[framed,amsmath,thmmarks]{ntheorem}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page Layout
% http://en.wikibooks.org/wiki/LaTeX/Page_Layout
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Change margins, papersize, etc of the document
\usepackage[
inner=18mm,% left margin on an odd page
outer=45mm,% right margin on an odd page
marginparwidth=35mm, % width of the marginal paragraph
headheight=14pt,
]{geometry}
% Modify how \chapter, \section, etc. look
% The titlesec package is very configureable
\usepackage{titlesec}
\titleformat*{\section}{\normalfont\Large\bfseries\color{aaublue}}
\titleformat*{\subsection}{\normalfont\large\bfseries\color{aaublue}}
%\titleformat*{\subsubsection}{\normalfont\normalsize\bfseries\color{aaublue}}
%\titleformat*{\paragraph}{\normalfont\normalsize\bfseries\color{aaublue}}
%\titleformat*{\subparagraph}{\normalfont\normalsize\bfseries\color{aaublue}}
% Change the headers and footers
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} %delete everything
\renewcommand{\headrulewidth}{0pt} %remove the horizontal line in the header
\fancyhead[RE]{\color{aaublue}\small\nouppercase\leftmark} %even page - chapter title
\fancyhead[LO]{\color{aaublue}\small\nouppercase\rightmark} %uneven page - section title
\fancyhead[LE,RO]{\thepage} %page number on all pages
% Do not stretch the content of a page. Instead,
% insert white space at the bottom of the page
\raggedbottom
% Enable arithmetics with length. Useful when
% typesetting the layout.
\usepackage{calc}
% fix the marginpar command so it is always on the correct side
\usepackage{mparhack}
% truncate a long file name
\usepackage[breakall]{truncate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Algorithms and pseudocode
% http://en.wikibooks.org/wiki/LaTeX/Algorithms
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% package for writing algorithms and pseudocode
\usepackage{algpseudocode}
% change the appearance of comments
\algrenewcommand{\algorithmiccomment}[2][\hfill]{#1{\color{aaugray}\# #2}}
% float environment for algorithms
\usepackage{algorithm}
% display source code
\usepackage{listings}
\lstset{breaklines=true,
tabsize=2,
numbers=left,
basicstyle=\scriptsize\ttfamily,
commentstyle=\color{OliveGreen},
keywordstyle=\color{blue}\bf,
stringstyle=\color{red},
breaklines=true,
inputencoding=utf8,
extendedchars=true}
\lstset{literate=%
{æ}{{\ae}}1
{å}{{\aa}}1
{ø}{{\o}}1
{Æ}{{\AE}}1
{Å}{{\AA}}1
{Ø}{{\O}}1
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography
% http://en.wikibooks.org/wiki/LaTeX/Bibliography_Management
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\bibliographystyle{IEEEtranS}
\usepackage[backend=bibtex,
bibencoding=utf8
]{biblatex}
\addbibresource{IEEEabrv.bib}
\addbibresource{bib/mybib.bib}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Misc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Add the indices
\usepackage[splitindex]{imakeidx}
\indexsetup{toclevel=part}
\makeindex[title=People Index, name=person, intoc]
\makeindex[title=File Index, name=file, intoc, columns=1]
\makeindex[title=Author Index, name=author, intoc]
\makeindex[title=Tag Index, name=tag, intoc]
\usepackage[
% disable, %turn off todonotes
colorinlistoftodos, %enable a coloured square in the list of todos
textwidth=\marginparwidth, %set the width of the todonotes
textsize=scriptsize, %size of the text in the todonotes
]{todonotes}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Hyperlinks
% http://en.wikibooks.org/wiki/LaTeX/Hyperlinks
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Enable hyperlinks and insert info into the pdf
% file. Hypperref should be loaded as one of the
% last packages
\usepackage{hyperref}
\hypersetup{%
pdfpagelabels=true,%
plainpages=false,%
pdfauthor={},%
pdftitle={},%
pdfsubject={},%
bookmarksnumbered=true,%
colorlinks,%
citecolor=aaublue,%
filecolor=aaublue,%
linkcolor=aaublue,% you should probably change this to black before printing
urlcolor=aaublue,%
pdfstartview=FitH%
}