update skeleton to radboud standards thanks to klinik/stutterheims template
[thesis-skel.git] / preamble.tex
1 \usepackage[
2 inner=25mm,
3 outer=20mm,
4 marginparsep=3mm,
5 marginparwidth=13mm,
6 top=25mm,
7 bottom=20mm,
8 paperwidth=17cm,
9 paperheight=24cm]{geometry} % Papersize
10 \usepackage[british]{babel} % Internationalization
11 \usepackage[titletoc]{appendix} % Appendices
12 \usepackage[pagebackref,hidelinks]{hyperref} % Hyperlinks
13 \usepackage{graphicx} % Graphics
14 \usepackage{booktabs} % Better looking tables
15 \usepackage{etoolbox} % Patch chapter command
16 \usepackage[nodayofweek]{datetime} % Use a fixed document date
17 \usepackage{listings} % Code
18 \usepackage[acronym,nonumberlist]{glossaries} % Glossaries and acronyms
19 \usepackage[algochapter]{algorithm2e} % Pseudocode
20 \usepackage{makeidx} % Index
21 \usepackage[inline,shortlabels]{enumitem}
22 \setlist{noitemsep}
23 \setlist[description]{leftmargin=\parindent}
24
25 % Have better page numbering in chapters
26 \patchcmd{\chapter}{plain}{headings}{}{}
27
28 % Images directory
29 \graphicspath{{img/}}
30
31 % Fix list of listings title
32 \renewcommand{\lstlistlistingname}{List of Listings}
33
34 % Fix list of listings chapter separator
35 \makeatletter
36 \let\my@chapter\@chapter%
37 \renewcommand*{\@chapter}{%
38 \addtocontents{lol}{\protect\addvspace{10pt}}%
39 \my@chapter}
40 \makeatother
41
42 % Always have url in teletype
43 \urlstyle{tt}
44
45 % Setup pdf parameters
46 \hypersetup{%
47 pdftitle={},
48 pdfauthor={},
49 pdfsubject={},
50 pdfcreator={},
51 pdfproducer={},
52 pdfkeywords={},
53 }
54
55 % Fix gls in hyperlink errors
56 \pdfstringdefDisableCommands{%
57 \def\acrlong#1{}%
58 \def\acrlongpl#1{}%
59 \def\acrshort#1{}%
60 \def\acrshortpl#1{}%
61 \def\acrfull#1{}%
62 \def\acrfullpl#1{}%
63 \def\Acrlong#1{}%
64 \def\Acrlongpl#1{}%
65 \def\Acrshort#1{}%
66 \def\Acrshortpl#1{}%
67 \def\Acrfull#1{}%
68 \def\Acrfullpl#1{}%
69 \def\gls#1{}%
70 \def\glspl#1{}%
71 \def\Gls#1{}%
72 \def\Glspl#1{}%
73 }
74
75 % General listings settings
76 \lstset{%
77 breakatwhitespace=false,
78 breaklines=true,
79 captionpos=b,
80 keepspaces=true,
81 basicstyle=\ttfamily\fontseries{l}\footnotesize,
82 commentstyle=\slshape\fontseries{m},
83 keywordstyle=\bfseries\fontseries{b},
84 stringstyle=\ttfamily,
85 showspaces=false,
86 showstringspaces=false,
87 showtabs=false,
88 tabsize=4,
89 frame=L,
90 }
91
92 % Increase the depth for the table of contenst
93 \setcounter{secnumdepth}{3}
94
95 % Fix the algorithm font
96 \renewcommand\AlCapFnt{\normalfont}
97
98 % Initialize the glossaries
99 \makeglossaries%
100 \input{glossaries}
101
102 % Enable the index
103 \makeindex%