-
Notifications
You must be signed in to change notification settings - Fork 1
/
stylesheet.tex
253 lines (180 loc) · 6.12 KB
/
stylesheet.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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ~~~~ EDITOR'S NOTE ~~~~
%%
%% This file contains the stylesheet
%%
%% This is the PhD thesis of Laurens P. Stoop in LaTeX
%% - Comments, remarks and more: email me at [email protected]
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% For template only
\usepackage{lipsum}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ~~~~ Extra package invocation & Settings
%% For acces to special signs
\usepackage{marvosym}
%% For access to written out month/year information & setting this
\usepackage{datetime}
\newdateformat{monthyeardate}{\monthname[\THEMONTH] \THEYEAR}
%% Create a list of acronyms.
\usepackage{acro}
% Set the acronyms in the PDF to link back to the acronym list
\acsetup{make-links=true}
%% Allow for the page-layout to be show explicit
\usepackage{layout}
%% For better TOC's
\usepackage{tocloft}
%% For making the parskip command work better
\usepackage[parfill]{parskip}
%% Neater font encoding
\usepackage[T1]{fontenc}
%% For setting space within document
\usepackage{setspace}
\usepackage{import}
%\usepackage[final]{changes}
%\usepackage{dblfloatfix}
%% To generate lipsum text
\usepackage{lipsum}
\usepackage{mdframed}
% For nicer subfigures
\usepackage{subcaption}
% for nicer non-forced page breaks
\usepackage{afterpage}
\usepackage{bm}
\usepackage[many]{tcolorbox}
% Package to provide a way to review
% - gives TeXstudio access to the tools
%\usepackage{easyReview}
% for the cross-page table for the SIKS dissertation list
\usepackage{xltabular}
% for midrules within the SIKS dissertation list
\usepackage{booktabs}
\usepackage{csquotes}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ~~~~ PDF Settings
%% Fix inclusion of color name in PDF TOC
\pdfstringdefDisableCommands{%
\def\color#1#{\@gobble}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ~~~~ Left-opening pages
%% This would allow for opening on left page of chapters
%% N.B.: Not fully working / fixed, left for now if someone wants to improve this component
%
% First option
%
% \makeatletter
% \renewcommand*\cleardoublepage{\clearpage\if@twoside
% \ifodd\c@page \hbox{}\newpage\if@twocolumn\hbox{}%
% \newpage\fi\fi\fi}
% \makeatother
%
% Other option
% This fixes the page to open chapters / parts on (i.e. not forced right)
% \csname @openrightfalse\endcsname
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ~~~~ Bibliography
%% Definition of the bibliography and related packages
%% See biblatex background information for choices that could be made here.
% \usepackage[style=authoryear-comp,backend=biber,maxbibnames=10]{biblatex}
\usepackage[style=nature,backend=biber,doi=true,maxbibnames=30]{biblatex}
%% For optional bibliography per chapter
%\usepackage{chapterbib}
%\setlength\bibitemsep{1.5\itemsep}
%\renewcommand*{\nameyeardelim}{\addcomma\space}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ~~~~ Tikz settings
%% Getting Tikz
\usepackage{tikzscale}
\usepackage{tikz}
%% Tikz libraries
\usetikzlibrary{shapes,arrows,chains}
%\usepackage{pgfplots}
%\pgfplotsset{compat=newest}
%\pgfplotsset{plot coordinates/math parser=false}
\newlength{\fwidth}
\colorlet{lcnorm}{black}
% Better enumeration
%\usepackage[inline]{enumitem}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ~~~~ Page tweaking
%% Remove the marginpar
\setlength{\marginparwidth}{0pt}
% Layout settings:
\renewcommand{\headrulewidth}{1.5pt}% 1.5pt header rule
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ~~~~ Figure tweaking
%% Small change to plot all figures with fbox, for better layout
\LetLtxMacro\latexincludegraphics\includegraphics % save the meaning of \includegraphics
% pass the image to \shadowbox
%\renewcommand{\includegraphics}[2][]{\fbox{\latexincludegraphics[#1]{#2}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ~~~~ Subcript text
%% Change the behavior of subscript to textmode (without the amsmath spacing)
\begingroup\lccode`~=`!
\lowercase{\endgroup\def~}#1{_{\mathrm{#1}}}
\AtBeginDocument{\mathcode`!=\string"8000 }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ~~~~ Table of Contents (TOC)
\makeatletter
\newcommand{\chaptoc}{
\vspace{0.6cm}
\startcontents[chaps]
\begin{tcolorbox}[
colframe=thumb\arabic{colorcounter},
width=\linewidth,
enhanced,
top=10pt,
bottom=10pt,
nobeforeafter,
outer arc=0pt,
arc=0pt,
boxrule=1.2pt,
colback=white,
overlay={
\node[anchor=west,fill=white,inner xsep=6pt, text=thumb\arabic{colorcounter}]
at ([xshift=10pt]frame.north west)
{\textbf{Contents}};
}
]
\printcontents[chaps]{}{1}{}
\end{tcolorbox}
\vspace{2cm}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ~~~~ Styling the Part
%% Make changes to the part so that the contents end up on the titlepages
\let\LaTeXStandardPart\part%
\newcommand{\unstarredpart@@noopt}[1]{%
\unstarredpart@@opt[#1]{#1}%
}%
\newcommand{\unstarredpart@@opt}[2][]{%
% \cleardoublepage% (For clearing content before!!) Original
\clearpage% (For clearing content before!!!)
\begingroup%
\let\newpage\relax%
\LaTeXStandardPart[#1]{#2}%
\endgroup%
}%
\newcommand{\starredpart}[1]{%
\LaTeXStandardPart*{#1}%
}%
\newcommand{\unstarredpart}{%
\@ifnextchar[{\unstarredpart@@opt}{\unstarredpart@@noopt}%
}%
\renewcommand{\part}{%
\@ifstar{\starredpart}{\unstarredpart}%
}%
\makeatother
%% Define the toc colors for the parts, and add the horizontal lines
\renewcommand{\cftpartfont}{\hypersetup{linkcolor=thumb\arabic{colorcounter}}}
\renewcommand{\cftpartpresnum}{\hypersetup{linkcolor=thumb\arabic{colorcounter}}}
\titlecontents{part}%
[0pt]{\color{thumb\arabic{colorcounter}}\bfseries\large\protect\addvspace{10pt}\titlerule[1pt]\addvspace{1.3ex}}
{}{\partname~}
{\hfill\contentspage}%
[\addvspace{0.7ex} {\titlerule[1pt]} \addvspace{5pt}]%
\renewcommand{\cftchapfont}{\bfseries\hypersetup{linkcolor=thumb\arabic{colorcounter}}}
\renewcommand{\cftchappagefont}{\bfseries\color{thumb\arabic{colorcounter}}}
\renewcommand{\thepart}{\color{thumb\arabic{colorcounter}}\Roman{part}} % Adjust the color of the part as well
\newcounter{thumbcounter}
\newcounter{colorcounter}