forked from HoGentTIN/latex-hogent-bachproef
-
Notifications
You must be signed in to change notification settings - Fork 0
/
voorstel.cls
249 lines (219 loc) · 7.73 KB
/
voorstel.cls
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LaTeX-sjabloon voorstel onderwerp Bachelorproef
% HoGent Bedrijf en Organisatie, opleiding toegepaste informatica
%
% Gebaseerd op ``Stylish Article'' class
% Version 2.1 (1/10/15)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Mathias Legrand ([email protected])
% With extensive modifications by:
% Vel ([email protected])
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{voorstel}
\RequirePackage{ifthen}
\RequirePackage{calc}
\AtEndOfClass{\RequirePackage{microtype}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions*
\LoadClass{article}
\RequirePackage{ifpdf} % Needed to pick between latex and pdflatex
%----------------------------------------------------------------------
% FONTS & COLORS
%----------------------------------------------------------------------
\RequirePackage{times} % Loads the Times-Roman Fonts
\RequirePackage{mathptmx} % Loads the Times-Roman Math Fonts
\RequirePackage{xcolor}
\definecolor{color1}{RGB}{0,147,208} % Color of the article title and sections
\definecolor{color2}{RGB}{0,20,20} % Color of the boxes behind the abstract and headings
%----------------------------------------------------------------------
% VARIOUS USEFUL PACKAGES
%----------------------------------------------------------------------
\RequirePackage[utf8]{inputenc}
\RequirePackage{amsmath,amsfonts,amssymb}
\RequirePackage{graphicx}
\RequirePackage{booktabs}
\RequirePackage{csquotes}
\RequirePackage[english,dutch]{babel}
\usepackage{hyperref} % hyperlinks
\hypersetup{hidelinks,colorlinks,breaklinks=true,urlcolor=black,citecolor=color2,linkcolor=color2,bookmarksopen=false,pdftitle={Title},pdfauthor={Author}}
%----------------------------------------------------------------------
% MARGINS
%----------------------------------------------------------------------
\RequirePackage[left=2cm,%
right=2cm,%
top=2.25cm,%
bottom=2.25cm,%
headheight=11pt,%
a4paper]{geometry}%
%----------------------------------------------------------------------
% FIGURES AND TABLES CAPTIONS
%----------------------------------------------------------------------
\RequirePackage[labelfont={bf,sf,small},%
labelsep=period,%
justification=raggedright]{caption}
\setlength{\abovecaptionskip}{0pt}
\setlength{\belowcaptionskip}{0pt}
%----------------------------------------------------------------------
% SECTION/SUBSECTION/PARAGRAPH SET-UP
%----------------------------------------------------------------------
\RequirePackage[explicit]{titlesec}
\titleformat{\section}
{\color{color1}\large\sffamily\bfseries}
{}
{0em}
{\colorbox{color2!10}{\parbox{\dimexpr\linewidth-2\fboxsep\relax}{\centering\arabic{section}. #1}}}
[]
\titleformat{name=\section,numberless}
{\color{color1}\large\sffamily\bfseries}
{}
{0em}
{\colorbox{color2!10}{\parbox{\dimexpr\linewidth-2\fboxsep\relax}{\centering#1}}}
[]
\titleformat{\subsection}
{\color{color1}\sffamily\bfseries}
{\thesubsection}
{0.5em}
{#1}
[]
\titleformat{\subsubsection}
{\sffamily\small\bfseries}
{\thesubsubsection}
{0.5em}
{#1}
[]
\titleformat{\paragraph}[runin]
{\sffamily\small\bfseries}
{}
{0em}
{#1}
\titlespacing*{\section}{0pc}{3ex \@plus4pt \@minus3pt}{5pt}
\titlespacing*{\subsection}{0pc}{2.5ex \@plus3pt \@minus2pt}{0pt}
\titlespacing*{\subsubsection}{0pc}{2ex \@plus2.5pt \@minus1.5pt}{0pt}
\titlespacing*{\paragraph}{0pc}{1.5ex \@plus2pt \@minus1pt}{10pt}
%----------------------------------------------------------------------
% TABLEOFCONTENTS SET-UP
%----------------------------------------------------------------------
\newlength{\tocsep}
\setlength\tocsep{1.5pc} % Sets the indentation of the sections in the table of contents
\setcounter{tocdepth}{3} % Three levels in the table of contents section: sections, subsections and subsubsections
\usepackage{titletoc}
\contentsmargin{0cm}
\titlecontents{section}[\tocsep]
{\addvspace{4pt}\small\bfseries\sffamily}
{\contentslabel[\thecontentslabel]{\tocsep}}
{}
{\hfill\thecontentspage}
[]
\titlecontents{subsection}[\tocsep]
{\addvspace{2pt}\sffamily}
{\contentslabel[\thecontentslabel]{\tocsep}}
{}
{\ \titlerule*[.5pc]{.}\ \thecontentspage}
[]
\titlecontents*{subsubsection}[\tocsep]
{\footnotesize\sffamily}
{}
{}
{}
[\ \textbullet\ ]
%----------------------------------------------------------------------
% MULTIPLE AUTHOR SET
%----------------------------------------------------------------------
\newcount\@authcnt
\newcount\@tmpcnt\@tmpcnt\z@
\def\@affiliation{%
\ifnum\@tmpcnt<\@authcnt
\global\advance\@tmpcnt1
\raggedright \csname @auth\romannumeral\the\@tmpcnt\endcsname\hfill\\%
\let\next\@affiliation \vskip1pt
\else
\let\next\relax
\fi
\next}
\newcommand{\affiliation}[1]{%
\global\advance\@authcnt1
\expandafter\gdef\csname @auth\romannumeral\the\@authcnt\endcsname
{#1}}
%----------------------------------------------------------------------
% LIST CONTROL
%----------------------------------------------------------------------
\RequirePackage{enumitem}
\setlist{nolistsep} % Uncomment to remove spacing between items in lists (enumerate, itemize)
%----------------------------------------------------------------------
% ABSTRACT+AUTHOR FRAME
%----------------------------------------------------------------------
\newcommand{\PaperTitle}[1]{\def\@PaperTitle{#1}}
\newcommand{\PaperType}[1]{\def\@PaperType{#1}}
\newcommand{\Authors}[1]{\def\@Authors{#1}}
\newcommand{\Abstract}[1]{\def\@Abstract{#1}}
\newcommand{\Keywords}[1]{\def\@Keywords{#1}}
\newcommand{\CoPromotor}[1]{\def\@CoPromotor{#1}}
% ---------------------------------------------------------------------
\setlength{\columnsep}{0.55cm} % Distance between the two columns of text
\setlength{\fboxrule}{0.75pt} % Width of the border around the abstract
\renewcommand{\@maketitle}{%
\twocolumn[{%
\thispagestyle{empty}%
\vskip20pt%
{\raggedright\color{color1}\sffamily\bfseries\fontsize{20}{24}\selectfont \@PaperTitle\\}%
{\raggedright\color{color1}\sffamily\bfseries\fontsize{13}{15.6}\selectfont \@PaperType\par}%
\vskip10pt%
{\raggedright\color{color1}\sffamily\fontsize{12}{16}\selectfont \@Authors\par}%
\vskip18pt%
\fcolorbox{color1}{white}{%
\parbox{\textwidth-2\fboxsep-2\fboxrule}{\centering%
\colorbox{color2!10}{%
\parbox{\textwidth-4\fboxsep-2\fboxrule}{%
\sffamily\textbf{\abstractname}\\\@Abstract%
\ifx\@Keywords\@empty%
\else%
\\[4pt]\textbf{\keywordname}\\\@Keywords%
\fi%
\ifx\@CoPromotor\@empty%
\else%
\\[4pt]\textbf{Co-promotor}\\\@CoPromotor%
\fi%
}%
}%
\vskip4pt%
\begingroup%
\raggedright\sffamily\small%
\footnotesize\@affiliation\par%
\endgroup%%
}%
}%
\vskip25pt%
}]%
}
%----------------------------------------------------------------------
% PAGE HEADER
%----------------------------------------------------------------------
\RequirePackage{fancyhdr} % Needed to define custom headers/footers
\RequirePackage{lastpage} % Number of pages in the document
\pagestyle{fancy} % Enables the custom headers/footers
% Headers
\lhead{}%
\chead{}%
\rhead{\small\sffamily\bfseries\@PaperTitle}
% Footers
\lfoot{\sffamily\small\bfseries\@PaperType}%
\cfoot{\thepage/\pageref{LastPage}}%
\rfoot{\includegraphics[height=1.1cm]{HOGENT_Logo_Pos_rgb.png}}%
\renewcommand{\headrulewidth}{0pt}% % No header rule
\renewcommand{\footrulewidth}{0pt}% % No footer rule
%----------------------------------------------------------------------
% REFERENCES
%----------------------------------------------------------------------
\RequirePackage[backend=biber,style=apa]{biblatex}
\DeclareLanguageMapping{dutch}{dutch-apa}
\addbibresource{voorstel.bib}
\endinput