Repository navigation
Expand file tree
/
Copy pathIRASthesis.cls
More file actions
399 lines (337 loc) · 14 KB
/
Copy pathIRASthesis.cls
File metadata and controls
399 lines (337 loc) · 14 KB
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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
%% IRASthesis.cls
%%
%% LaTeX2e class for theses
%%
%% This template is derived work of KIT thesis template: https://github.com/KITrobotics/Latex_Template by Timo Rohrberg, Thorsten Haberecht and Denis Štogl
%% Adaptation by Gergely Sóti, H-KA IRAS Prof. Hein, 2021; gergely.soti@h-ka.de
%
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Gergely Sóti gergely.soti@h-ka.de.
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{IRASthesis}
\newif\ifIRASthesis@german
\newif\ifIRASthesis@bachelor
\newif\ifIRASthesis@master
\newif\ifIRASthesis@project
\newif\ifIRASthesis@blue
\newif\ifIRASthesis@red
\newif\ifIRASthesis@lightblue
\DeclareOption{german}{\IRASthesis@germantrue}
\DeclareOption{ngerman}{\IRASthesis@germantrue}
\DeclareOption{bachelor}{\IRASthesis@bachelortrue}
\DeclareOption{master}{\IRASthesis@mastertrue}
\DeclareOption{project}{\IRASthesis@projecttrue}
\DeclareOption{blue}{\IRASthesis@bluetrue}
\DeclareOption{red}{\IRASthesis@redtrue}
\DeclareOption{lightblue}{\IRASthesis@lightbluetrue}
\ProcessOptions\relax
\newcommand{\thesistype}{}
\ifIRASthesis@bachelor
\renewcommand{\thesistype}{\iflanguage{ngerman}{Bachelorarbeit}{Bachelor's Thesis}}
\fi
\ifIRASthesis@master
\renewcommand{\thesistype}{\iflanguage{ngerman}{Masterarbeit}{Master's Thesis}}
\fi
\ifIRASthesis@project
\renewcommand{\thesistype}{\iflanguage{ngerman}{Projektarbeit}{Project Paper}}
\fi
\ifIRASthesis@german
% English is also needed in German thesis for the abstract
\usepackage[main=ngerman,english]{babel}
\else
% German is also needed in English thesis for the abstract
\usepackage[main=english,ngerman]{babel}
\fi
\LoadClass[12pt,twoside,headsepline,a4paper,titlepage,DIV=15,BCOR=20mm,footheight=14.5pt]{scrbook}
\RequirePackage[automark,headsepline,plainheadsepline]{scrlayer-scrpage}
% \setlength{\footheight}{14.5pt}
\clubpenalty=10000 %prevent orphans
\widowpenalty=10000 %prvent widows
\input{document_setup}
\newcommand{\changefont}[3]{\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}
\newcommand{\chapterheadfont}{}
\newcommand{\blankpage}{
\clearpage{\cleardoublepage}
}
\setcounter{secnumdepth}{3} % Numbering also for \subsubsections
\setcounter{tocdepth}{3} % Register \subsubsections in content directory
\setpapersize{A4}
\setmarginsrb{3cm}{1cm}{3cm}{1cm}{6mm}{7mm}{5mm}{15mm}
\usepackage{indentfirst}
\parindent 20pt % Indent beginning of all paragraphs
\parskip1.5ex plus0.5ex minus0.5ex % Margin between paragraphs
\renewcommand\appendix{\par
\chaptermark{\appendixname}
\setcounter{section}{0}%
\setcounter{subsection}{0}%
\setcounter{figure}{0}%
\renewcommand\thesection{\Alph{section}}%
\renewcommand\thefigure{\Alph{section}.\arabic{figure}}
\renewcommand\thetable{\Alph{section}.\arabic{table}}}
\titlehead{
\ifIRASthesis@blue
\includegraphics[scale=0.35, valign=t]{logos/HKA_W_Wortmarke_CMYK}
\hspace*{\fill}
\includegraphics[scale=0.35, valign=t]{logos/HKA_W_Bildmarke_CMYK}
\else
\ifIRASthesis@red
\includegraphics[scale=0.35, valign=t]{logos/HKA_Wortmarke-v_CMYK}
\hspace*{\fill}
\includegraphics[scale=0.35, valign=t]{logos/HKA_Bildmarke-v_CMYK}
\else
\includegraphics[scale=0.35, valign=t]{logos/HKA_MMT_Wortmarke_CMYK.eps}
\hspace*{\fill}
\includegraphics[scale=0.35, valign=t]{logos/HKA_MMT_Bildmarke_CMYK.eps}
\fi
\fi
\begin{textblock}{10}[0,0](3.5,16.8)
\small\changefont{phv}{m}{n}{
\iflanguage{ngerman}
{H-KA -- Hochschule Karlsruhe}
{H-KA -- Karlsruhe University of Applied Sciences}
}
\end{textblock}
\begin{textblock}{10}[0,0](15,16.75)
\small{
\textbf{www.h-ka.de}
}
\end{textblock}
}
\setkomafont{title}{\Huge\changefont{phv}{m}{n}}
\setkomafont{subtitle}{\large\changefont{phv}{m}{n}}
\setkomafont{author}{\Large\changefont{phv}{m}{n}}
\def\@author{}
\renewcommand{\author}[1]{
\def\@author{#1}
}
\newcommand{\thefaculty}{
\ifIRASthesis@project
\iflanguage{ngerman}
{Fakult\"at f\"ur Maschinenbau und Mechatronik (MMT) \\ in Zusammenarbeit mit}
{Faculty for Mechanical Engineering and Mechatronics (MMT) \\ in cooperation with }
\else
\iflanguage{ngerman}
{Fakult\"at f\"ur Wirtschaftswissenschaften}
{Faculty for Management Science and Engineering}
\fi
}
\newcommand{\faculty}[1]{\renewcommand{\thefaculty}{#1}}
\newcommand{\theinstitute}{
\iflanguage{ngerman}
{Institut f\"ur Robotik und Autonome Systeme (IRAS)}
{Institute for Robotics and Autonomous Systems (IRAS)}
}
\newcommand{\institute}[1]{\renewcommand{\theinstitute}{#1}}
\newcommand{\theinstituteaddress}{
Campus Hochschule Karlsruhe 2030+ / Technologiepark \\ Wilhelm-Schickard-Straße 9, \\Gebäude F
}
\newcommand{\instituteaddress}[1]{\renewcommand{\theinstituteaddress}{#1}}
\newcommand{\theinstitutecity}{
76131 Karlsruhe
}
\newcommand{\institutecity}[1]{\renewcommand{\theinstitutecity}{#1}}
\newcommand{\thereviewerone}{}
\newcommand{\reviewerone}[1]{\renewcommand{\thereviewerone}{#1}}
\newcommand{\thereviewertwo}{}
\newcommand{\reviewertwo}[1]{\renewcommand{\thereviewertwo}{#1}}
\newcommand{\theeditstart}{}
\newcommand{\theeditend}{}
\newcommand{\editingtime}[2]{
\renewcommand{\theeditstart}{#1}
\renewcommand{\theeditend}{#2}
}
%% do not show the date
\date{}
\newcommand{\theaddress}[1]{}
\newcommand{\address}[1]{\renewcommand{\theaddress}{#1}}
\newcommand{\thecity}[1]{}
\newcommand{\city}[1]{\renewcommand{\thecity}{#1}}
\newcommand{\theemail}[1]{}
\newcommand{\email}[1]{\renewcommand{\theemail}{#1}}
\newcommand{\thetitleotherlanguage}{}
\newcommand{\titleotherlanguage}[1]{\renewcommand{\thetitleotherlanguage}{#1}}
\newcommand{\thesubtitleotherlanguage}{}
\newcommand{\subtitleotherlanguage}[1]{\renewcommand{\thesubtitleotherlanguage}{#1}}
\newcommand{\thekeywords}{}
\newcommand{\keywords}[1]{\renewcommand{\thekeywords}{#1}}
\newcommand{\thekeywordsotherlanguge}{}
\newcommand{\keywordsotherlanguge}[1]{\renewcommand{\thekeywordsotherlanguge}{#1}}
%% Thesis type handling
\newcommand{\thethesistype}{}
\newcommand{\studyprogram}[1]{\subtitle{\vspace*{1cm} \iflanguage{ngerman}{\thesistype\\ ~\\von}{\thesistype\\ ~\\of}}
\renewcommand{\thethesistype}{#1}}
\usepackage{colortbl}
\usepackage{xcolor}
% \definecolor{hka-red}{cmyk}{0,0.35294117647,0.39215686274,0.01960784313}
\definecolor{hka-red}{cmyk}{0,0.9,1,0.05}
\definecolor{hka-blue}{cmyk}{0.39215686274,0.27450980392,0,0}
\definecolor{hka-lightblue}{cmyk}{0.3725490196,0.03921568627 ,0,0}
\newcommand{\hkadrawline}{
\ifIRASthesis@blue
\noindent\textcolor{hka-blue}{\rule{15cm}{1mm}}
\else
\ifIRASthesis@red
\noindent\textcolor{hka-red}{\rule{15cm}{1mm}}
\else
\noindent\textcolor{hka-lightblue}{\rule{15cm}{1mm}}
\fi
\fi
}
\newcommand{\settitle}{
\publishers{
{\changefont{phv}{m}{n}\selectfont
\begin{flushleft}
\large
\iflanguage{ngerman}{\ifIRASthesis@bachelor Bachelorarbeit \else \ifIRASthesis@master Masterarbeit \else Projektarbeit \fi \fi}{\ifIRASthesis@bachelor Bachelor's Thesis \else \ifIRASthesis@master Master's Thesis \else Project Paper \fi \fi}\\
\iflanguage{ngerman}{vorgelegt \ifIRASthesis@bachelor zur Erlangung des Bachelorgrades \else \ifIRASthesis@master zur Erlangung des Mastergrades \else im Rahmen des Studiengangs Robotik und künstliche Intelligenz in der Produktion \fi \fi}{in partial fulfilment of the requirements for the \ifIRASthesis@bachelor Bachelor's \else \ifIRASthesis@master Master's degree \else Robotics and Artificial Intelligence in Production Master's course \fi \fi}\\
\iflanguage{ngerman}{der Hochschule Karlsruhe}{at Karlsruhe University of Applied Sciences}
\vspace*{0.8cm}
\iflanguage{ngerman}{An der\thefaculty}{At the\thefaculty} \\
\theinstitute
\vspace*{0.8cm}
\noindent\begin{tabular}{@{}lcl}
\ifthenelse{\equal{\thereviewertwo}{}}{\iflanguage{ngerman}{Gutachter}{Reviewer}: & \hfill & \thereviewerone \\
}{\iflanguage{ngerman}{Erstgutachter/in}{First reviewer}: & \hfill & \thereviewerone \\
\iflanguage{ngerman}{Zweitgutachter/in}{Second reviewer}: & \hfill & \thereviewertwo \\
}
\end{tabular}
\vspace{1.6cm}
\normalsize{
\theeditstart{} -- \theeditend
}
\end{flushleft}
}
}
\pagenumbering{Roman}
}
\uppertitleback{\theinstitute \\ \thefaculty \\ \iflanguage{ngerman}{Hochschule Karlsruhe}{Karlsruhe University of Applied Sciences}\\ \theinstituteaddress \\ \theinstitutecity }
\newcommand{\includetitle}{
\maketitle
}
\newcommand{\includedeclaration}{}
\renewcommand{\includedeclaration}{\input{content/04-declaration}\blankpage}
\newcommand{\includepc}{}
\renewcommand{\includepc}{\input{content/05-pc}\blankpage}
\newcommand{\includeabstract}{}
\newcommand{\theAbstract}{}
\newcommand{\abstract}{}
\newcommand{\Abstract}{}
\renewcommand{\includeabstract}{
\iflanguage{ngerman}{
% include German and English abstracts
\renewcommand{\abstract}[1]{\renewcommand{\theAbstract}{\chapter*{\abstractname} ##1}}
\renewcommand{\Abstract}[1]{\renewcommand{\theAbstract}{\chapter*{\abstractname}
% \addcontentsline{toc}{chapter}{\abstractname}
{\Large\changefont{phv}{b}{n}\centering{\thetitle}\\\vspace{0.7cm}} ##1}}
\include{content/03-abstract-de}
\theAbstract
\vfill
\textbf{Stichw\"orter:} \emph{\thekeywords}
\begin{otherlanguage}{english}
\renewcommand{\abstract}[1]{\renewcommand{\theAbstract}{\chapter*{\abstractname} ##1}}
\renewcommand{\Abstract}[1]{\renewcommand{\theAbstract}{\chapter*{\abstractname}
% \addcontentsline{toc}{chapter}{\abstractname}
{\Large\changefont{phv}{b}{n}\centering{\thetitleotherlanguage}\\\vspace{0.7cm}} ##1}}
\include{content/02-abstract-en}
\theAbstract
\vfill % works also: %\vskip 0.7cm
\textbf{Keywords:} \emph{\thekeywordsotherlanguge}
\end{otherlanguage}
}{
% include English and German abstracts
\renewcommand{\abstract}[1]{\renewcommand{\theAbstract}{\chapter*{\abstractname} ##1}}
\renewcommand{\Abstract}[1]{\renewcommand{\theAbstract}{\chapter*{\abstractname} {\Large\changefont{phv}{b}{n}\centering{\thetitle}\\\vspace{0.7cm}} ##1}}
\include{content/02-abstract-en}
\theAbstract
\vfill
\textbf{Keywords:} \emph{\thekeywords}
\begin{otherlanguage}{ngerman}
\renewcommand{\abstract}[1]{\renewcommand{\theAbstract}{\chapter*{\abstractname} ##1}}
\renewcommand{\Abstract}[1]{\renewcommand{\theAbstract}{\chapter*{\abstractname} {\Large\changefont{phv}{b}{n}\centering{\thetitleotherlanguage}\\\vspace{0.7cm}} ##1}}
\include{content/03-abstract-de}
\theAbstract
\vfill
\textbf{Stichw\"orter:} \emph{\thekeywordsotherlanguge}
\end{otherlanguage}
}
}
\newcommand{\includeacknowledgments}{}
\renewcommand{\includeacknowledgments}{\newpage\vspace*{\fill}\begin{center}\emph{\input{content/01-acknowledgements}}\end{center}\vspace*{\fill}}
\newcommand{\inculdetableofcontents}{}
\renewcommand{\inculdetableofcontents}{
\tableofcontents
\blankpage
}
\newcommand{\nomenlcaturename}{\iflanguage{ngerman}{Nomenklatur}{Nomenclature}}
\newcommand{\acronymsname}{\iflanguage{ngerman}{Abkürzungsverzeichnis}{Acronyms}}
\renewcommand{\lstlistlistingname}{\iflanguage{ngerman}{Algorithmenverzeichnis}{List of Algorithms}}
\renewcommand{\lstlistingname}{\iflanguage{ngerman}{Algorithmus}{Algorithm}}
\newcommand{\includeglossary}{}
\renewcommand{\includeglossary}{
\glsaddall
\printglossary[title=\glossaryname, toctitle=\glossaryname] % \addcontentsline{toc}{chapter}{\glossaryname}
}
\newcommand{\includeacronyms}{}
\renewcommand{\includeacronyms}{
\glsaddall
\printacronyms[title=\acronymsname, toctitle=\acronymsname] %\addcontentsline{toc}{chapter}{\acronymsname}
}
\newcommand{\includenomenclature}{}
\renewcommand{\includenomenclature}{
\makenomenclature
\printnomenclature[title=\nomenlcaturename, toctitle=\nomenlcaturename]
% \addcontentsline{toc}{chapter}{\nomenlcaturename}
}
\newcommand{\inculdelistoffigures}{}
\renewcommand{\inculdelistoffigures}{
\listoffigures \addcontentsline{toc}{chapter}{\listfigurename}
}
\newcommand{\inculdelistoftables}{}
\renewcommand{\inculdelistoftables}{
\listoftables \addcontentsline{toc}{chapter}{\listtablename}
}
\newcommand{\inculdelistoflistings}{}
\renewcommand{\inculdelistoflistings}{
\lstlistoflistings \addcontentsline{toc}{chapter}{\lstlistlistingname}
}
\newcommand{\setmainpart}{
\cleardoubleplainpage
\setcounter{page}{1}
\pagenumbering{arabic}
}
\newcommand{\Appendix}[1][\appendixname]{\chapter*{#1}\addcontentsline{toc}{chapter}{#1} \appendix \setcounter{figure}{0}}
\newcommand{\Bibliography}[1]{\addcontentsline{toc}{chapter}{\bibname} \bibliography{#1}}
%% Use plainnat to work nicely with natbib.
\bibliographystyle{plainnat}
\newcommand{\addmybibentry}{}
\renewcommand{\addmybibentry}{
\newpage
\section*{\iflanguage{ngerman}{BibTex Eintrag für dieser Arbeit}{BibTex Entry of this Thesis}}
\ifIRASthesis@bachelor @bachelorsthesis \else @mastersthesis \fi\{\theauthor\_\theeditend, \\
\tab author = \{\theauthor\}, \\
\tab IRAS-thesis = \thesistype, \\
\tab keywords = \{\thekeywords\}, \\
\tab location = \{Karlsruhe, Germany\}, \\
\tab school = \{Karlsruhe University of Applied Sciences\}, \\
\tab title = \{\thetitle\}, \\
\tab year = \{\theeditend\} \\
\}
}
\setlength{\footheight}{14.5pt}
% \renewcommand*{\chapterpagestyle}{\ofoot{}}
% \rehead{\pagemark}
% \rohead{\pagemark}
% \ofoot{}
% \renewcommand*{\sectionmark}[1]{%
% \markright{\MakeMarkcase{\ifnumbered{section}{\sectionmarkformat}{}#1}}