diff --git a/.gitignore b/.gitignore index 9ee327c..f44a6b6 100755 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,17 @@ -# vscode -.vscode/* +# VS code *.code-workspace -.history/ -## Core latex/pdflatex auxiliary files: +# LaTeX/XeLaTeX temporary files *.aux -*.lof *.log -*.lot +*.toc +*.bcf +*.run.xml *.fls *.out -*.toc -*.fmt -*.fot -*.cb -*.cb2 -.*.lb + +# PDF output - usually a bad idea to keep this in Git +main.pdf ## Intermediate documents: *.dvi @@ -303,4 +299,4 @@ TSWLatexianTemp* # REVTeX puts footnotes in the bibliography by default, unless the nofootinbib # option is specified. Footnotes are the stored in a file with suffix Notes.bib. # Uncomment the next line to have this generated file ignored. -#*Notes.bib \ No newline at end of file +#*Notes.bib diff --git a/Appendices/AppendixA.tex b/Appendices/AppendixA.tex index 320c019..b84b2e4 100755 --- a/Appendices/AppendixA.tex +++ b/Appendices/AppendixA.tex @@ -1,4 +1,8 @@ -% Appendix A +% !TEX root = ../main.tex + +%---------------------------------------------------------------------------------------- +% APPENDIX A +%---------------------------------------------------------------------------------------- \chapter{Frequently Asked Questions} % Main appendix title diff --git a/Appendices/AppendixTemplate.tex b/Appendices/AppendixTemplate.tex index 2bb566b..addad6b 100755 --- a/Appendices/AppendixTemplate.tex +++ b/Appendices/AppendixTemplate.tex @@ -1,7 +1,11 @@ -% Appendix Template +% !TEX root = ../main.tex + +%---------------------------------------------------------------------------------------- +% APPENDIX TEMPLATE +%---------------------------------------------------------------------------------------- \chapter{Appendix Title Here} % Main appendix title \label{ApendixX} % Change X to a consecutive letter; for referencing this appendix elsewhere, use \ref{AppendixX} -Write your Appendix content here. \ No newline at end of file +Write your Appendix content here. diff --git a/Appendices/DeclarationOfOriginalityZHAW.tex b/Appendices/DeclarationOfOriginalityZHAW.tex index 4e0f35e..a8e3f4c 100755 --- a/Appendices/DeclarationOfOriginalityZHAW.tex +++ b/Appendices/DeclarationOfOriginalityZHAW.tex @@ -1,7 +1,19 @@ -% Appendix: Declaration of Originality +% !TEX root = ../main.tex -\chapter{Declaration of Originality} % Main appendix title +%---------------------------------------------------------------------------------------- +% APPENDIX: DECLARATION OF ORIGINALITY +%---------------------------------------------------------------------------------------- -\label{DeclarationOfOriginalityZHAW} % For referencing this appendix elsewhere, use \ref{AppendixA} +% Include the official "Plagiatserklärung" as a PDF +% Ensure that a TOC entry is create while suppressing the chapter header +\cleardoublepage +\phantomsection +\addtocounter{chapter}{1} +\addcontentsline{toc}{chapter}{\protect\numberline{\thechapter} Declaration of Originality} +% The above replaces this command (which creates a chapter header). +%\chapter{Declaration of Originality} % Main appendix title +\label{DeclarationOfOriginalityZHAW} + +% Include a PDF (full page) \includepdf[pages=-]{Appendices/plagiatserklaerung-master-eng.pdf} diff --git a/Chapters/Chapter1.tex b/Chapters/Chapter1.tex index 086dbe5..945c743 100755 --- a/Chapters/Chapter1.tex +++ b/Chapters/Chapter1.tex @@ -1,12 +1,19 @@ -% Chapter 1 +% Indicate the main file. Must go at the beginning of the file. +% !TEX root = ../main.tex + +%---------------------------------------------------------------------------------------- +% CHAPTER 1 +%---------------------------------------------------------------------------------------- -\chapter{Chapter Title Here} % Main chapter title + +\chapter{Introduction to \LaTeX} % Main chapter title \label{Chapter1} % For referencing the chapter elsewhere, use \ref{Chapter1} %---------------------------------------------------------------------------------------- -% Define some commands to keep the formatting separated from the content +% Define some commands to keep the formatting separated from the content +% Placing such commands in the preamble is a good idea. \newcommand{\keyword}[1]{\textbf{#1}} \newcommand{\tabhead}[1]{\textbf{#1}} \newcommand{\code}[1]{\texttt{#1}} @@ -41,9 +48,10 @@ \subsection{A (not so short) Introduction to \LaTeX{}} \subsection{A Short Math Guide for \LaTeX{}} -If you are writing a technical or mathematical thesis, then you may want to read the document by the AMS (American Mathematical Society) called, \enquote{A Short Math Guide for \LaTeX{}}. It can be found online here: -\url{http://www.ams.org/tex/amslatex.html} -under the \enquote{Additional Documentation} section towards the bottom of the page. +If you are writing a technical or mathematical thesis, then you may want to read the document by the AMS (American Mathematical Society) called, \enquote{A Short Math Guide for \LaTeX{}}. It can be found online: + +\url{http://www.ams.org/tex/amslatex.html} $\rightarrow$ \enquote{Additional Documentation}\\ +\url{https://mirror.foobar.to/CTAN/info/short-math-guide/} \subsection{Common \LaTeX{} Math Symbols} There are a multitude of mathematical symbols available for \LaTeX{} and it would take a great effort to learn the commands for them all. The most common ones you are likely to use are shown on this page: @@ -75,7 +83,8 @@ \subsection{About this Template} Steve's \file{ecsthesis.cls} was then taken by Sunil Patel who modified it by creating a skeleton framework and folder structure to place the thesis files in. The resulting template can be found on Sunil's site here: \url{http://www.sunilpatel.co.uk/thesis-template} -Sunil's template was made available through \url{http://www.LaTeXTemplates.com} where it was modified many times based on user requests and questions. Version 2.0 and onwards of this template represents a major modification to Sunil's template and is, in fact, hardly recognisable. The work to make version 2.0 possible was carried out by \href{mailto:vel@latextemplates.com}{Vel} and Johannes Böttcher. + +Sunil's template was made available through \url{http://www.LaTeXTemplates.com}, where it was modified many times based on user requests and questions. Version 2.0 and onwards of this template represents a major modification to Sunil's template and is, in fact, hardly recognisable. The work to make version 2.0 possible was carried out by \href{mailto:vel@latextemplates.com}{Vel} and Johannes Böttcher. Based on Sunil's Version 2.0, Matteo updated the template and incorporated ZHAW University thesis guidelines. @@ -179,7 +188,7 @@ \section{Thesis Features and Conventions}\label{ThesisConventions} \subsection{Printing Format} -This thesis template is designed for double sided printing (i.e. content on the front and back of pages) as most theses are printed and bound this way. Switching to one sided printing is as simple as uncommenting the \option{oneside} option of the \code{documentclass} command at the top of the \file{main.tex} file. You may then wish to adjust the margins to suit specifications from your institution. +This thesis template is designed for double sided printing (i.e. content on the front and back of pages) as most theses are printed and bound this way. To switch to one sided printing, uncomment the \option{oneside} option of the \code{documentclass} command at the top of the \file{main.tex} file. You may then wish to adjust the margins to suit specifications from your institution. The headers for the pages contain the page number on the outer side (so it is easy to flick through to the page you want) and the chapter name on the inner side. @@ -211,23 +220,24 @@ \subsection{Tables} Tables are an important way of displaying your results, below is an example table which was generated with this code: {\small -\begin{verbatim} -\begin{table} -\caption{The effects of treatments X and Y on the four groups studied.} -\label{tab:treatments} -\centering -\begin{tabular}{l l l} -\toprule -\tabhead{Groups} & \tabhead{Treatment X} & \tabhead{Treatment Y} \\ -\midrule -1 & 0.2 & 0.8\\ -2 & 0.17 & 0.7\\ -3 & 0.24 & 0.75\\ -4 & 0.68 & 0.3\\ -\bottomrule\\ -\end{tabular} -\end{table} -\end{verbatim} + \begin{verbatim} + \begin{table} + \caption{The effects of treatments X and Y + on the four groups studied.} + \label{tab:treatments} + \centering + \begin{tabular}{l l l} + \toprule + \tabhead{Groups} & \tabhead{Treatment X} & \tabhead{Treatment Y} \\ + \midrule + 1 & 0.2 & 0.8\\ + 2 & 0.17 & 0.7\\ + 3 & 0.24 & 0.75\\ + 4 & 0.68 & 0.3\\ + \bottomrule\\ + \end{tabular} + \end{table} + \end{verbatim} } \begin{table} @@ -310,7 +320,7 @@ \subsection{Typesetting mathematics} \section{Sectioning and Subsectioning} -You should break your thesis up into nice, bite-sized sections and subsections. \LaTeX{} automatically builds a table of Contents by looking at all the \verb|\chapter{}|, \verb|\section{}| and \verb|\subsection{}| commands you write in the source. +You should break your thesis up into nice, bite-sized sections and subsections. \LaTeX{} automatically builds a table of contents by looking at all \verb|\chapter{}|, \verb|\section{}| and \verb|\subsection{}| commands you write in the source. The Table of Contents should only list the sections to three (3) levels. A \verb|chapter{}| is level zero (0). A \verb|\section{}| is level one (1) and so a \verb|\subsection{}| is level two (2). In your thesis it is likely that you will even use a \verb|subsubsection{}|, which is level three (3). The depth to which the Table of Contents is formatted is set within \file{MastersDoctoralThesis.cls}. If you need this changed, you can do it in \file{main.tex}. diff --git a/Chapters/Chapter2.tex b/Chapters/Chapter2.tex new file mode 100644 index 0000000..53bd3dc --- /dev/null +++ b/Chapters/Chapter2.tex @@ -0,0 +1,57 @@ +% Indicate the main file. Must go at the beginning of the file. +% !TEX root = ../main.tex + +%---------------------------------------------------------------------------------------- +% CHAPTER 2 +%---------------------------------------------------------------------------------------- + +\chapter{Code Listings} + +\label{Chapter2} % For referencing the chapter elsewhere, use \ref{Chapter2} + +%---------------------------------------------------------------------------------------- + +The package \href{https://www.overleaf.com/learn/latex/Code\_listing}{\code{listings}} permits to easily include existing code. Simply use the command \verb|\lstinputlisting[language=name]{path/to/file}|. See \href{https://www.overleaf.com/learn/latex/Code\_listing#Supported\_languages}{here} for a list of supported programming languages. + + +\lstinputlisting[language=Python,caption=External file: code/example.py]{Code/example.py} + +It is also possible to enter code directly into \LaTeX: + +\begin{lstlisting}[language=C++] +#include +void hello_world(void){ + std::cout << "Hello World!" << std::endl; +} +\end{lstlisting} + +Alternatively, one can use the syntax highlighting toolbox \href{https://pygments.org/}{\code{Pygments}} in combination with the \LaTeX-package \href{www.overleaf.com/learn/latex/Code\_Highlighting\_with\_minted}{\code{minted}}. It provides slightly better results, as the code will actually be parsed. + +To install Pygments, use the following command. For \code{minted} to work properly, run the pdflatex tool with the flag \code{--shell-escape}. If you are using a TEX editor, you can modify the typesetting command somewhere in the settings. + +\begin{lstlisting}[language=bash] +# Make sure that Pygments is installed. +python -m pip install pygments + +# Then add the --shell-escape flag to the command +# that is used to compile your LaTeX code. +pdflatex --output-dir="$BUILD_DIR" \ + --file-line-error \ + --shell-escape \ + --synctex=1 "$1" +\end{lstlisting} + + + +% Set the following line to \iftrue if minted is available on your system. +% See the above instructions to see how. + +\iffalse +See below how the result looks like if minted is available on your system. + +\begin{listing}[!ht] +\inputminted[linenos, bgcolor=codebackground, style=friendly]{python}{Code/example.py} +\caption{Example from external file, parsed using \code{Pygments}} +\end{listing} + +\fi \ No newline at end of file diff --git a/Chapters/ChapterTemplate.tex b/Chapters/ChapterTemplate.tex index de7338d..94f6db1 100755 --- a/Chapters/ChapterTemplate.tex +++ b/Chapters/ChapterTemplate.tex @@ -1,11 +1,17 @@ -% Chapter Template +% Indicate the main file. Must go at the beginning of the file. +% !TEX root = ../main.tex + +%---------------------------------------------------------------------------------------- +% CHAPTER TEMPLATE +%---------------------------------------------------------------------------------------- + \chapter{Chapter Title Here} % Main chapter title \label{ChapterX} % Change X to a consecutive number; for referencing this chapter elsewhere, use \ref{ChapterX} %---------------------------------------------------------------------------------------- -% SECTION 1 +% SECTION 1 %---------------------------------------------------------------------------------------- \section{Main Section 1} @@ -13,21 +19,21 @@ \section{Main Section 1} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ultricies lacinia euismod. Nam tempus risus in dolor rhoncus in interdum enim tincidunt. Donec vel nunc neque. In condimentum ullamcorper quam non consequat. Fusce sagittis tempor feugiat. Fusce magna erat, molestie eu convallis ut, tempus sed arcu. Quisque molestie, ante a tincidunt ullamcorper, sapien enim dignissim lacus, in semper nibh erat lobortis purus. Integer dapibus ligula ac risus convallis pellentesque. %----------------------------------- -% SUBSECTION 1 +% SUBSECTION 1 %----------------------------------- \subsection{Subsection 1} Nunc posuere quam at lectus tristique eu ultrices augue venenatis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam erat volutpat. Vivamus sodales tortor eget quam adipiscing in vulputate ante ullamcorper. Sed eros ante, lacinia et sollicitudin et, aliquam sit amet augue. In hac habitasse platea dictumst. %----------------------------------- -% SUBSECTION 2 +% SUBSECTION 2 %----------------------------------- \subsection{Subsection 2} Morbi rutrum odio eget arcu adipiscing sodales. Aenean et purus a est pulvinar pellentesque. Cras in elit neque, quis varius elit. Phasellus fringilla, nibh eu tempus venenatis, dolor elit posuere quam, quis adipiscing urna leo nec orci. Sed nec nulla auctor odio aliquet consequat. Ut nec nulla in ante ullamcorper aliquam at sed dolor. Phasellus fermentum magna in augue gravida cursus. Cras sed pretium lorem. Pellentesque eget ornare odio. Proin accumsan, massa viverra cursus pharetra, ipsum nisi lobortis velit, a malesuada dolor lorem eu neque. %---------------------------------------------------------------------------------------- -% SECTION 2 +% SECTION 2 %---------------------------------------------------------------------------------------- \section{Main Section 2} diff --git a/Code/example.py b/Code/example.py new file mode 100644 index 0000000..2b790c8 --- /dev/null +++ b/Code/example.py @@ -0,0 +1,30 @@ +import numpy as np + +def compute_pi(n): + """ + Compute pi using Leibniz' formula: + 1 - 1/3 + 1/5 - 1/7 + 1/9 - ... = pi/4 + """ + k = 1 # Denominator + s = 0 # Sum + + for i in range(n): + if i % 2 == 0: + s += 4/k + else: + # odd index elements are negative + s -= 4/k + k += 2 + + return s + +def main(): + n = 1000 + pi = compute_pi(n) + pi_ref = np.pi + print("Pi (computed): %f (n=%d)" % (pi,n)) + print("Pi (reference): %f" % pi_ref) + print("Difference: %f" % (pi_ref-pi)) + + +main() diff --git a/Figures/ZHAW_Logo.png b/Figures/ZHAW_Logo.png deleted file mode 100755 index e3c75e6..0000000 Binary files a/Figures/ZHAW_Logo.png and /dev/null differ diff --git a/Figures/title-page.jpg b/Figures/title-page.jpg new file mode 100644 index 0000000..ad7768b Binary files /dev/null and b/Figures/title-page.jpg differ diff --git a/Figures/zhaw_font_deu_font.pdf b/Figures/zhaw_font_deu_font.pdf new file mode 100644 index 0000000..37f3730 Binary files /dev/null and b/Figures/zhaw_font_deu_font.pdf differ diff --git a/Figures/zhaw_font_eng_font.pdf b/Figures/zhaw_font_eng_font.pdf new file mode 100644 index 0000000..f58d153 Binary files /dev/null and b/Figures/zhaw_font_eng_font.pdf differ diff --git a/Figures/zhaw_rgb.png b/Figures/zhaw_rgb.png new file mode 100644 index 0000000..962611d Binary files /dev/null and b/Figures/zhaw_rgb.png differ diff --git a/Front/abstract.tex b/Front/abstract.tex new file mode 100644 index 0000000..2819f50 --- /dev/null +++ b/Front/abstract.tex @@ -0,0 +1,19 @@ +% !TEX root = ../main.tex + +%---------------------------------------------------------------------------------------- +% ABSTRACT PAGE +%---------------------------------------------------------------------------------------- +\begin{abstract} +\addchaptertocentry{\abstractname} % Add the abstract to the table of contents +The abstract is like a miniature version of the entire manuscript. Structure it similarly: Begin with the context and motivation for the project, a brief description of the method and available data, your findings, and conclusions. Limit yourself to one page! +\end{abstract} + + +%---------------------------------------------------------------------------------------- +% German ABSTRACT PAGE +%---------------------------------------------------------------------------------------- +\begin{extraAbstract} +\addchaptertocentry{\extraabstractname} % Add the abstract to the table of contents + +Die Zusammenfassung entspricht einer Miniaturversion des gesamten Dokuments. Gliedere sie ähnlich: Beginne mit dem Kontext und der Motivation für das Projekt, einer kurzen Beschreibung der Methode und der verfügbaren Daten, Ihren Ergebnissen und den Schlussfolgerungen. Beschränke dich auf eine Seite! +\end{extraAbstract} diff --git a/Front/acknowledgements.tex b/Front/acknowledgements.tex new file mode 100644 index 0000000..a8b24cf --- /dev/null +++ b/Front/acknowledgements.tex @@ -0,0 +1,10 @@ +% !TEX root = ../main.tex + +%---------------------------------------------------------------------------------------- +% ACKNOWLEDGEMENTS +%---------------------------------------------------------------------------------------- +\begin{acknowledgements} +\addchaptertocentry{\acknowledgementname} % Add the acknowledgements to the table of contents + +The acknowledgements belong here. Do not forget to mention your project supervisors, without flattering them too much. +\end{acknowledgements} diff --git a/Front/declaration.tex b/Front/declaration.tex new file mode 100644 index 0000000..0da76aa --- /dev/null +++ b/Front/declaration.tex @@ -0,0 +1,32 @@ +% !TEX root = ../main.tex + +%---------------------------------------------------------------------------------------- +% DECLARATION OF ORIGINALITY +%---------------------------------------------------------------------------------------- + +\begin{declaration} +\addchaptertocentry{\authorshipname} % Add the declaration to the table of contents + +\begin{textbox}{red}{2} +REMOVE THIS SECTION IF THE \href{https://www.zhaw.ch/en/lsfm/study/studiweb/master-ls/masters-thesis/}{ORIGINAL COPY OF THE ZHAW DECLARATION OF ORIGINALITY} IS USED IN THE APPENDIX. +\end{textbox} +\vspace{1cm} + +\noindent I, \authorname, declare that this thesis titled, \enquote{\ttitle} and the work presented in it are my own. I confirm that: + +\begin{itemize} +\item This work was done wholly or mainly while in candidature for a research degree at the \univname. +\item Where any part of this thesis has previously been submitted for a degree or any other qualification at this university or any other institution, this has been clearly stated. +\item Where I have consulted the published work of others, this is always clearly attributed. +\item Where I have quoted from the work of others, the source is always given. With the exception of such quotations, this thesis is entirely my own work. +\item I have acknowledged all main sources of help. +\item Where the thesis is based on work done by myself jointly with others, I have made clear exactly what was done by others and what I have contributed myself.\\ +\end{itemize} +\vspace{1cm} + +\noindent Signed:\\ +\rule[0.5em]{25em}{0.5pt} % This prints a line for the signature + +\noindent Date:\\ +\rule[0.5em]{25em}{0.5pt} % This prints a line to write the date +\end{declaration} diff --git a/Front/imprint.tex b/Front/imprint.tex new file mode 100644 index 0000000..4e5ada7 --- /dev/null +++ b/Front/imprint.tex @@ -0,0 +1,58 @@ +% !TEX root = ../main.tex + +%---------------------------------------------------------------------------------------- +% IMPRINT +%---------------------------------------------------------------------------------------- + +\thispagestyle{empty} +\vspace*{\fill} + +{\bfseries \Large Imprint} +\vspace{0.75cm} + +\begin{footnotesize} + + +\begin{flushleft} +\begin{tabular}{ @{}lp{0.6\textwidth}@{} } +\emph{Project:} & \ttype\\ +\emph{Title}: & \ttitle\\ +\emph{Author}: & \authorname\\ +\emph{Date}: & \tdate\\ +\emph{Keywords}: & \keywordnames\\ +\emph{Copyright}:& \univname + +\end{tabular} +\end{flushleft} + +\vspace{0.75cm} + + +\begin{minipage}[t]{0.95\textwidth} +\begin{flushleft} +\emph{Study program:}\\ +\href{\studyproglink}{\studyprog}\\ +\href{\univlink}{\univname} +\end{flushleft} +\end{minipage} + +\vspace{0.75cm} + +\begin{minipage}[t]{0.50\textwidth} +\begin{flushleft} +\emph{Supervisor 1:}\\ +\supinfoA +\end{flushleft} +\end{minipage} +\begin{minipage}[t]{0.45\textwidth} +\begin{flushleft} +\ifdefempty{\supnameB} +{} +{ + \emph{Supervisor 2:}\\ + \supinfoB +} +\end{flushleft} +\end{minipage} + +\end{footnotesize} diff --git a/Front/symbols.tex b/Front/symbols.tex new file mode 100644 index 0000000..d9a3ae8 --- /dev/null +++ b/Front/symbols.tex @@ -0,0 +1,47 @@ +% !TEX root = ../main.tex + +%---------------------------------------------------------------------------------------- +% ABBREVIATIONS +%---------------------------------------------------------------------------------------- + +% List of abbreviations: a table of two columns. +\begin{abbreviations}{ll} + +\textbf{LAH} & \textbf{L}ist \textbf{A}bbreviations \textbf{H}ere\\ +\textbf{WSF} & \textbf{W}hat (it) \textbf{S}tands \textbf{F}or\\ + +\end{abbreviations} + + +%---------------------------------------------------------------------------------------- +% PHYSICAL CONSTANTS/OTHER DEFINITIONS +%---------------------------------------------------------------------------------------- + +%% List of physical constants: a three column table +%\begin{constants}{lr@{${}={}$}l} +% +%% The \SI{}{} command is provided by the siunitx package, see its documentation +%% for instructions on how to use it +% +%Speed of Light & $c_{0}$ & \SI{2.99792458e8}{\meter\per\second} (exact)\\ +%%Constant Name & $Symbol$ & $Constant Value$ with units\\ +% +%\end{constants} + + +%---------------------------------------------------------------------------------------- +% SYMBOLS +%---------------------------------------------------------------------------------------- + +%% List of Symbols: a three column table +%\begin{symbols}{lll} +% +%$a$ & distance & \si{\meter} \\ +%$P$ & power & \si{\watt} (\si{\joule\per\second}) \\ +%%Symbol & Name & Unit \\ +% +%\addlinespace % Gap to separate the Roman symbols from the Greek +% +%$\omega$ & angular frequency & \si{\radian} \\ +% +%\end{symbols} diff --git a/Front/titlepage.tex b/Front/titlepage.tex new file mode 100644 index 0000000..17deb74 --- /dev/null +++ b/Front/titlepage.tex @@ -0,0 +1,68 @@ +% !TEX root = ../main.tex + +%---------------------------------------------------------------------------------------- +% TITLE PAGE +%---------------------------------------------------------------------------------------- + +\newgeometry{margin=1in} +\begin{titlepage} + +% Make the title page mostly inert to the parskip-setting. +\setlength{\parskip}{0pt} + +\begin{center} +\includegraphics[width=0.15\textwidth]{Figures/zhaw_rgb} + +\ifxetex + \vspace{0.6cm} + {\zhawtitlefont\color{zhawblue}\LARGE \univname\par} % University + \vspace{0.2cm} +\else + \vspace{0.87cm} + {\includegraphics[height=17.9pt]{Figures/zhaw_font_eng_font}\par} + \vspace{0.05cm} +\fi +{\Large Department \deptname\par} % Department +\vspace{0.2cm} +{\Large \instname\par} % Institute +\vspace{3.5cm} +\textsc{\Large \ttype} % Thesis type +\vspace{0.2cm} +\HRule +\vspace{0.4cm} +{\huge \bfseries \ttitle\par} % Thesis title +\vspace{0.4cm} +\HRule +\vspace{1.5cm} + + +\begin{minipage}[t]{0.4\textwidth} +\begin{flushleft} + \large + \emph{Author:}\\ + \authorname +\end{flushleft} +\end{minipage} +\begin{minipage}[t]{0.4\textwidth} +\begin{flushright} + \large + \emph{Supervisors:} \\ + \supnameA \\ + \supnameB +\end{flushright} +\end{minipage} +\vspace{2cm} + +\vfill + +{\large +Submitted on\\ +\tdate\\ +\vspace{1.5cm} +Study program:\\ +\studyprog\\ +} +\vfill +\end{center} +\end{titlepage} +\restoregeometry diff --git a/MastersDoctoralThesis.cls b/MastersDoctoralThesis.cls index 46d2fe0..cb4eeaf 100755 --- a/MastersDoctoralThesis.cls +++ b/MastersDoctoralThesis.cls @@ -28,7 +28,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %---------------------------------------------------------------------------------------- -% CLASS DEFINITION AND PARAMETERS +% CLASS DEFINITION AND PARAMETERS %---------------------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e}[1996/12/01] @@ -71,88 +71,88 @@ \ProvideDocumentCommand{\chapterfont}{}{\Huge\bfseries} \ProvideDocumentCommand{\chapterprefixfont}{}{\LARGE\bfseries} \DeclareDocumentCommand{\@makechapterhead}{ m }{% - \abovechapterskip - {\parindent \z@ \chapteralign \normalfont - \ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \ifbool{chapteroneline}{% - \chapterfont \mdtChapapp\thechapter\autodot\enspace - }{% - \chapterprefixfont \@chapapp\space \thechapter - \par\nobreak - \chapterinbetweenskip - }% - \fi - \fi - \interlinepenalty\@M% - \chapterfont #1\par\nobreak - \chapterbelowskip - } - \thispagestyle{\chapter@p@gestyle} + \abovechapterskip + {\parindent \z@ \chapteralign \normalfont + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \ifbool{chapteroneline}{% + \chapterfont \mdtChapapp\thechapter\autodot\enspace + }{% + \chapterprefixfont \@chapapp\space \thechapter + \par\nobreak + \chapterinbetweenskip + }% + \fi + \fi + \interlinepenalty\@M% + \chapterfont #1\par\nobreak + \chapterbelowskip + } + \thispagestyle{\chapter@p@gestyle} } \def\@makeschapterhead#1{% - \abovechapterskip - {\parindent \z@ \chapteralign - \normalfont - \interlinepenalty\@M - \chapterfont #1\par\nobreak - \chapterbelowskip - } - \thispagestyle{\chapter@p@gestyle} + \abovechapterskip + {\parindent \z@ \chapteralign + \normalfont + \interlinepenalty\@M + \chapterfont #1\par\nobreak + \chapterbelowskip + } + \thispagestyle{\chapter@p@gestyle} } % Addchap provides unnumbered chapters with an entry in the table of contents as well as an updated header \ProvideDocumentCommand{\addchap}{ s o m }{% - \chapter*{#3}% - \markboth{}{}% - \IfBooleanTF{#1}{% - }{% - \IfNoValueTF{#2}{% - \addchaptertocentry{#3}% - \markboth{\MakeMarkcase{#3}}{\MakeMarkcase{#3}}% - }{% - \addchaptertocentry{#2}% - \markboth{\MakeMarkcase{#2}}{\MakeMarkcase{#2}}% - }% - }% + \chapter*{#3}% + \markboth{}{}% + \IfBooleanTF{#1}{% + }{% + \IfNoValueTF{#2}{% + \addchaptertocentry{#3}% + \markboth{\MakeMarkcase{#3}}{\MakeMarkcase{#3}}% + }{% + \addchaptertocentry{#2}% + \markboth{\MakeMarkcase{#2}}{\MakeMarkcase{#2}}% + }% + }% }% \ProvideDocumentCommand{\addsec}{ s o m }{% - \section*{#3}% - \markright{}% - \IfBooleanTF{#1}{% - }{% - \IfNoValueTF{#2}{% - \addcontentsline{toc}{section}{#3}% - \markright{\MakeMarkcase{#3}}%% - }{% - \addcontentsline{toc}{section}{#2}% - \markright{\MakeMarkcase{#2}}% - }% - }% + \section*{#3}% + \markright{}% + \IfBooleanTF{#1}{% + }{% + \IfNoValueTF{#2}{% + \addcontentsline{toc}{section}{#3}% + \markright{\MakeMarkcase{#3}}%% + }{% + \addcontentsline{toc}{section}{#2}% + \markright{\MakeMarkcase{#2}}% + }% + }% }% %---------------------------------------------------------------------------------------- -% CLASS OPTIONS +% CLASS OPTIONS %---------------------------------------------------------------------------------------- \ifbool{parskip}{\RequirePackage{parskip}} % If the parskip option is passed to the class, require the parskip package \ifbool{listtoc}{% If the liststotoc option has been passed to the class, add the lists to the table of contents - \patchcmd{\listoftables}{\@starttoc{lot}}{% - \addchaptertocentry{\listtablename}\@starttoc{lot}% - }{}{}% - \patchcmd{\listoffigures}{\@starttoc{lof}}{% - \addchaptertocentry{\listfigurename}\@starttoc{lof}% - }{}{}% + \patchcmd{\listoftables}{\@starttoc{lot}}{% + \addchaptertocentry{\listtablename}\@starttoc{lot}% + }{}{}% + \patchcmd{\listoffigures}{\@starttoc{lof}}{% + \addchaptertocentry{\listfigurename}\@starttoc{lof}% + }{}{}% } \ifbool{toctoc}{% If the toctotoc options has been passed to the class, add the table of contents to the table of contents - \patchcmd{\tableofcontents}{\@starttoc{toc}% + \patchcmd{\tableofcontents}{\@starttoc{toc}% }{% - \addchaptertocentry{\contentsname}\@starttoc{toc}}{}{}% + \addchaptertocentry{\contentsname}\@starttoc{toc}}{}{}% } \patchcmd{\tableofcontents}{\MakeUppercase}{\MakeMarkcase}{}{} @@ -164,36 +164,40 @@ % If the option `nolistspacing' is given, the spacing in the different lists is reduced to single spacing. This option is only useful, if the spacing of the document has been changed to onehalfspacing or doublespacing. \ifbool{nolistspace}{ - \patchcmd{\listoffigures}{% - \@starttoc{lof} - }{% - \begingroup% - \singlespace\@starttoc{lof}\endgroup% - }{}{}% - \patchcmd{\listoftables}{% - \@starttoc{lot} - }{% - \begingroup% - \singlespace\@starttoc{lot}\endgroup% - }{}{}% - \patchcmd{\tableofcontents}{% - \@starttoc{toc} - }{% - \begingroup% - \singlespace\@starttoc{toc}\endgroup% - }{}{}% + \patchcmd{\listoffigures}{% + \@starttoc{lof} + }{% + \begingroup% + \singlespace\@starttoc{lof}\endgroup% + }{}{}% + \patchcmd{\listoftables}{% + \@starttoc{lot} + }{% + \begingroup% + \singlespace\@starttoc{lot}\endgroup% + }{}{}% + \patchcmd{\tableofcontents}{% + \@starttoc{toc} + }{% + \begingroup% + \singlespace\@starttoc{toc}\endgroup% + }{}{}% }{} %---------------------------------------------------------------------------------------- -% REQUIRED PACKAGES +% REQUIRED PACKAGES %---------------------------------------------------------------------------------------- \RequirePackage{babel} % Required for automatically changing names of document elements to languages besides english \RequirePackage{scrbase} % Required for handling language-dependent names of sections/document elements -\RequirePackage{scrhack} % Loads fixes for various packages +% Load package scrhack, which provides fixes for various packages. +% Defer the loading, because scrhack should be loaded after other packages. +% See here for the problem: https://tex.stackexchange.com/questions/659887/ +\AddToHook{begindocument/before}{\usepackage{scrhack}} +%\RequirePackage{scrhack} \RequirePackage{setspace} % Required for changing line spacing @@ -212,7 +216,7 @@ %---------------------------------------------------------------------------------------- -% DEFINE CUSTOM THESIS INFORMATION COMMANDS +% DEFINE CUSTOM THESIS INFORMATION COMMANDS %---------------------------------------------------------------------------------------- \NewDocumentCommand{\thesistitle} { o m }{% @@ -220,23 +224,40 @@ \def\@title{#2}% \def\ttitle{#2}% } +\NewDocumentCommand{\thesistype}{m}{\newcommand{\ttype}{#1}} +\NewDocumentCommand{\thesisdate}{m}{\newcommand{\tdate}{#1}} \DeclareDocumentCommand{\author}{m}{\newcommand{\authorname}{#1}\renewcommand{\@author}{#1}} -\NewDocumentCommand{\supervisor}{m}{\newcommand{\supname}{#1}} -\NewDocumentCommand{\supervisorsec}{m}{\newcommand{\supnamesec}{#1}} +\NewDocumentCommand{\supervisorA}{m}{\newcommand{\supnameA}{#1}} +\NewDocumentCommand{\supervisorAmail}{m}{\newcommand{\supmailA}{#1}} +\NewDocumentCommand{\supervisorAweb}{m}{\newcommand{\supwebA}{#1}} +\NewDocumentCommand{\supervisorAinfo}{m}{\newcommand{\supinfoA}{#1}} +\NewDocumentCommand{\supervisorB}{m}{\newcommand{\supnameB}{#1}} +\NewDocumentCommand{\supervisorBmail}{m}{\newcommand{\supmailB}{#1}} +\NewDocumentCommand{\supervisorBweb}{m}{\newcommand{\supwebB}{#1}} +\NewDocumentCommand{\supervisorBinfo}{m}{\newcommand{\supinfoB}{#1}} \NewDocumentCommand{\examiner}{m}{\newcommand{\examname}{#1}} \NewDocumentCommand{\degree}{m}{\newcommand{\degreename}{#1}} -\NewDocumentCommand{\addresses}{m}{\newcommand{\addressname}{#1}} +\NewDocumentCommand{\studyprogram}{m}{\newcommand{\studyprog}{#1}} +\NewDocumentCommand{\studyprogramlink}{m}{\newcommand{\studyproglink}{#1}} \NewDocumentCommand{\university}{m}{\newcommand{\univname}{#1}} \NewDocumentCommand{\universitygerman}{m}{\newcommand{\univnameger}{#1}} \NewDocumentCommand{\department}{m}{\newcommand{\deptname}{#1}} +\NewDocumentCommand{\institute}{m}{\newcommand{\instname}{#1}} \NewDocumentCommand{\group}{m}{\newcommand{\groupname}{#1}} -\NewDocumentCommand{\faculty}{m}{\newcommand{\facname}{#1}} \NewDocumentCommand{\subject}{m}{\newcommand{\subjectname}{#1}} \NewDocumentCommand{\keywords}{m}{\newcommand{\keywordnames}{#1}} +\NewDocumentCommand{\universitylink}{m}{\newcommand{\univlink}{#1}} +\NewDocumentCommand{\universitylinkgerman}{m}{\newcommand{\univlinkger}{#1}} +\NewDocumentCommand{\departmentlink}{m}{\newcommand{\deptlink}{#1}} +\NewDocumentCommand{\institutelink}{m}{\newcommand{\instlink}{#1}} +\NewDocumentCommand{\grouplink}{m}{\newcommand{\grplink}{#1}} + + + \newcommand{\checktoopen}{% New command to move content to the next page which prints to the next odd page if twosided mode is active - \if@openright\cleardoublepage\else\clearpage\fi - \ifdef{\phantomsection}{\phantomsection}{}% The \phantomsection command is necessary for hyperref to jump to the correct page + \if@openright\cleardoublepage\else\clearpage\fi + \ifdef{\phantomsection}{\phantomsection}{}% The \phantomsection command is necessary for hyperref to jump to the correct page } \NewDocumentCommand{\bhrule}{}{\typeout{--------------------}} @@ -247,11 +268,11 @@ \setcounter{tocdepth}{3} % The depth to which the document sections are printed to the table of contents \ProvideDocumentCommand{\addchaptertocentry}{ m }{% - \addcontentsline{toc}{chapter}{#1}% + \addcontentsline{toc}{chapter}{#1}% } %---------------------------------------------------------------------------------------- -% COLOURS +% COLOURS %---------------------------------------------------------------------------------------- \usepackage{xcolor} % Required for specifying custom colours @@ -259,20 +280,20 @@ \colorlet{mdtRed}{red!50!black} %---------------------------------------------------------------------------------------- -% MARGINS +% MARGINS %---------------------------------------------------------------------------------------- \RequirePackage{geometry} \geometry{ - headheight=4ex, - includehead, - includefoot + headheight=4ex, + includehead, + includefoot } \raggedbottom %---------------------------------------------------------------------------------------- -% PENALTIES +% PENALTIES %---------------------------------------------------------------------------------------- \doublehyphendemerits=10000 % No consecutive line hyphens @@ -282,69 +303,69 @@ \interfootnotelinepenalty=9999 % Almost never break footnotes %---------------------------------------------------------------------------------------- -% HEADERS AND FOOTERS +% HEADERS AND FOOTERS %---------------------------------------------------------------------------------------- \RequirePackage[markcase=used]{scrlayer-scrpage} \providepairofpagestyles{thesisSimple}{% - \clearpairofpagestyles% - \automark[chapter]{chapter} - \ihead{\headmark}% Inner header - \ohead[\pagemark]{\pagemark}% Outer header + \clearpairofpagestyles% + \automark[chapter]{chapter} + \ihead{\headmark}% Inner header + \ohead[\pagemark]{\pagemark}% Outer header } \ifoot{}% Inner footer \ofoot{}% Outer footer \pagestyle{thesisSimple} \providepairofpagestyles[thesisSimple]{thesis}{% - \automark*[section]{}% + \automark*[section]{}% } \providepairofpagestyles[thesisSimple]{review}{% - \ofoot[\shorttitle/\authorname]{\shorttitle/\authorname} - \ifoot[\today]{\today} + \ofoot[\shorttitle/\authorname]{\shorttitle/\authorname} + \ifoot[\tdate]{\tdate} } \pagestyle{thesis} \ifbool{headsepline}{\KOMAoption{headsepline}{true}}{} \PreventPackageFromLoading[\ClassError{\classname}{Package `fancyhdr' is incompatible\MessageBreak with this class}{The pagesyles are defined - using package `scrlayer-scrpage', please consult the\MessageBreak + using package `scrlayer-scrpage', please consult the\MessageBreak KOMA-script documentation for details.}]{fancyhdr} \newcommand{\blank@p@gestyle}{empty} \newcommand{\chapter@p@gestyle}{plain} \NewDocumentCommand{\blankpagestyle}{ m }{% - \ClassWarning{\classname}{\string\blankpagestyle\space is - obsolete,\MessageBreak use \string\setblankpagestyle \space instead}\renewcommand{\blank@p@gestyle}{}{#1} + \ClassWarning{\classname}{\string\blankpagestyle\space is + obsolete,\MessageBreak use \string\setblankpagestyle \space instead}\renewcommand{\blank@p@gestyle}{}{#1} } \NewDocumentCommand{\setblankpagestyle}{ m }{\renewcommand{\blank@p@gestyle}{#1}} \NewDocumentCommand{\setchapterpagestyle}{ m }{\renewcommand{\chapter@p@gestyle}{#1}} \DeclareDocumentCommand\cleardoublepage{}{\clearpage\if@twoside \ifodd\c@page\else - \hbox{} - \thispagestyle{\blank@p@gestyle} - \newpage - \if@twocolumn\hbox{}\newpage\fi\fi\fi% + \hbox{} + \thispagestyle{\blank@p@gestyle} + \newpage + \if@twocolumn\hbox{}\newpage\fi\fi\fi% } %---------------------------------------------------------------------------------------- -% ABBREVIATIONS PAGE DESIGN +% ABBREVIATIONS PAGE DESIGN %---------------------------------------------------------------------------------------- \newcommand{\abbrevname}{List of Abbreviations} \providecaptionname{english,british,american}{\abbrevname}{List of Abbreviations} \providecaptionname{ngerman,german,austrian,naustrian}{\abbrevname}{Abk\"urzungsverzeichnis} \NewDocumentEnvironment{abbreviations}{ m }{% - \ifbool{nolistspace}{\begingroup\singlespacing}{} - \ifbool{listtoc}{\addchap{\abbrevname}}{\addchap*{\abbrevname}} - \begin{longtable}{#1} - }{% - \end{longtable} - \addtocounter{table}{-1}% Don't count this table as one of the document tables - \ifbool{nolistspace}{\endgroup}{} + \ifbool{nolistspace}{\begingroup\singlespacing}{} + \ifbool{listtoc}{\addchap{\abbrevname}}{\addchap*{\abbrevname}} + \begin{longtable}{#1} + }{% + \end{longtable} + \addtocounter{table}{-1}% Don't count this table as one of the document tables + \ifbool{nolistspace}{\endgroup}{} } %---------------------------------------------------------------------------------------- -% ABSTRACT PAGE DESIGN +% ABSTRACT PAGE DESIGN %---------------------------------------------------------------------------------------- \DeclareDocumentCommand{\abstractauthorfont}{}{} @@ -356,68 +377,75 @@ KOMA-script documentation for details.}]{fancyhdr} \providecaptionname{german,ngerman,austrian,naustrian}{\byname}{von} \providecaptionname{american,australian,british,canadian,english,newzealand,UKenglish,USenglish}{\byname}{by} \ifbool{consistentlayout}{ - \DeclareDocumentEnvironment{abstract}{ O{} }{% - \addchap*{\abstractname}% - {\chapteralign\normalsize\abstractauthorfont \authorname \par}% Author name - \vspace{\baselineskip} - {\chapteralign\parbox{.7\linewidth}{\chapteralign\normalsize\itshape\abstracttitlefont\@title}\par}% Thesis title - \bigskip\noindent\ignorespaces - }% - {}%end alt-abstract + \DeclareDocumentEnvironment{abstract}{ O{} }{% + \addchap*{\abstractname}% + }% + {}%end alt-abstract }{% - \DeclareDocumentEnvironment{abstract}{ O{\null\vfill} }{ - \checktoopen - \tttypeout{\abstractname} - #1%added to be able to have abstract more than one page long - \thispagestyle{plain} - \begin{center} - {\normalsize \MakeUppercase{\univname} \par}% University name in capitals - \bigskip - {\huge\textit{\abstractname} \par} - \bigskip - {\normalsize \facname \par}% Faculty name - {\normalsize \deptname \par}% Department name - \bigskip - {\normalsize \degreename\par}% Degree name - \bigskip - {\normalsize\bfseries \@title \par}% Thesis title - \medskip - {\normalsize \byname{} \authorname \par}% Author name - \bigskip - \end{center} - } - { - \vfill\null - } + \DeclareDocumentEnvironment{abstract}{ O{\null\vfill} }{ + \checktoopen + \tttypeout{\abstractname} + #1%added to be able to have abstract more than one page long + \thispagestyle{plain} + \begin{center} + % Make this floating box inert to the parskip setting + \setlength{\parskip}{0pt} + {\normalsize \MakeUppercase{\univname}\par}% University name in capitals + \bigskip + {\Huge\textit{\abstractname} \par} + \bigskip + {\normalsize \instname \par}% Institute name + {\normalsize \deptname \par}% Department name + \bigskip + {\normalsize \degreename\par}% Degree name + \bigskip + {\normalsize\bfseries \@title \par}% Thesis title + \medskip + {\normalsize \byname{} \authorname \par}% Author name + \bigskip + \end{center} + } + { + \vfill\null + } } -\DeclareDocumentEnvironment{extraAbstract}{ O{\null\vfill} }{ - \checktoopen - \tttypeout{\extraabstractname} - #1%added to be able to have abstract more than one page long - \thispagestyle{empty} - \begin{center} - {\normalsize \MakeUppercase{\univnameger} \par}% University name in capitals - \bigskip - {\huge\textit{\extraabstractname} \par} - \bigskip - {\normalsize \facname \par}% Faculty name - {\normalsize \deptname \par}% Department name - \bigskip - {\normalsize \degreename\par}% Degree name - \bigskip - {\normalsize\bfseries \@title \par}% Thesis title - \medskip - {\normalsize \vonname{} \authorname \par}% Author name - \bigskip - \end{center} -} -{ - \vfill\null +\ifbool{consistentlayout}{ + \DeclareDocumentEnvironment{extraAbstract}{ O{} }{% + \addchap*{\extraabstractname}% + }% + {}%end alt-abstract +}{% + \DeclareDocumentEnvironment{extraAbstract}{ O{\null\vfill} }{ + \checktoopen + \tttypeout{\extraabstractname} + #1%added to be able to have abstract more than one page long + \thispagestyle{empty} + \begin{center} + % Make this floating box inert to the parskip setting + \setlength{\parskip}{0pt} + {\normalsize \MakeUppercase{\univnameger} \par}% University name in capitals + \bigskip + {\Huge\textit{\extraabstractname} \par} + \bigskip + {\normalsize \instname \par}% Institute name + {\normalsize \deptname \par}% Department name + \bigskip + {\normalsize \degreename\par}% Degree name + \bigskip + {\normalsize\bfseries \@title \par}% Thesis title + \medskip + {\normalsize \vonname{} \authorname \par}% Author name + \bigskip + \end{center} + } + { + \vfill\null + } } %---------------------------------------------------------------------------------------- -% ACKNOWLEDGEMENTS PAGE DESIGN +% ACKNOWLEDGEMENTS PAGE DESIGN %---------------------------------------------------------------------------------------- \usepackage{xcolor} @@ -427,55 +455,27 @@ KOMA-script documentation for details.}]{fancyhdr} \providecaptionname{german,ngerman,austrian,naustrian}{\acknowledgementname}{Danksagung} % Acknowledgement text for Germanic countries \ifbool{consistentlayout}{ - \DeclareDocumentEnvironment{acknowledgements}{}{% - \tttypeout{\acknowledgementname} - \addchap*{\acknowledgementname} - } + \DeclareDocumentEnvironment{acknowledgements}{}{% + \tttypeout{\acknowledgementname} + \addchap*{\acknowledgementname} + } } { - \DeclareDocumentEnvironment{acknowledgements}{}{% - \checktoopen - \tttypeout{\acknowledgementname} - \thispagestyle{plain} - \begin{center}{\huge\textit{\acknowledgementname}\par}\end{center} - } - { - \vfil\vfil\null - } + \DeclareDocumentEnvironment{acknowledgements}{}{% + \checktoopen + \tttypeout{\acknowledgementname} + \thispagestyle{plain} + \begin{center}{\Huge\textit{\acknowledgementname}\par}\end{center} + \bigskip + } + { + \vfill\null + } } - %---------------------------------------------------------------------------------------- -% Preface PAGE DESIGN -%---------------------------------------------------------------------------------------- - -\usepackage{xcolor} -\colorlet{mdtRed}{red!50!black} -\newcommand{\prefacename}{Preface} -\providecaptionname{american,australian,british,canadian,english,newzealand,UKenglish,USenglish} {\prefacename}{Preface} % Acknowledgement text for English countries -\providecaptionname{german,ngerman,austrian,naustrian}{\prefacename}{Vorwort} % Acknowledgement text for Germanic countries - -\ifbool{consistentlayout}{ - \DeclareDocumentEnvironment{preface}{}{% - \tttypeout{\prefacename} - \addchap*{\prefacename} - } -} -{ - \DeclareDocumentEnvironment{preface}{}{% - \checktoopen - \tttypeout{\prefacename} - \thispagestyle{plain} - \begin{center}{\huge\textit{\prefacename}\par}\end{center} - } - { - \vfil\vfil\null - } -} - -%---------------------------------------------------------------------------------------- -% DECLARATION PAGE DESIGN +% DECLARATION PAGE DESIGN %---------------------------------------------------------------------------------------- \newcommand{\authorshipname}{Declaration of Authorship} @@ -483,45 +483,36 @@ KOMA-script documentation for details.}]{fancyhdr} \providecaptionname{german,ngerman,austrian,naustrian}{\authorshipname}{Eidesstattliche Erkl\"arung} % Declaration of Authorship text for Germanic countries \ifbool{consistentlayout}{ - \DeclareDocumentEnvironment{declaration}{}{ - \addchap*{\authorshipname} - }{}% + \DeclareDocumentEnvironment{declaration}{}{ + \addchap*{\authorshipname} + }{}% }{ - \DeclareDocumentEnvironment{declaration}{}{ - \checktoopen - \tttypeout{\authorshipname} - \thispagestyle{plain} - \null\vfil - {\noindent\huge\bfseries\authorshipname\par\vspace{10pt}} - }{} + \DeclareDocumentEnvironment{declaration}{}{ + \checktoopen + \tttypeout{\authorshipname} + \thispagestyle{plain} + \null\vfil + \begin{center}{\Huge\textit{\authorshipname}\par}\end{center} + \bigskip + }{} } + %---------------------------------------------------------------------------------------- -% DEDICATION PAGE DESIGN +% DEDICATION PAGE DESIGN %---------------------------------------------------------------------------------------- - -\ifbool{consistentlayout}{ - \DeclareDocumentCommand{\dedicatory}{ - m O{\vspace*{.7\textheight} } }{ - \checktoopen\tttypeout{Dedicatory} - \markboth{}{} - #2 - {\hfill\parbox{.4\textwidth}{\flushright#1\par}} - } -}{ - \newcommand\dedicatory[1]{ - \checktoopen - \tttypeout{Dedicatory} - \null\vfil - \thispagestyle{plain} - \begin{center}{\Large\slshape #1}\end{center} - \vfil\null - } +\newcommand\dedicatory[1]{ + \checktoopen + \tttypeout{Dedicatory} + \thispagestyle{empty} + \null\vfil + \begin{center}{\Large\slshape #1}\end{center} + \vfil\null } %---------------------------------------------------------------------------------------- -% PHYSICAL CONSTANTS PAGE DESIGN +% PHYSICAL CONSTANTS PAGE DESIGN %---------------------------------------------------------------------------------------- \newcommand{\constantsname}{Physical Constants} @@ -529,17 +520,17 @@ KOMA-script documentation for details.}]{fancyhdr} \providecaptionname{ngerman,german,austrian,naustrian}{\constantsname}{Physikalische Konstanten} \NewDocumentEnvironment{constants}{ m }{% - \ifbool{nolistspace}{\begingroup\singlespacing}{} - \ifbool{listtoc}{\addchap{\constantsname}}{\addchap*{\constantsname}} - \begin{longtable}{#1} - }{% - \end{longtable} - \addtocounter{table}{-1}% Don't count this table as one of the document tables - \ifbool{nolistspace}{\endgroup}{} + \ifbool{nolistspace}{\begingroup\singlespacing}{} + \ifbool{listtoc}{\addchap{\constantsname}}{\addchap*{\constantsname}} + \begin{longtable}{#1} + }{% + \end{longtable} + \addtocounter{table}{-1}% Don't count this table as one of the document tables + \ifbool{nolistspace}{\endgroup}{} } %---------------------------------------------------------------------------------------- -% SYMBOLS PAGE DESIGN +% SYMBOLS PAGE DESIGN %---------------------------------------------------------------------------------------- \newcommand{\symbolsname}{List of Symbols} @@ -547,13 +538,13 @@ KOMA-script documentation for details.}]{fancyhdr} \providecaptionname{ngerman,german,austrian,naustrian}{\symbolsname}{Symbolverzeichnis} \NewDocumentEnvironment{symbols}{ m }{% - \ifbool{nolistspace}{\begingroup\singlespacing}{} - \ifbool{listtoc}{\addchap{\symbolsname}}{\addchap*{\symbolsname}} - \begin{longtable}{#1} - }{% - \end{longtable} - \addtocounter{table}{-1}% Don't count this table as one of the document tables - \ifbool{nolistspace}{\endgroup}{} + \ifbool{nolistspace}{\begingroup\singlespacing}{} + \ifbool{listtoc}{\addchap{\symbolsname}}{\addchap*{\symbolsname}} + \begin{longtable}{#1} + }{% + \end{longtable} + \addtocounter{table}{-1}% Don't count this table as one of the document tables + \ifbool{nolistspace}{\endgroup}{} } %---------------------------------------------------------------------------------------- @@ -577,9 +568,9 @@ breaklinks=true, } \pdfstringdefDisableCommands{% If there is an explicit linebreak in a section heading (or anything printed to the pdf-bookmarks), it is replaced by a space - \let\\\space% + \let\\\space% } - } + } }{%nothing } diff --git a/README.md b/README.md index 1ab4b8a..4546ee4 100755 --- a/README.md +++ b/README.md @@ -13,14 +13,21 @@ # ZHAW thesis template -This is a template for LaTeX thesis (M.Sc. or PhD) at [Zurich University of Applied Sciences, ZHAW](https://www.zhaw.ch/). -This repository was created to relieve future students of the tedious work of thesis formatting. -Make sure that it meets your programme specific requirements and the details that need to be discussed with the supervisor. +This is a LaTeX template for Master theses or other reports at [Zurich University of Applied Sciences, ZHAW](https://www.zhaw.ch/). +This repository was created to relieve future students of the tedious work of thesis formatting. Make sure that the thesis meets the specific requirements of your study program. + + + +![Title page of thesis](Figures/title-page.jpg) ## Usage -I found it very convenient to use this template in [Overleaf.com](https://www.overleaf.com/). This allowed me to share it with my supervisor, who could comment directly in the document. -Fork this Github repository to your Github account. Then you login to [Overleaf.com](https://www.overleaf.com/) -> *New Project* -> *Import from Github* and select your fork of the thesis template. +It is very convenient to use this template in [Overleaf.com](https://www.overleaf.com/). This allowed me to share it with my supervisor, who could comment directly in the document. Apply the following steps: + +- Fork this Github repository to your Github account. +- Login to [Overleaf.com](https://www.overleaf.com/) +- Create a *New Project*, and select *Import from Github* +- Select your fork of the thesis template ## Show your support @@ -39,14 +46,9 @@ Feel free to contribute to this project to improve it. 3. Commit changes on the dev branch. 4. Open a [pull request](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) to merge in the [master branch of the original repository](https://github.com/matteodelucchi/ZHAW_thesis-template/tree/master) -## Versions - -For major (i.e. study program specific) changes, I suggest to have multiple branches which are going to be explained here. -The current master branch was used for a Master thesis of the [Applied Computational Life Sciences Master program](https://www.zhaw.ch/en/lsfm/institutes-centres/ias/study-teaching/master/) at the [Institute of Applied Simulations](https://www.zhaw.ch/en/lsfm/institutes-centres/ias-institute-of-applied-simulation/) from the department [Life Science and Facility Management](https://www.zhaw.ch/en/lsfm/). - ## Authorship \& Licence -This template was adapted by Matteo Delucchi based on a template downloaded from: +This template was adapted by Matteo Delucchi and others based on a template downloaded from: [LaTeXTemplates.com](http://www.latextemplates.com/template/masters-doctoral-thesis) Version 2.x major modifications by: diff --git a/main.pdf b/main.pdf index a82a11d..363edc1 100644 Binary files a/main.pdf and b/main.pdf differ diff --git a/main.tex b/main.tex index 509696f..82b8056 100755 --- a/main.tex +++ b/main.tex @@ -1,143 +1,124 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% This is a template for LaTeX thesis (M.Sc. or PhD) at ZHAW. -% -% ZHAW thesis template downloaded from: -% https://github.com/matteodelucchi/ZHAW_thesis-template -% -% University specific changes were made by: -% Matteo Delucchi +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% This is a LaTeX template for Bachelor or Master theses at ZHAW, in accordance with the +% guidelines provided here: +% https://www.zhaw.ch/en/lsfm/study/studiweb/master-ls/masters-thesis/ % -% Based on a template downloaded from: -% http://www.LaTeXTemplates.com -% -% Version 2.x major modifications by: -% Vel (vel@latextemplates.com) % -% This template is based on a template by: +% This template is based on previous works by: % Steve Gunn (http://users.ecs.soton.ac.uk/srg/softwaretools/document/templates/) % Sunil Patel (http://www.sunilpatel.co.uk/thesis-template/) +% Matteo Delucchi (https://github.com/matteodelucchi/ZHAW_thesis-template) % +% University specific changes were made by: +% Matteo Delucchi +% Norman Juchler +% % Template license: % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/) -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %---------------------------------------------------------------------------------------- -% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS +% DOCUMENT SPECIFICATION %---------------------------------------------------------------------------------------- - \documentclass[ -11pt, % The default document font size, options: 10pt, 11pt, 12pt -%oneside, % Two side (alternating margins) for binding by default, uncomment to switch to one side -english, % ngerman for German -singlespacing, % Single line spacing, alternatives: onehalfspacing or doublespacing -%draft, % Uncomment to enable draft mode (no pictures, no links, overfull hboxes indicated) -%nolistspacing, % If the document is onehalfspacing or doublespacing, uncomment this to set spacing in lists to single -%liststotoc, % Uncomment to add the list of figures/tables/etc to the table of contents -%toctotoc, % Uncomment to add the main table of contents to the table of contents -%parskip, % Uncomment to add space between paragraphs -%nohyperref, % Uncomment to not load the hyperref package -headsepline, % Uncomment to get a line under the header -%chapterinoneline, % Uncomment to place the chapter title next to the number on one line -%consistentlayout, % Uncomment to change the layout of the declaration, abstract and acknowledgements pages to match the default layout -]{MastersDoctoralThesis} % The class file specifying the document structure - -\usepackage[utf8]{inputenc} % Required for inputting international characters -\usepackage[T1]{fontenc} % Output font encoding for international characters -\usepackage{xcolor} - -%\usepackage[x-5pg]{pdfx} %for PDF-X support. Has problems with xcolor and hyperref -%\usepackage{subfigure} -\usepackage{caption} -\usepackage{subcaption} - -\usepackage{mathpazo} % Use the Palatino font by default - -\usepackage[backend=biber, % Use the bibtex backend with the authoryear citation style (which resembles APA) -sorting=none, % numbers the reference in order of their appearance in the document. Troubleshoot with deleting all *.aux and *.bbl files and rebuild. -style=numeric-comp, % Compact numeric citation scheme intended for in-text citations. Compact citations replace [1, 2, 3] by [1-3]. -% style=authoryear-comp, % Compact author-year citation scheme. To be used in conjunction with the author-year bibliography style. Prints Doe 1992, 1995 instead of Doe 1992, Doe 1995. -natbib=true]{biblatex} - -\addbibresource{example.bib} % The filename of the bibliography - -\usepackage[autostyle=true]{csquotes} % Required to generate language-dependent quotes in the bibliography - -\usepackage{pdfpages} - -\usepackage{todonotes} -\setlength{\marginparwidth}{2.5cm} % uncomment this if the todonotes are out of margins (cut off page) - -\usepackage{listings} - - -\definecolor{codegreen}{rgb}{0,0.6,0} -\definecolor{codegray}{rgb}{0.5,0.5,0.5} -\definecolor{codepurple}{rgb}{0.58,0,0.82} -\definecolor{backcolour}{rgb}{0.921, 0.929, 0.937} %0.95,0.95,0.92 - -\lstdefinestyle{mystyle}{ -backgroundcolor=\color{backcolour}, -commentstyle=\color{codegreen}, -keywordstyle=\color{magenta}, -numberstyle=\tiny\color{codegray}, -stringstyle=\color{codepurple}, -basicstyle=\ttfamily\footnotesize, -breakatwhitespace=false, -breaklines=true, -captionpos=b, -keepspaces=true, -numbers=left, -numbersep=5pt, -showspaces=false, -showstringspaces=false, -showtabs=false, -tabsize=2 + 11pt, % Default font size + %oneside, % One-side binding. Default: Two-side binding / alternating margins + english, % Language. Use ngerman for German (Neue Rechtschreibung) + singlespacing, % Spacing option: singlespacing, onehalfspacing or doublespacing + %nolistspacing, % Set spacing in lists to single + %draft, % Enable draft mode: no pictures, no links, overfull hboxes indicated + liststotoc, % Include list of figures/tables/etc in the table of contents + %toctotoc, % Include the main table of contents to the table of contents + parskip, % Add vertical space between paragraphs + %nohyperref, % Disable links in the entire document + headsepline, % Show a horizontal line under the header + %chapterinoneline, % Place the chapter title and chapter number on one line + consistentlayout, % Have the same layout for special chapters: + % declaration, abstract and acknowledgements +]{MastersDoctoralThesis} + +% Uncomment the following lines to only include a subset of chapters. +% This is useful for long documents, as typesetting takes a bit of time +%\includeonly{ +% Front/titlepage, +% Front/imprint, +% Front/abstract, +% %Front/declaration, +% %Front/acknowledgements, +% %Front/symbols, +% Chapters/Chapter1, +% %Chapters/Chapter2 +% } + + +%---------------------------------------------------------------------------------------- +% PREAMBLE: PACKAGES AND CONFIGURATIONS +%---------------------------------------------------------------------------------------- +\input{preamble} + + +%---------------------------------------------------------------------------------------- +% THESIS INFORMATION: MODIFY THIS SECTION! +%---------------------------------------------------------------------------------------- + +% The information below is used in the following parts: +% - Title page +% - Imprint +% - Abstract / Zusammenfassung +% - Meta information of PDF + +\thesistitle{Project Title} % Thesis title, command: \ttitle +\thesistype{Track Module 1} % Type of thesis (e.g. Master Thesis) \ttype +\thesisdate{\today} % Date of submission \tdate +\keywords{gravity, physics, disruptive science} + % Keywords for the thesis, \keywordnames +\author{Maxine Muster} % Your name, \authorname +\degree{Master of Science ZFH} % Degree name, \degreename +\studyprogram{Applied Computational Life Sciences, M.Sc.} + % Study program \studyprog +\studyprogramlink{https://www.zhaw.ch/en/lsfm/study/master/applied-computational-life-sciences/} + % Link to study program \studyproglink + +\supervisorA{Dr. Albert Einstein} % Name of supervisor 1, \supnameA +\supervisorAmail{e=mc2@zhaw.ch} % Email address of supervisor 1, \supmailA +\supervisorAweb{https://en.wikipedia.org/wiki/Albert\_Einstein} % \supwebA +\supervisorAinfo{ % Formatted info about supervisor 1: \supinfoA + \supnameA\\ + Zurich University of Applied Sciences\\ + Email: \href{mailto:\supmailA}{\supmailA}\\ + Web: \href{\supwebA}{Link} } -\lstset{style=mystyle} - -\usepackage{makecell} % formatting tables - - - - - -%---------------------------------------------------------------------------------------- -% MARGIN SETTINGS -%---------------------------------------------------------------------------------------- - -\geometry{ -paper=a4paper, % Change to letterpaper for US letter -inner=2.5cm, % Inner margin -outer=3.8cm, % Outer margin -bindingoffset=.5cm, % Binding offset -top=1.5cm, % Top margin -bottom=1.5cm, % Bottom margin -%showframe, % Uncomment to show how the type block is set on the page +% Keep empty if there is no supervisor 2: \supervisorB{} +\supervisorB{Isaac Newton} % Name of supervisor 2, \supnameB +\supervisorBmail{f=am@newton.com} % Email address of supervisor 2, \supmailB +\supervisorBweb{https://en.wikipedia.org/wiki/John\_Locke} % \supwebB +\supervisorBinfo{ % Formatted info about supervisor 2: \supinfoB + \supnameB\\ + University of Cambridge\\ + Email: \href{mailto:\supmailB}{\supmailB}\\ + Web: \href{\supwebB}{Link} } +\university{Zurich University of Applied Sciences} + % University name \univname +\universitygerman{Zürcher Hochschule für Angewandte Wissenschaften} + % University, in German \univnameger +\department{Life Sciences and Facility Management} + % Department, \deptname +\institute{Institute of Computational Life Sciences} + % Institute, \instname +\group{Center of Computational Health} + % Research group \groupname + +% Links +\universitylink {https://www.zhaw.ch/en/university/} % \univlink +\universitylinkgerman{https://www.zhaw.ch/de/university/} % \univlinkger +\departmentlink {https://www.zhaw.ch/de/lsfm/} % \deptlink +\institutelink {https://www.zhaw.ch/en/lsfm/institutes-centres/icls/} % \instlink +\grouplink {https://www.zhaw.ch/en/lsfm/institutes-centres/icls/computational-health/} % \grplink -%---------------------------------------------------------------------------------------- -% THESIS INFORMATION -%---------------------------------------------------------------------------------------- -\thesistitle{Thesis Title} % Your thesis title, this is used in the title and abstract, print it elsewhere with \ttitle -\supervisor{Dr. James \textsc{Smith}} % Your supervisor's name, this is used in the title page, print it elsewhere with \supname -\supervisorsec{Dr. Max \textsc{Miller}} % Your second supervisor's name, this is used in the title page, print it elsewhere with \supnamesec -\examiner{} % Your examiner's name, this is not currently used anywhere in the template, print it elsewhere with \examname -\degree{Doctor of Philosophy} % Your degree name (Doctor of Philosophy or Master of Science), this is used in the title page and abstract, print it elsewhere with \degreename -\author{John \textsc{Smith}} % Your name, this is used in the title page and abstract, print it elsewhere with \authorname -\addresses{} % Your address, this is not currently used anywhere in the template, print it elsewhere with \addressname - -\subject{Biological Sciences} % Your subject area, this is not currently used anywhere in the template, print it elsewhere with \subjectname -\keywords{} % Keywords for your thesis, this is not currently used anywhere in the template, print it elsewhere with \keywordnames -\university{\href{https://www.zhaw.ch/en/university/}{Zurich University of Applied Sciences}} % Your university's name and URL, this is used in the title page and abstract, print it elsewhere with \univname -\universitygerman{\href{https://www.zhaw.ch/de/hochschule/}{Z{\"u}rcher Hochschule f{\"u}r Angewandte Wissenschaften}}% Your university's name in german and URL, this is used in the german abstract (Zusammenfassung), print it elsewhere with \univnameger -\department{\href{https://www.zhaw.ch/en/lsfm/institutes-centres/ias/}{Institute of Applied Simulation}} % Your department's name and URL, this is used in the title page and abstract, print it elsewhere with \deptname -\group{\href{https://www.zhaw.ch/en/lsfm/institutes-centres/ias/research-development/computational-genomics/}{Applied Computational Genomics}} % Your research group's name and URL, this is used in the title page, print it elsewhere with \groupname -\faculty{\href{https://www.zhaw.ch/de/lsfm/}{Life Sciences and Facility Management -}} % Your faculty's name and URL, this is used in the title page and abstract, print it elsewhere with \facname \AtBeginDocument{ \hypersetup{pdftitle=\ttitle} % Set the PDF's title to your title @@ -146,245 +127,93 @@ } \begin{document} +\frontmatter % Roman page numbering for the pre-content pages +\pagestyle{plain} % Default to the plain heading style until the thesis style + % is called for the body content -\frontmatter % Use roman page numbering style (i, ii, iii, iv...) for the pre-content pages - -\pagestyle{plain} % Default to the plain heading style until the thesis style is called for the body content %---------------------------------------------------------------------------------------- -% TITLE PAGE +% TITLE PAGE AND IMPRINT %---------------------------------------------------------------------------------------- +\include{Front/titlepage} +\let\cleardoublepage\clearpage +\include{Front/imprint} -\begin{titlepage} -\begin{center} - -\begin{figure} -\centering -\includegraphics[width=0.15\textwidth]{Figures/ZHAW_Logo.png} % Universtiy Logo, Adapted from: https://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/ZHAW_Logo.svg/879px-ZHAW_Logo.svg.png -\end{figure} - -\vspace*{.06\textheight} -{\scshape\LARGE \univname\par}\vspace{1.5cm} % University name -\textsc{\Large Doctoral Thesis}\\[0.5cm] % Thesis type - -\HRule \\[0.4cm] % Horizontal line -{\huge \bfseries \ttitle\par}\vspace{0.4cm} % Thesis title -\HRule \\[1.5cm] % Horizontal line - -\begin{minipage}[t]{0.4\textwidth} -\begin{flushleft} \large -\emph{Author:}\\ -\href{http://www.johnsmith.com}{\authorname} % Author name - remove the \href bracket to remove the link -\end{flushleft} -\end{minipage} -\begin{minipage}[t]{0.4\textwidth} -\begin{flushright} \large -\emph{First Supervisor:} \\ -\href{http://www.jamessmith.com}{\supname} % Supervisor name - remove the \href bracket to remove the link -\end{flushright} -\begin{flushright} \large -\emph{Second Supervisor:} \\ -\href{http://www.maxmiller.com}{\supnamesec} % Supervisor name - remove the \href bracket to remove the link -\end{flushright} -\end{minipage}\\[3cm] - -\vfill - -\large \textit{A thesis submitted in fulfillment of the requirements\\ for the degree of \degreename}\\[0.3cm] % University requirement text -\textit{in the}\\[0.4cm] -\groupname\\\deptname\\[2cm] % Research group name and department name - -\vfill - -{\large \today}\\[4cm] % Date -%\includegraphics{Logo} % University/department logo - uncomment to place it - -\vfill -\end{center} -\end{titlepage} %---------------------------------------------------------------------------------------- -% DECLARATION PAGE +% DECLARATION %---------------------------------------------------------------------------------------- - -\begin{declaration} -\addchaptertocentry{\authorshipname} % Add the declaration to the table of contents -COMMENT THIS SECTION IF THE \href{https://www.zhaw.ch/en/lsfm/study/studiweb/master-ls/masters-thesis/}{ORIGINAL COPY OF THE ZHAW DECLARATION OF ORIGINALITY} IS USED IN THE APPENDIX.\newline - -\noindent I, \authorname, declare that this thesis titled, \enquote{\ttitle} and the work presented in it are my own. I confirm that: - -\begin{itemize} -\item This work was done wholly or mainly while in candidature for a research degree at this University. -\item Where any part of this thesis has previously been submitted for a degree or any other qualification at this University or any other institution, this has been clearly stated. -\item Where I have consulted the published work of others, this is always clearly attributed. -\item Where I have quoted from the work of others, the source is always given. With the exception of such quotations, this thesis is entirely my own work. -\item I have acknowledged all main sources of help. -\item Where the thesis is based on work done by myself jointly with others, I have made clear exactly what was done by others and what I have contributed myself.\\ -\end{itemize} - -\noindent Signed:\\ -\rule[0.5em]{25em}{0.5pt} % This prints a line for the signature - -\noindent Date:\\ -\rule[0.5em]{25em}{0.5pt} % This prints a line to write the date -\end{declaration} - +% Comment out this section if the declaration of originality from ZHAW is used. +\include{Front/declaration} \cleardoublepage -%---------------------------------------------------------------------------------------- -% QUOTATION PAGE -%---------------------------------------------------------------------------------------- - -\vspace*{0.2\textheight} - -% \noindent\enquote{\itshape I'm fascinated by the idea that genetics is digital. A gene is a long sequence of coded letters, like computer information. Modern biology is becoming very much a branch of information technology.}\bigbreak - -% \hfill Richard Dawkins - - -% \vspace*{0.2\textheight} - -% \noindent\enquote{\itshape A line is a dot that went for a walk.}\bigbreak - -% \hfill Paul Klee - -\noindent\enquote{\itshape You can’t connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something – your gut, destiny, life, karma, whatever. Because believing that the dots will connect down the road will give you the confidence to follow your heart even when it leads you off the well worn path; and that will make all the difference. -}\bigbreak -\hfill{Steve Jobs} \newline -\strut\hfill{\tiny{(Stanford commencement speech, June 2005)}} %---------------------------------------------------------------------------------------- -% ABSTRACT PAGE +% ABSTRACT %---------------------------------------------------------------------------------------- +\include{Front/abstract} -\begin{abstract} -\addchaptertocentry{\abstractname} % Add the abstract to the table of contents -The Thesis Abstract is written here (and usually kept to just this page). The page is kept centered vertically so can expand into the blank space above the title too\ldots - -Structure it the in the following way: context, Need (what we have), Need (what we want), task, object of the document, findings, Conclusion and perspectives. -\end{abstract} - -%---------------------------------------------------------------------------------------- -% German ABSTRACT PAGE -%---------------------------------------------------------------------------------------- - -\begin{extraAbstract} - \addchaptertocentry{\extraabstractname} % Add the abstract to the table of contents -Die Zusammenfassung der Dissertation wird hier geschrieben (und normalerweise nur auf dieser Seite gehalten). Die Seite wird vertikal zentriert, so dass sie sich auch in den leeren Raum über dem Titel ausdehnen kann\ldots - -Strukturiere sie wie folgt: Kontext, Bedarf (was wir haben), Bedarf (was wir wollen), Aufgabe, Gegenstand des Dokuments, Ergebnisse, Schlussfolgerung und Perspektiven. - -\end{extraAbstract} -%---------------------------------------------------------------------------------------- -% ACKNOWLEDGEMENTS -%---------------------------------------------------------------------------------------- - -\begin{acknowledgements} -\addchaptertocentry{\acknowledgementname} % Add the acknowledgements to the table of contents -The acknowledgments and the people to thank go here, don't forget to include your project advisor\ldots -\end{acknowledgements} %---------------------------------------------------------------------------------------- -% LIST OF CONTENTS/FIGURES/TABLES PAGES +% ACKNOWLEDGEMENTS %---------------------------------------------------------------------------------------- +\include{Front/acknowledgements} -\tableofcontents % Prints the main table of contents - -\listoffigures % Prints the list of figures - -\listoftables % Prints the list of tables %---------------------------------------------------------------------------------------- -% ABBREVIATIONS +% LIST OF CONTENTS/FIGURES/TABLES PAGES %---------------------------------------------------------------------------------------- +% Comment out if any of the following is not needed: +\tableofcontents % Add main table of contents +%\listoffigures % Add list of figures +%\listoftables % Add list of tables -\begin{abbreviations}{ll} % Include a list of abbreviations (a table of two columns) - -\textbf{LAH} & \textbf{L}ist \textbf{A}bbreviations \textbf{H}ere\\ -\textbf{WSF} & \textbf{W}hat (it) \textbf{S}tands \textbf{F}or\\ - -\end{abbreviations} %---------------------------------------------------------------------------------------- -% PHYSICAL CONSTANTS/OTHER DEFINITIONS +% ABBREVIATIONS / SYMBOLS %---------------------------------------------------------------------------------------- +\include{Front/symbols} -\begin{constants}{lr@{${}={}$}l} % The list of physical constants is a three column table - -% The \SI{}{} command is provided by the siunitx package, see its documentation for instructions on how to use it - -Speed of Light & $c_{0}$ & \SI{2.99792458e8}{\meter\per\second} (exact)\\ -%Constant Name & $Symbol$ & $Constant Value$ with units\\ - -\end{constants} %---------------------------------------------------------------------------------------- -% SYMBOLS +% DEDICATION %---------------------------------------------------------------------------------------- - -\begin{symbols}{lll} % Include a list of Symbols (a three column table) - -$a$ & distance & \si{\meter} \\ -$P$ & power & \si{\watt} (\si{\joule\per\second}) \\ -%Symbol & Name & Unit \\ - -\addlinespace % Gap to separate the Roman symbols from the Greek - -$\omega$ & angular frequency & \si{\radian} \\ - -\end{symbols} - -%---------------------------------------------------------------------------------------- -% DEDICATION -%---------------------------------------------------------------------------------------- - \dedicatory{For/Dedicated to/To my\ldots} -%---------------------------------------------------------------------------------------- -% PREFACE -%---------------------------------------------------------------------------------------- - -\begin{preface} - \addchaptertocentry{\prefacename} % Add the acknowledgements to the table of contents - Explain the motivation for the topic in general. Go through each chapter and explain how they contribute to your research question. - Check the thesis of Johannes John Carel Kuiper for a good example preface: \url{https://dspace.library.uu.nl/bitstream/handle/1874/90/full.pdf?sequence=2&isAllowed=y} -\end{preface} %---------------------------------------------------------------------------------------- -% THESIS CONTENT - CHAPTERS +% THESIS CONTENT - CHAPTERS %---------------------------------------------------------------------------------------- - \mainmatter % Begin numeric (1,2,3...) page numbering - \pagestyle{thesis} % Return the page headers back to the "thesis" style % Include the chapters of the thesis as separate files from the Chapters folder % Uncomment the lines as you write the chapters \include{Chapters/Chapter1} -%\include{Chapters/Chapter2} +\include{Chapters/Chapter2} %\include{Chapters/Chapter3} %\include{Chapters/Chapter4} %\include{Chapters/Chapter5} + %---------------------------------------------------------------------------------------- -% THESIS CONTENT - APPENDICES +% THESIS CONTENT - APPENDICES %---------------------------------------------------------------------------------------- - \appendix % Cue to tell LaTeX that the following "chapters" are Appendices % Include the appendices of the thesis as separate files from the Appendices folder % Uncomment the lines as you write the Appendices - \include{Appendices/AppendixA} -\include{Appendices/DeclarationOfOriginalityZHAW} % from https://www.zhaw.ch/en/lsfm/study/studiweb/master-ls/masters-thesis/ +% from https://www.zhaw.ch/en/lsfm/study/studiweb/master-ls/masters-thesis/ %\include{Appendices/AppendixB} %\include{Appendices/AppendixC} +\include{Appendices/DeclarationOfOriginalityZHAW} + %---------------------------------------------------------------------------------------- -% BIBLIOGRAPHY +% BIBLIOGRAPHY %---------------------------------------------------------------------------------------- - \printbibliography[heading=bibintoc] %---------------------------------------------------------------------------------------- diff --git a/preamble.tex b/preamble.tex new file mode 100644 index 0000000..bb305c7 --- /dev/null +++ b/preamble.tex @@ -0,0 +1,140 @@ +% !TEX root = main.tex + +%---------------------------- +% Fonts and characters +%---------------------------- + +% Support for special characters +\usepackage[utf8]{inputenc} % Specify input encoding +\usepackage[T1]{fontenc} % Specify font encoding + +% Set main fonts +% Fonts catalogue: https://tug.org/FontCatalogue/ +\usepackage{mathpazo} % Use the Palatino font by default +\usepackage{beramono} % Override the monospace/typewriter font + +% ZHAW title font +% Try to load Helvetica Rounded Bold, and OpenType font. +% Loading OTF or system fonts is possible with XeLaTeX. +% If the document is compiled using pdfLaTeX, resort +\usepackage{ifxetex} +\ifxetex + \usepackage{fontspec} + \newfontfamily\zhawtitlefont{Helvetica Rounded Bold} +\else + \newcommand{\zhawtitlefont}{\scshape} +\fi + +%\usepackage[scaled]{helvet} + +%---------------------------- +% Environments +%---------------------------- + +\usepackage{caption} % Customized caption +\usepackage{subcaption} % Subfigure captions +\usepackage{makecell} % Per-cell formatting in tables (\makecell) +\usepackage{pdfpages} % Required to include PDF files/graphics (\includepdf) + +\usepackage{todonotes} % Introduces the command \todo +\setlength{\marginparwidth}{2.5cm} % Adjust this if the todo notes are out of margins + +% Create boxes as follows: +% \begin{colorbox}{red}{2} +\usepackage{tcolorbox} +\newtcolorbox{textbox}[2]{ + arc=3pt, + boxrule=#2pt, + colback=#1!25!white, + width=\textwidth, + halign=left, + valign=center, + colframe=#1!75!black +} + +%---------------------------- +% Colors +%---------------------------- + +% Set up colors +\usepackage{xcolor} +% ZHAW Blue: Pantone 2945 U / R0 G100 B166 +\definecolor{zhawblue}{rgb}{0.00, 0.39, 0.65} +% Colors related to code listings +\definecolor{codegreen}{rgb}{0,0.6,0} +\definecolor{codegray}{rgb}{0.5,0.5,0.5} +\definecolor{codepurple}{rgb}{0.58,0,0.82} +\definecolor{codebackground}{rgb}{0.93,0.94,0.95} + +%---------------------------- +% Code listings +%---------------------------- + +% Setup code listings +\usepackage{listings} +\lstdefinestyle{mystyle}{ + backgroundcolor=\color{codebackground}, + commentstyle=\color{codegreen}, + keywordstyle=\color{magenta}, + numberstyle=\tiny\color{codegray}, + stringstyle=\color{codepurple}, + basicstyle=\ttfamily\footnotesize, + breakatwhitespace=false, + breaklines=true, +% captionpos=b, + keepspaces=true, + numbers=left, + numbersep=5pt, + showspaces=false, + showstringspaces=false, + showtabs=false, + tabsize=4 +} +\lstset{style=mystyle} + +% minted is an alternative code listing package. (See chapter 2) +% For it to run successfully, ensure the following: +% - the Python package Pygments. Install with the following command: +% python -m pip install Pygments +% - pdflatex (or xelatex) is executed with the flag --shell-escape +% If you are using a TEX editor, you can modify the typesetting +% command somewhere in the settings. +%\usepackage[outputdir=build]{minted} +%\usemintedstyle{xcode} +% For fancier coloring schemes, see here: +% https://tex.stackexchange.com/questions/585582 +% One could also create an own style in Pygments +% https://pygments.org/docs/styles/#creating-own-styles + +%---------------------------- +% References +%---------------------------- + +% Set up references +\usepackage[ + backend=biber, % Use biber backend (an external tool) + sorting=none, % Enumerates the reference in order of their appearance + style=numeric-comp % Choose here your preferred citation style +]{biblatex} +\addbibresource{example.bib} % The filename of the bibliography +\usepackage[autostyle=true]{csquotes} + % Required to generate language-dependent quotes + % in the bibliography + +%---------------------------------------------------------------------------------------- +% MARGIN SETTINGS +%---------------------------------------------------------------------------------------- + +\geometry{ + paper=a4paper, % Change to letterpaper for US letter + inner=2.5cm, % Inner margin + outer=3.8cm, % Outer margin + top=1.5cm, % Top margin + bottom=1.5cm, % Bottom margin + bindingoffset=.5cm, % Binding offset + %showframe, % Show the type block of the page +} +\setlength{\parskip}{1em} +\usepackage{enumitem} % Layout control for list environments (e.g, itemize) +%\setlist{noitemsep} % Suppress extra spaces between items +%\setlist{nosep} % Suppress spaces before/after list environments