-
Notifications
You must be signed in to change notification settings - Fork 37
/
mas_proposal.cls
267 lines (228 loc) · 7.73 KB
/
mas_proposal.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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
%
% LaTeX2e Style for MAS R&D and master thesis reports
% Author: Argentina Ortega Sainz, Hochschule Bonn-Rhein-Sieg, Germany
% Please feel free to send issues, suggestions or pull requests to:
% https://github.com/mas-group/report-template
% Based on the template created by Ronni Hartanto in 2003
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{mas_proposal}[2018/01/25 The MAS report class]
% \newcommand{\test}{Project test!}
\RequirePackage{xcolor}
\RequirePackage{ifthen}
\definecolor{slcolor}{HTML}{882B21}
\newcommand*{\project}[1]{\gdef\@project{#1}%
}
\newcommand*{\@project}{\texttt{project} not set. Please select Master Thesis or R\&D Project}
% Options
\DeclareOption{onecolumn}{\OptionNotUsed}
\DeclareOption{thesis}{\project{Master Thesis Proposal}}
\DeclareOption{rnd}{\project{R\&D Project Proposal}}
% Report options
% \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
% Execute the default option
\ExecuteOptions{thesis}
% Process other options
\ProcessOptions\relax
% Load class options
\LoadClass[12pt,a4paper, oneside]{article}
%-------------------------------------------------------------------------------
% VARIOUS REQUIRED PACKAGES AND CONFIGURATIONS
%-------------------------------------------------------------------------------
\usepackage[numbers,sort&compress]{natbib}\citeindextrue % Round brackets around citations, change to square for square brackets
\usepackage{graphicx} % Required to include images
\usepackage{amsmath,amssymb,theorem} % Math packages
\usepackage{listings} % Required for including snippets of code
\usepackage{booktabs} % Required for better horizontal rules in tables
% \usepackage{xspace} % Provides the ability to use an intelligent space which is used in \institution and \department
% \usepackage[printonlyused,withpage]{acronym} % Include a list of acronyms
% \usepackage[acronym, toc]{glossaries}%Better package for acronyms
% \usepackage{rotating} % Allows tables and figures to be rotated
% \usepackage[xetex]{hyperref} % Required for links and changing link options
\usepackage{microtype} % Slightly tweak font spacing for aesthetics
% \usepackage{algorithm}
% \usepackage[noend]{algpseudocode}
% \usepackage{caption}
% %\captionsetup{belowskip=6pt,aboveskip=6pt}
% \usepackage{footnote}
% % \usepackage{minipage-marginpar}
% \makesavenoteenv{tabular}
% \makesavenoteenv{table}
% \usepackage[flushleft]{threeparttable}
% % \usepackage{subcaption}
% \usepackage[section]{placeins}
% \usepackage{lastpage}
% \usepackage[small, md, sc]{titlesec}
%\usepackage{inputenc}
\usepackage{geometry}
% %\usepackage{tocloft}
% \usepackage{adjustbox} % to limit size of tables
% \usepackage{pbox}
\usepackage[titletoc]{appendix}
% \usepackage{colortbl} % for color lines in tables
% \usepackage{rotfloat}
% \usepackage[page,toc,titletoc,title]{appendix} % Add appendices
% \usepackage{tocloft} % Add the word appendix to the TOC
\usepackage{setspace}
\usepackage{url}
\usepackage{lipsum} % Used to test
\onehalfspacing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fonts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Definitions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand\bibname{References} %Change Bibliography to References
\newcommand{\thirdpartylogo}[1]{\def\@thirdpartylogo{#1}}
\thirdpartylogo{}
\newcommand*{\supervisors}[1]{\gdef\@supervisors{#1}%
}
\newcommand*{\@supervisors}{\texttt{\string\supervisors} currently
not set. Please fix this.}
% Colors
\definecolor{hbrs}{RGB}{1,106,186}
\definecolor{keywords}{RGB}{0,100,0}
\definecolor{comments}{RGB}{0,100,50}
\definecolor{stringred}{RGB}{160,0,0}
\definecolor{codeblue}{RGB}{0,0,150}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand*{\maketitle}{%
\begin{titlepage}
\newgeometry{left=3cm, bottom=3cm}
\begin{minipage}{0.475\textwidth}
\centering
\includegraphics[height=1.3cm]{images/Logo-HBRS-cyan.png}
\end{minipage}
\begin{minipage}{0.475\textwidth}
\centering
\includegraphics[height=1.3cm]{images/b-it.pdf}
\end{minipage}
\ifx\@thirdpartylogo\@empty
\relax
\else
\centering
\vfill
\begin{minipage}{0.4\textwidth}
\centering
\includegraphics[height=1.3cm]{\@thirdpartylogo}
\end{minipage}
\fi%
\vfill
\centering
\vspace{1.5cm}
{\Large\@project\unskip\strut\par}
\vspace{1.5cm}
{\huge\bfseries\@title\unskip\strut\par}
\vspace{2cm}
{\Large\itshape\@author\unskip\strut\par}
\vfill
Supervised by\par
\vskip 8pt
{\large
\@supervisors\unskip\strut\par
}% \ifcsname @supervisors\endcsname
% \\ \@supervisors \fi \\
% \vfill
\vfill
{\large \@date}
\end{titlepage}
\restoregeometry
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PAGE LAYOUT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SIDE MARGINS:
% \oddsidemargin 28pt % Left margin on odd-numbered pages.
% \evensidemargin 0pt % Left margin on even-numbered pages.
% \marginparwidth 40pt % Width of marginal notes.
%
% \marginparsep 12pt % Horizontal space between outer margin and
% % marginal note
% \textwidth 15cm % width of text
%
% % VERTICAL SPACING:
% % Top of page:
% \topmargin 10pt % distance from top of page to running head
% \headheight 14pt % Height of box containing running head.
% \headsep 1cm % Space between running head and text.
% \textheight 8.8in % space for text
% \footskip 30pt % Distance from baseline of box containing foot
% % to baseline of last line of text.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Header and footer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{titlesec}
\let\footruleskip\undefined
\usepackage{fancyhdr}% http://ctan.org/pkg/fancyhdr
%% Page style for title pages.
\fancypagestyle{plain}{%
\fancyhf{}
\renewcommand*\headrulewidth{0pt}
\renewcommand*\footrulewidth{0pt}
\fancyfoot[L]{\color{darkgray}\footnotesize\@author}
\fancyhead[C]{\color{darkgray}\footnotesize\@title}
\fancyfoot[C]{\color{darkgray}\footnotesize\thepage}
\fancyfoot[R]{\color{darkgray}\footnotesize\@project}
}
%% Fancy style for the main matter.
% \fancypagestyle{mainmatter}{%
% \fancyhf{}
% \renewcommand*\headrulewidth{0.5pt}
% %% Page numbers on the top left and top right.
% \fancyfoot[C]{\thepage}
% %% Chapter name on the left (even) page.
% \fancyhead[RE]{\nouppercase{\rightmark}}
% %% Section name on the right (odd) page.
% \fancyhead[LO]{\nouppercase{\leftmark}}
% }
%% The mainmatter style is default for normal pages.
%\pagestyle{mainmatter}
%% Print the current chapter and section at the top of the page in cyan.
% \renewcommand*\chaptermark[1]{\markboth{\textcolor{hbrs} {\thechapter.\ } #1}{}}
% \renewcommand*\sectionmark[1]{\markright{\textcolor{hbrs}{\thesection.\ } #1}}
%% Chapter titles have the same layout as parts.
% \titleformat{\chapter}
% [display]
% {\flushleft}%format
% {\bfseries\Large}%label
% {0pt}%sep
% {\bfseries\Large\thechapter.~}%before code
% % [\vspace{-1cm}]
% \titleformat{name=\chapter,numberless}
% [display]
% {\flushleft}
% {\bfseries\Large}
% {0pt}
% {\bfseries\Large}
%
% \titlespacing{\chapter}{0pt}{-50pt}{10pt}
%
% \titleformat{\section}
% [display]
% {\flushleft}%format
% {\bfseries\large}%label
% {0pt}%sep
% {\bfseries\large\thesection.~}%before code
%
% \titleformat{\subsection}
% [display]
% {\flushleft}%format
% {\bfseries\large}%label
% {0pt}%sep
% {\bfseries\large\thesubsection.~}%before code
\usepackage{sectsty}
\chapterfont{\color{black}}
\sectionfont{\color{black}}
\subsectionfont{\color{black}}
\subsubsectionfont{\color{black}}
% \titleformat{\section}
% [block]
% {\large\scshape\centering{\Roman{section}.}}
% {}
% {1em}
% {}
%
\endinput