forked from aichbauer/template-thesis-latex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tex
245 lines (195 loc) · 5.46 KB
/
main.tex
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
% Select language used in document (ngerman or english). Automatically
% generated text is translated accordingly.
% use \selectthesislanguage in body.tex to switch to default language
\documentclass[english, paper]{mmt} % use for BA1
%\documentclass[ngerman, bachelorthesis]{mmt} % use for BA2
%\documentclass[ngerman, masterthesis]{mmt} % use for Master thesis
\usepackage{mathptmx}
\usepackage{graphicx}
\usepackage{times}
\usepackage{subfig}
\usepackage{float}
\usepackage[utf8]{inputenc}
\usepackage{listings}
\usepackage{makecell}
\usepackage[toc,page]{appendix}
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
}
\usepackage{breakurl}
\usepackage{amsmath}
\usepackage[autostyle,german=guillemets]{csquotes}
% moved to cls file. use \selectthesislanguage to switch to default language
%\usepackage[english,ngerman]{babel}
\usepackage{abbrevs}
%% the following solves a bug in the abbrevs package, that adds an empty
%% space after the abbrev
\makeatletter
\renewcommand\maybe@space@{%
% \@tempswatrue % <= this is in the original
\maybe@ictrue % <= this is new
\expandafter \@tfor
\expandafter \reserved@a
\expandafter :%
\expandafter =%
\nospacelist
\do \t@st@ic
% \if@tempswa % <= this is in the original
\ifmaybe@ic % <= this is new
\space
\fi
}
\makeatother
%%
\usepackage{listings}
\usepackage{color}
\definecolor{lightgray}{rgb}{.9,.9,.9}
\definecolor{darkgray}{rgb}{.4,.4,.4}
\definecolor{purple}{rgb}{0.65, 0.12, 0.82}
\lstdefinelanguage{JavaScript}{
keywords={break, case, catch, continue, debugger, default, delete, do, else, false, finally, for, function, if, in, instanceof, new, null, return, switch, this, throw, true, try, typeof, var, let, const, void, while, with},
morecomment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[b]',
morestring=[b]",
ndkeywords={class, export, boolean, throw, implements, import, this},
keywordstyle=\color{blue}\bfseries,
ndkeywordstyle=\color{darkgray}\bfseries,
identifierstyle=\color{black},
commentstyle=\color{purple}\ttfamily,
stringstyle=\color{red}\ttfamily,
sensitive=true
}
\lstset{
language=JavaScript,
backgroundcolor=\color{lightgray},
extendedchars=true,
basicstyle=\footnotesize\ttfamily,
showstringspaces=false,
showspaces=false,
numbers=left,
numberstyle=\footnotesize,
numbersep=9pt,
tabsize=2,
breaklines=true,
showtabs=false,
captionpos=b
}
\usepackage[authordate,bibencoding=auto,strict,noibid,backend=biber]{biblatex-chicago}
\bibliography{bibliography}
%% Add configuration options
\include{_configuration}
%% Paper title.
\title{\titlename}
%% This is how authors are specified in the conference style
%% Author
\author{ \authorname\\ \scriptsize \authormail \\ \scriptsize
\ifmmtlanguagegerman FH Salzburg \else Salzburg University of Applied Sciences \fi
}
%% A teaser figure can be included as follows, but is not recommended since
%% the space is now taken up by a full width abstract.
%\teaser{
% \includegraphics[width=1.5in]{sample.eps}
% \caption{This can be a teaser image of the thesis.}
%}
%% Abstract section for paper format.
\abstract{
\ifmmtlanguagegerman
\selectlanguage{ngerman}
\input{kurzfassung}
\else
\selectlanguage{english}
\input{abstract}
\fi
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%% START OF THE PAPER %%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
% TODO switch for english, german
\selectthesislanguage
\pagenumbering{gobble}
% group open
\ifmmtpaper
\begingroup
% is required because paper template messes with sizes
\fontsize{12}{18}\selectfont
\setlength{\parindent}{0pt}
\setlength{\parskip}{5pt plus 2pt minus 1pt}
\sectionfont{\fontsize{14}{15}\selectfont}
\fi
\input{title}
\onecolumn
\pagenumbering{roman}
\ifmmtpaper % does not need affidavit
\else
\newpage
\input{affidavit} % comment out for expose
\fi
% group closing
\ifmmtpaper
\endgroup
\fi
\ifmmtpaper\else % paper does not need this stuff
\newpage
\selectlanguage{ngerman}
\section*{Kurzfassung}
\input{kurzfassung}
\ifmmtmasterthesis
\vspace*{0.5cm}
\textbf{Schlüsselwörter:~} \keywordsgerman
\fi
\newpage
\selectlanguage{english}
\section*{Abstract}
\input{abstract}
\ifmmtmasterthesis
\vspace*{0.5cm}
\textbf{Keywords:~} \keywordsenglish
\fi
\selectthesislanguage
\newpage
\tableofcontents
\newpage
\listoffigures
\lstlistoflistings
\listoftables
\fi
\mmtcolumnmode % switch back to column formatting of stylesheet
\maketitle % used for paper formatting
\ifmmtpaper\else
\pagestyle{headings}
\fi
\pagenumbering{arabic}
\input{body} % the main text
%\input{acknowledgements}
\ifmmtpaper
\printbibliography
\else % only use the following for thesis format
\newpage
\printbibliography
\fi
% group open
\ifmmtpaper
\begingroup
% is required because paper template messes with sizes
\fontsize{12}{18}\selectfont
\setlength{\parindent}{0pt}
\setlength{\parskip}{5pt plus 2pt minus 1pt}
\sectionfont{\fontsize{14}{15}\selectfont}
\fi
\ifmmtpaper\else % nicht im paper
\newpage
\onecolumn
\input{appendix}
\fi
% group closing
\ifmmtpaper
\endgroup
\fi
\end{document}