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
|
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tex/docstyle}[2021/10/31 v0.1 Styling for my thesis]
% Package options
\newif\ifdraftmode
\DeclareOption{draft}{\draftmodetrue}
\ProcessOptions\relax
% line stretc
\renewcommand{\baselinestretch}{1.2}
%% Page Margins (done with KOMA)
\PassOptionsToPackage{geometry}{
a4paper,
}
\RequirePackage{geometry}
\AfterCalculatingTypearea{%
\geometry{%
inner = 2cm, outer = 2cm, includeheadfoot,
top = 2cm, bottom = 2cm
}
}
%% 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 libertine for serif fonts
\RequirePackage{libertine}
% use roboto for sans serif and monospaced
\RequirePackage{roboto}
\RequirePackage[scaled=.85]{roboto-mono}
%% 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 = {The Crown Bar - Business Plan}
pdfauthor = {Bl\"ochlinger Andr\'e, L\"offler Kevin, Pross Naoki, Wisotkzi Niklas Tim}
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,
}
%% Set up subfigures to look like in IEEE classes
\RequirePackage{subcaption}
\usepackage[labelformat=simple]{subcaption}
\renewcommand\thesubfigure{(\alph{subfigure})}
%% Set up listings
\RequirePackage{listings}
%% create a lstlisting style
\lstdefinestyle{minimalist}{
abovecaptionskip = \baselineskip,
belowcaptionskip = \baselineskip,
breaklines = true,
inputencoding = utf8,
% frame
frame = leftline,
framerule = 3pt,
rulecolor = \color{cyan!20!white},
% margin
xleftmargin = 5mm,
framexleftmargin = 5mm,
% background
backgroundcolor = \color{white},
% default language:
language = TeX,
showstringspaces = false,
% font
basicstyle = \ttfamily,
identifierstyle = \color{black},
keywordstyle = \bfseries \color{blue!70!black},
commentstyle = \color{gray},
stringstyle = \color{orange!60!black},
% tabs
tabsize=4,
}
% and set style
\lstset{style=minimalist, escapechar=`}
%% Change style of headings etc.
\RedeclareSectionCommand[beforeskip=0pt,afterskip=2\baselineskip]{chapter}
\renewcommand*{\chapterformat}{%
\chapappifchapterprefix{\nobreakspace}
{%
\bfseries\slshape\sffamily\color{blue!30!white}%
\fontsize{3em}{0em}\selectfont%
\thechapter\autodot%
}
\normalfont\enskip
}
\RedeclareSectionCommand[beforeskip=0pt]{paragraph}
% Set up mdframes
\PassOptionsToPackage{framemethod = tikz}{mdframed}
\RequirePackage{mdframed}
\mdfsetup{%
linecolor = black,
linewidth = 2pt,
%
frametitlefont = {\bfseries\sffamily\color{white}},
frametitlebackgroundcolor = black,
frametitlerule = true,
middlelinewidth = 2pt,
%
outermargin = 5mm,
innermargin = 5mm,
innertopmargin = 2mm,
innerbottommargin = 8mm,
skipabove = 1cm,
% minimum height
needspace = 6cm,
}
% vim: set ts=2 sw=2 noet:
|