aboutsummaryrefslogtreecommitdiffstats
path: root/doc/thesis/tex/docstyle.sty
blob: b33e206f46133102f80a19a4726bea94fb33c087 (plain)
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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tex/docstyle}[2021/10/31 v0.1 Styling for my thesis]

% Package options
\newif\ifdraftmode
\DeclareOption{draft}{\draftmodetrue}

\ProcessOptions\relax

%% Page Margins (done with KOMA)
% \PassOptionsToPackage{geometry}{
% 	a4paper, showframe
% }
% \RequirePackage{geometry}
% \AfterCalculatingTypearea{%
% 	\geometry{%
% 			inner = 1cm, outer = 1cm, includeheadfoot
% 			top = 3cm, bottom = 3cm
% 	}
% }

%% Need colors
\RequirePackage{xcolor}

%% Pager headers and footers (using KOMA)
\PassOptionsToPackage{scrlayer-scrpage}{autooneside=false, draft=false}
\RequirePackage{scrlayer-scrpage}

\setkomafont{pagenumber}{\sffamily\bfseries\slshape}
\setkomafont{pageheadfoot}{\itshape}

\lehead{\leftmark}
\rohead{\rightmark}

%% Draft date when in draft mode
\ifdraftmode
	\RequirePackage{scrtime}
	\newcommand{\draftfooterstring}{\footnotesize\slshape (Draft of \today\ at \thistime)}
	\cefoot{\draftfooterstring}
	\cofoot{\draftfooterstring}
\fi

%% Font configuration
% use roboto for sans serif
\RequirePackage{roboto}

%% Floating captions configuration
% set captions font
\setkomafont{captionlabel}{\sffamily\bfseries}
% set caption style
\setcapindent{0pt}
\renewcommand*{\captionformat}{\quad}

%% Bibliography style
\PassOptionsToPackage{biblatex}{%
	backend = biber,
	style = ieee,
}
\RequirePackage{biblatex}

%% Set up links
\PassOptionsToPackage{hyperref}{%
	bookmarks = true,
	%% TODO: set title
	% pdftitle = {}
	pdfsubject = {Semester Thesis}
	pdfauthor = {Naoki Pross, Sara Halter}
	plainpages = false,
	psepdfpagelabels,
}
\RequirePackage{hyperref}
\hypersetup{
	% remove ugly boxes
	hidelinks,
	% set link colors
	colorlinks = true,
	anchorcolor = black,
	citecolor = black,
	filecolor = black,
	linkcolor = black,
	menucolor = black,
	runcolor = black,
	urlcolor = {black!50!blue}, 
	urlcolor = black,
}

% vim: set ts=2 sw=2 noet: