-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreamble.tex
193 lines (166 loc) · 4.95 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
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage[hidelinks]{hyperref}
\usepackage{lipsum}
\usepackage{indentfirst}
\usepackage{color}
\usepackage{url}
\usepackage{atbegshi}
\usepackage{tikz}
\usepackage{enumitem}
\usepackage{microtype}
\usepackage{etoolbox}
\usepackage{longtable}
\usepackage{nomencl}
\usepackage{placeins}
\usepackage{adjustbox}
\usepackage{csquotes}
% Scientific packages
\usepackage{siunitx}
\usepackage[version=3]{mhchem}
\usepackage{nth}
\usepackage{algorithm, algpseudocode}
\usepackage{mathtools}
\usepackage{authblk}
\usepackage{pgfplotstable}
\let\printglossary\relax
\let\theglossary\relax
\let\endtheglossary\relax
\usepackage[acronym, toc]{glossaries}
% High quality graphics
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{groupplots}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{calc}
\usetikzlibrary{spy}
\usetikzlibrary{shapes,arrows}
%\usetikzlibrary{external}
%\tikzexternalize[mode=list and make, prefix=tikz/]
% No space between paragraphs
\abnormalparskip{0pt}
% Fonts
\usepackage{lmodern} % typewriter font
\usepackage{mathptmx} % math
%\usepackage[bitstream-charter]{mathdesign} % math
\usepackage[semibold]{sourcesanspro} % sans-serif
\ifxetex
% Fonts -- for xelatex
\setmainfont{XCharter}
\else\ifluatex
% Fonts -- for xelatex
\setmainfont{XCharter}
\else\ifpdf
% Fonts -- for pdflatex
\usepackage{charter} % serif
\else
% Anything else, whatever that may be...
\usepackage{charter} % serif
\fi\fi\fi
% Subfloats
\newsubfloat{figure} % Subfigures
\newsubfloat{table} % Subtables
% Date
\let\ordinal\relax
\usepackage{datetime}
\newdateformat{titlepagedate}{\protect\monthname[\THEMONTH] \THEYEAR}
% Margins
\setlrmarginsandblock{2.9cm}{2cm}{*}
\setulmarginsandblock{2.6cm}{2.5cm}{*}
\checkandfixthelayout
% Subsection numbering
\setsecnumdepth{subsubsection}
% Chapter style
\makechapterstyle{chstyle}{%
\renewcommand\chapnamefont{%
\normalfont\Huge\sffamily
}
\renewcommand\chaptitlefont{%
\normalfont\HUGE\sffamily\bfseries
}
\renewcommand\printchaptertitle[1]{%
\chaptitlefont \begin{Spacing}{1}##1\end{Spacing}
}
\renewcommand\printchapternum{\chapnamefont\Huge\space\thechapter}
}
\chapterstyle{chstyle}
% Publications chapter style
\makechapterstyle{publicationchstyle}{%
\renewcommand\chapnamefont{%
\normalfont\Huge\sffamily
}
\renewcommand\chaptitlefont{%
\normalfont\HUGE\sffamily\bfseries
}
\renewcommand\printchapternum{%
\chapnamefont\Huge\space\thechapter
}
\renewcommand\printchaptertitle[1]{%
\chaptitlefont \begin{Spacing}{1}##1\end{Spacing}
}
\setlength{\afterchapskip}{\baselineskip}
\renewcommand{\chapterheadstart}{}
}
% Headers and footers
% Normal page style
\makepagestyle{hfpage}
\makeevenhead{hfpage}{\thepage}{}{\leftmark}
\makeoddhead{hfpage}{\rightmark}{}{\thepage}
\makeevenfoot{hfpage}{}{}{}
\makeoddfoot{hfpage}{}{}{}
\makeheadrule{hfpage}{\textwidth}{\normalrulethickness}
\makepsmarks{hfpage}{%
\nouppercaseheads
}
\pagestyle{hfpage}
\aliaspagestyle{chapter}{empty}
% Bibliography (uncomment your preferred style)
% Author-year
%\usepackage[style=authoryear, backend=biber, maxcitenames=2, maxbibnames=99, giveninits=true, uniquename=false, uniquelist=false, url=false, doi=false, isbn=false, dashed=false, natbib=true]{biblatex}
% Numeric (default)
\usepackage[style=numeric, sorting=none, backend=biber, maxcitenames=2, maxbibnames=99, giveninits=true, uniquename=false, uniquelist=false, url=false, doi=true, isbn=false, eprint=false, natbib=true, sortcites=true]{biblatex}
% Print your publication
\newcommand{\printpublication}[1]{\AtNextCite{\defcounter{maxnames}{99}}\fullcite{#1}}
\renewbibmacro{in:}{}
% Bib resource file
\addbibresource{bib/library.bib}
% Change table of contents name
% Appendix name is changed to Papers
\addto\captionsenglish{% Replace "english" with the language you use
\renewcommand\contentsname{Table of Contents}%
\renewcommand\appendixname{Paper}
\renewcommand\appendixpagename{Papers}
}
\renewcommand*{\cftappendixname}{Paper\space} % ToC appendix name
% Bold caption name
\captionnamefont{\bfseries\small}
\captiontitlefont{\small}
% Algorithm settings
\algtext*{EndWhile}% Remove "end while" text
\algtext*{EndIf}% Remove "end if" text
\algtext*{EndFor}% Remove "end for" text
\algtext*{EndFunction}% Remove "end for" text
% Row number counter
\preto\tabular{\setcounter{magicrownumbers}{0}\small}
\preto\longtable{\setcounter{magicrownumbers}{0}\small}
\newcounter{magicrownumbers}
\newcommand\rownumber{\stepcounter{magicrownumbers}\arabic{magicrownumbers}}
% Black and white graphics
\newbool{bBlackWhite}
\boolfalse{bBlackWhite}
% Publication folder
\newcommand{\folder}{}
% Signature command
\makeatletter
\newcommand*{\getlength}[1]{\strip@pt#1}
\makeatother
\newlength{\signlength}
\setlength{\signlength}{0.5\textwidth}
\newcommand{\signature}[1]{%
\noindent \line(1,0){\getlength{\signlength}}\\
\noindent #1
}
\OnehalfSpacing*