diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..49523506eca6098ccfb0f3860848042431b2a2f6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text diff --git a/mlu-siegel-transparent.png b/mlu-siegel-transparent.png new file mode 100644 index 0000000000000000000000000000000000000000..4fe2b10b3502713e96a96d97bc7995dfe06d4ee4 --- /dev/null +++ b/mlu-siegel-transparent.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb52f397154714d00bffb2e7a8ca1d024e8234900c2769fb6427e1c889869a64 +size 100447 diff --git a/mluthesis.cls b/mluthesis.cls index 66b287be24f9e16926e54676f147f7e13689083e..ce6782bb9c3b51cf1006197bd07edd361257216b 100644 --- a/mluthesis.cls +++ b/mluthesis.cls @@ -8,7 +8,7 @@ \ProvidesClass{mluthesis}[2020/04/20 v1.0] % Load base class (scrbook). -\LoadClass[a4paper,12pt,oneside,bibliography=totoc,chapterprefix=true,appendixprefix=true]{scrbook} +\LoadClass[a4paper,12pt,oneside,bibliography=nottotoc,chapterprefix=true,appendixprefix=true]{scrbook} % Encoding: \RequirePackage[utf8]{inputenc} @@ -19,18 +19,6 @@ \RequirePackage{xifthen} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Options -\newcommand{\thesistype}{} -\DeclareOption{bachelor}{% -\renewcommand{\thesistype}{Bachelor}% -} -\DeclareOption{master}{% -\renewcommand{\thesistype}{Master}% -} -\ExecuteOptions{bachelor} % default - -\ProcessOptions - % Font \RequirePackage{libertine} \RequirePackage{sourcecodepro} @@ -69,12 +57,19 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Variables +\newtoks\thesistype +\newcommand{\ThesisSetType}[1]{\global\thesistype{#1}} + \newtoks\thesistitle \newcommand{\ThesisSetTitle}[1]{\global\thesistitle{#1}} \newtoks\thesisauthor \newcommand{\ThesisSetAuthor}[1]{\global\thesisauthor{#1}} +% We can directly set the token register which is properly declared later, since the +% class's initialization happens before the document's override is called. +\newcommand{\ThesisOverrideSupervisorLabel}[1]{\global\thesisfrontpagesupervisor{#1}} + \newtoks\thesissupervisors \newcommand{\ThesisSetSupervisors}[1]{\global\thesissupervisors{#1}} @@ -154,7 +149,7 @@ \newtoks\thesisdeclarationtext \newtoks\thesisfrontmatterkeywords \global\thesisfrontpagecourse{Degree Programme } -\global\thesisfrontpagetypename{\thesistype's Thesis} +\global\thesisfrontpagetypename{\the\thesistype's Thesis} \global\thesisfrontpagestudentnumber{Matriculation Number} \global\thesisfrontpageborn{Born \the\thesisauthordateofbirth{} in \the\thesisauthorplaceofbirth} \global\thesisfrontpagesupervisor{Referee} @@ -168,7 +163,7 @@ \global\thesisfrontmatterkeywords{Keywords} \IfGerman{% \global\thesisfrontpagecourse{Studiengang } - \global\thesisfrontpagetypename{\thesistype arbeit} + \global\thesisfrontpagetypename{\the\thesistype arbeit} \global\thesisfrontpagestudentnumber{Matrikelnummer} \global\thesisfrontpageborn{geb.\ am:\ \the\thesisauthordateofbirth{} in % \the\thesisauthorplaceofbirth} @@ -181,12 +176,19 @@ \global\thesisfrontmatterkeywords{Schl\"usselworte} }{} +\RequirePackage{xstring} +\newcommand*{\commalength}[1]{% + \StrCount{#1,}{,}% +} + % Frontpage \newcounter{supervisors} +\newcounter{supervisorsPrecount} \newcommand{\printsupervisor}[1]{% \ifthenelse{\value{supervisors}=0}{}{\\}% \addtocounter{supervisors}{1}% - \arabic{supervisors}. \the\thesisfrontpagesupervisor: + \ifthenelse{\value{supervisorsPrecount}=1}{}{\arabic{supervisors}.} + \the\thesisfrontpagesupervisor: #1 } \renewcommand{\maketitle}{ @@ -216,6 +218,7 @@ \vspace{1em} \makeatletter% + \@for \name:=\the\thesissupervisors\do{\stepcounter{supervisorsPrecount}}% \@for \name:=\the\thesissupervisors\do{\printsupervisor{\name}}% \makeatother% @@ -271,7 +274,7 @@ % Pass default options to hyperref class, if loaded. \newcommand{\hyperoptions}{ colorlinks=false, - pageanchor=false + pageanchor=true } \newcommand{\hyperpdfoptions}{ pdftex, diff --git a/sample.bib b/sample.bib new file mode 100644 index 0000000000000000000000000000000000000000..b4c36adcc06fc8cf7a39f2c4d9573ddaae2d0aa4 --- /dev/null +++ b/sample.bib @@ -0,0 +1,29 @@ +% stolen from https://latex-tutorial.com/tutorials/bibtex/ + +@article{ARTICLE:1, + AUTHOR = "John Doe", + TITLE = "Title", + JOURNAL = "Journal", + YEAR = "2017", +} +@book{DUMMY:1, + AUTHOR = "John Doe", + TITLE = "The Book without Title", + PUBLISHER = "Dummy Publisher", + YEAR = "2100", +} +@inbook{BOOK:2, + AUTHOR = "John Doe", + TITLE = "The Book without Title", + PUBLISHER = "Dummy Publisher", + YEAR = "2100", + PAGES = "100-200", +} +@misc{WEBSITE:1, + HOWPUBLISHED = "\url{http://example.com}", + AUTHOR = "Intel", + TITLE = "Example Website", + MONTH = "Dec", + YEAR = "1988", + NOTE = "Accessed on 2012-11-11", +} diff --git a/sample.pdf b/sample.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0981de6e4d79349a714c86f7c39b787af82d2d68 --- /dev/null +++ b/sample.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67be6396d7b3954a0008988048b7397808fef35f0d5ea0135a310112427e7aed +size 532190 diff --git a/sample.tex b/sample.tex new file mode 100644 index 0000000000000000000000000000000000000000..9d703e4caf2bb5578ec4a703ad29bd07677d46c2 --- /dev/null +++ b/sample.tex @@ -0,0 +1,81 @@ +\documentclass[english]{mluthesis} % Supported languages: english, german + +\usepackage{amsmath} +\usepackage{csquotes} +\MakeOuterQuote{"} +\usepackage{graphicx} +\usepackage{hyperref} + +\usepackage{biblatex} +\addbibresource{sample.bib} +\usepackage{doi} + +\usepackage{lipsum} % for lorem ipsum sample text + +%%%%% DOKUMENTINFO %%%%% +\ThesisSetType{Bachelor} % Bachelor, Master, Seminar, ... +\ThesisSetTitle{Why mluthesis is the last thesis you'll need} +\ThesisSetAuthor{Sam Student} +\ThesisSetSubmissionDate{14}{03}{2100} % DD-MM-YYYY +\ThesisSetLocation{Halle (Saale)} +\ThesisSetStudentNumber{12345678} +\ThesisSetDateOfBirth{01}{01}{2000} % DD-MM-YYYY +\ThesisSetPlaceOfBirth{Musterstadt} +\ThesisSetUniversity{Martin-Luther-Universität Halle-Wittenberg} +\ThesisSetFaculty{Naturwissenschaftliche Fakultät III: Institut für Informatik} +\ThesisSetCourseName{Computer Science} + +% You can override your language's default label for supervisors. +% e.g. for a Seminar thesis, put "Betreuer" instead of "Gutachter" in german. +% \ThesisOverrideSupervisorLabel{Adviser} + +% This is a list, seperated with commata. +% If you only put one entry, the numbers will be omitted. +\ThesisSetSupervisors{{Prof. McProfessorface},{Dr. Noonien Soong}} + +% This puts the MLU sigil on the title page. +\ThesisSetLogo{\includegraphics[width=\linewidth]{mlu-siegel-transparent.png}} + +\begin{document} +\maketitle + +\pagebreak +\tableofcontents + +\pagebreak +\chapter*{Abstract} +\lipsum[2-3] + +\chapter{Introduction} +\lipsum[5-7] + +\chapter{Background} +\lipsum[7-8] + +\chapter{Method of Comparison} +\lipsum[5-7] + +\chapter{Comparison} +\lipsum[13-15] + +\chapter{Discussion} +\lipsum[5-6] + +\section{Results} +\lipsum[5-6] + +\section{Threats To Validity} +\lipsum[4-5] + +\chapter{Conclusion and Further Research Questions} +\lipsum[7-10] + +\chapter{Related Work} +\lipsum[5-7] + +\nocite{*} +\printbibliography + +\declaration + +\end{document}