-
Notifications
You must be signed in to change notification settings - Fork 0
/
preamble.tex
143 lines (121 loc) · 3.01 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
% !TEX root = ./thesis.tex
% DOC
\documentclass[openany,a4paper,12pt,twoside]{report}
\usepackage[toc,page]{appendix}
%\usepackage{afterpage}
\usepackage[
top = 3.6cm,
bottom = 3.6cm,
left=3.6cm,
right=2.6cm,
%includehead,
%hmargin={3.6cm, 2.6cm},
%vmargin={2.5cm,3.5cm},
%headsep=.8cm,
%footskip=.5cm
]{geometry}
\setlength{\footskip}{1.5cm}
% spacing between hline and footnote
\makeatletter
\def\footnoterule{\kern-8\p@
\hrule \@width 2in \kern 7.6\p@} % the \hrule is .4pt high
\makeatother
% force bottom of footnote
\usepackage[bottom]{footmisc}
% LINE SPACING
\usepackage{setspace}
% coloured frames
\usepackage{mdframed}
\mdfdefinestyle{todo}{
leftmargin=5pt,
linecolor=white,
backgroundcolor=Red!10!White}
%
\newcommand{\todofr}[1]{
\begin{mdframed}[style=todo]
\vspace*{-.3cm}
{\singlespacing\small#1}
\vspace*{.1cm}
\end{mdframed}}
% FIGURE
%\usepackage{rotating}
\usepackage{pdflscape}
\usepackage{subcaption}
% HEADERS
\usepackage{fancyhdr}
\setlength{\headheight}{15pt}
\fancyhf{} % clear the header and footers
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter. #1}{\thechapter. #1}}
\renewcommand{\sectionmark}[1]{\markright{\thesection. #1}}
\renewcommand{\headrulewidth}{0pt}
\fancyhead[LO]{\emph{\leftmark}}
\fancyhead[RE]{\emph{\rightmark}}
\fancyhead[RO,LE]{\emph{\thepage}}
% PART PAGE
\makeatletter
\renewcommand\part{%
\if@openright
\cleardoublepage
\else
\clearpage
\fi
\thispagestyle{empty}%
\null\vfil
\secdef\@part\@spart}
\makeatother
% HYPERREF
\usepackage[colorlinks=true,
linkcolor=TitleCol,
citecolor=DarkGreen,
urlcolor=TitleCol,
linktocpage=true,
pdfstartview=FitH]{hyperref}
% FONT
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[default]{sourcesanspro}
%\usepackage[titles]{tocloft}
%\renewcommand{\cftchapfont}{\large\sc}
% COLORS
\usepackage[usenames,dvipsnames,svgnames]{xcolor}
\definecolor{TitleCol}{HTML}{28316C} % sections, ...
\definecolor{EnvCol}{HTML} {28316C} % theorem, ...
\definecolor{CapCol}{HTML} {28316C} % fig, ...
% CAPTIONS
\usepackage[width=.8\textwidth, % caption width
labelfont={bf,sf,color=CapCol}, % caption style
font={footnotesize},
format={hang},
textfont={it}]{caption}
% CHAP STYLE
\usepackage{titlesec}
\makeatletter % section & subsection number in margin
\def\@seccntformat#1{
\protect\makebox[0pt][r]{
\csname the#1\endcsname\quad
}
}
\makeatother
\titlespacing*{\chapter}{0cm}{4cm}{1.5cm}[0pt]
\titleformat*{\section}{
\Large\bfseries\selectfont\color{TitleCol}}
\titleformat*{\subsection}{
\large\bfseries\selectfont\color{TitleCol}}
\titleformat*{\subsubsection}{
\small\bfseries\selectfont\color{TitleCol}}
% BIBLIOGRAPHY
\usepackage{natbib}
% TIKZ
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
% MATHS
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\numberwithin{equation}{chapter}
% ALGORITHMS
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{algorithmicx}