Initial commit
authorMart Lubbers <mart@martlubbers.net>
Thu, 12 Apr 2018 13:52:06 +0000 (15:52 +0200)
committerMart Lubbers <mart@martlubbers.net>
Thu, 12 Apr 2018 13:52:06 +0000 (15:52 +0200)
.gitignore [new file with mode: 0644]
Makefile [new file with mode: 0644]
abstract.tex [new file with mode: 0644]
acknowledgements.tex [new file with mode: 0644]
example.tex [new file with mode: 0644]
glossaries.tex [new file with mode: 0644]
preamble.tex [new file with mode: 0644]
thesis.bib [new file with mode: 0644]
thesis.tex [new file with mode: 0644]
titlepage.tex [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..a31ecb0
--- /dev/null
@@ -0,0 +1,26 @@
+*.acn
+*.acr
+*.alg
+*.aux
+*.bbl
+*.blg
+*.fmt
+*.glg
+*.glo
+*.gls
+*.idx
+*.ilg
+*.ind
+*.ist
+*.loa
+*.lof
+*.log
+*.lol
+*.lot
+*.nav
+*.out
+*.pdf
+*.snm
+*.tdo
+*.toc
+*.vrb
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..7867780
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+DOCUMENT:=thesis
+
+LATEX?=pdflatex --no-shell-escape -file-line-error -halt-on-error
+BIBTEX?=bibtex
+MAKEGLOSSARIES?=makeglossaries
+MAKEINDEX?=makeindex
+
+all: $(DOCUMENT).pdf
+
+%.pdf: %.tex $(wildcard *.tex)
+       $(LATEX) $*
+       grep -q '^\\bibdata{' $*.aux && $(BIBTEX) $* || true
+       grep -q '\@istfilename' $*.aux && $(MAKEGLOSSARIES) $* || true
+       [ -f $*.idx ] && $(MAKEINDEX) $* || true
+       $(LATEX) $*
+       $(LATEX) $*
+
+clean:
+       $(RM) $(addprefix $(DOCUMENT).,acn acr alg aux bbl blg fmt glg glo gls idx ilg ind ist loa lof log lol lot nav out pdf snm tdo toc vrb)
diff --git a/abstract.tex b/abstract.tex
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/acknowledgements.tex b/acknowledgements.tex
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/example.tex b/example.tex
new file mode 100644 (file)
index 0000000..b1a1ffb
--- /dev/null
@@ -0,0 +1,7 @@
+Index: indexTest\index{indexTest}.
+
+Glossary: \gls{glossaryTest}.
+
+Acronym: \gls{acronymTest} and \gls{acronymTest}.
+
+Cite: cite~\cite{citeTest}.
diff --git a/glossaries.tex b/glossaries.tex
new file mode 100644 (file)
index 0000000..424c665
--- /dev/null
@@ -0,0 +1,8 @@
+% Acronyms
+\newacronym{acronymTest}{ACR}{Acronym}
+
+% Glossaries
+\newglossaryentry{glossaryTest}{%
+       name=test,
+       description={is a test glossary.},
+}
diff --git a/preamble.tex b/preamble.tex
new file mode 100644 (file)
index 0000000..303c89d
--- /dev/null
@@ -0,0 +1,92 @@
+\usepackage{geometry}                         % Papersize
+\usepackage[british]{babel}                   % Internationalization
+\usepackage[titletoc]{appendix}               % Appendices
+\usepackage[hidelinks]{hyperref}              % Hyperlinks
+\usepackage{graphicx}                         % Graphics
+\usepackage{booktabs}                         % Better looking tables
+\usepackage{etoolbox}                         % Patch chapter command
+\usepackage[nodayofweek]{datetime}            % Use a fixed document date
+\usepackage{listings}                         % Code
+\usepackage[acronym,nonumberlist]{glossaries} % Glossaries and acronyms
+\usepackage[algochapter]{algorithm2e}         % Pseudocode
+\usepackage{makeidx}                          % Index
+
+% Have better page numbering in chapters
+\patchcmd{\chapter}{plain}{headings}{}{}
+
+% Images directory
+\graphicspath{{img/}}
+
+% Fix list of listings title
+\renewcommand{\lstlistlistingname}{List of Listings}
+
+% Fix list of listings chapter separator
+\makeatletter
+\let\my@chapter\@chapter%
+\renewcommand*{\@chapter}{%
+  \addtocontents{lol}{\protect\addvspace{10pt}}%
+  \my@chapter}
+\makeatother
+
+% Always have url in teletype
+\urlstyle{tt}
+
+% Setup pdf parameters
+\hypersetup{%
+       pdftitle={},
+       pdfauthor={},
+       pdfsubject={},
+       pdfcreator={},
+       pdfproducer={},
+       pdfkeywords={},
+}
+
+% Fix gls in hyperlink errors
+\pdfstringdefDisableCommands{%
+       \def\acrlong#1{}%
+       \def\acrlongpl#1{}%
+       \def\acrshort#1{}%
+       \def\acrshortpl#1{}%
+       \def\acrfull#1{}%
+       \def\acrfullpl#1{}%
+       \def\Acrlong#1{}%
+       \def\Acrlongpl#1{}%
+       \def\Acrshort#1{}%
+       \def\Acrshortpl#1{}%
+       \def\Acrfull#1{}%
+       \def\Acrfullpl#1{}%
+       \def\gls#1{}%
+       \def\glspl#1{}%
+       \def\Gls#1{}%
+       \def\Glspl#1{}%
+}
+
+% General listings settings
+\lstset{%
+       breakatwhitespace=false,
+       breaklines=true,
+       captionpos=b,
+       keepspaces=true,
+       basicstyle=\ttfamily\fontseries{l}\footnotesize,
+       commentstyle=\slshape\fontseries{m},
+       keywordstyle=\bfseries\fontseries{b},
+       stringstyle=\ttfamily,
+       showspaces=false,
+       showstringspaces=false,
+       showtabs=false,
+       tabsize=4,
+       frame=L,
+}
+
+% Increase the depth for the table of contenst
+\setcounter{secnumdepth}{3}
+
+% Fix the algorithm font
+\renewcommand\AlCapFnt{\normalfont}
+
+% Initialize the glossaries
+\makeglossaries%
+\input{glossaries}
+
+% Enable the index
+\makeindex%
diff --git a/thesis.bib b/thesis.bib
new file mode 100644 (file)
index 0000000..1145a9e
--- /dev/null
@@ -0,0 +1,5 @@
+@article{citeTest,
+  title={Test citation},
+  author={Some Author},
+  year={2015},
+}
diff --git a/thesis.tex b/thesis.tex
new file mode 100644 (file)
index 0000000..1c60e5e
--- /dev/null
@@ -0,0 +1,85 @@
+\documentclass[b5paper]{book}
+
+\input{preamble}
+
+% Document info
+\title{Some title}
+\author{Some author\\
+       {\small\href{mailto:mail@example.com}{mail@example.com}}}
+
+% If you want to fix the date: \formatdate{10}{7}{2017}}
+\date{\today}
+
+\begin{document}
+\frontmatter{}
+
+%Titlepage
+\input{titlepage}
+
+%Abstract
+\chapter*{\centering Abstract}%
+\label{chp:abstract}
+\addcontentsline{toc}{chapter}{Abstract}
+\begin{quotation}
+       \centering\noindent
+       \input{abstract}
+\end{quotation}
+
+%Acknowledgements
+\chapter*{\centering Acknowledgements}%
+\label{chp:acknowledgements}
+\addcontentsline{toc}{chapter}{Acknowledgements}
+\begin{quotation}
+       \centering\it\noindent
+       \input{acknowledgements}
+\end{quotation}
+
+% Table of contents
+\tableofcontents
+
+% Reset glossary and thus the acronyms
+\glsresetall{}
+
+% The actual document
+\mainmatter{}
+
+\chapter{Example}%
+\label{chp:example}
+\input{example}
+
+% Start appendix
+\appendix%
+\label{chp:appendix}
+
+% Bibliography
+\phantomsection{}%
+\label{chp:bibliography}
+\addcontentsline{toc}{chapter}{Bibliography}
+\bibliographystyle{plain}
+\bibliography{thesis}
+
+% Glossary
+\addcontentsline{toc}{chapter}{Glossary}%
+\label{chp:glossaries}
+\printglossaries%
+
+% Index
+\addcontentsline{toc}{chapter}{Index}%
+\label{chp:index}
+\printindex
+
+% Lists of
+\cleardoublepage{}
+\phantomsection{}%
+\label{chp:listsof...}
+\addcontentsline{toc}{chapter}{Lists of \ldots}
+\begingroup
+\let\clearpage\relax
+\let\cleardoublepage\relax
+\listoffigures%
+\listoftables%
+\listofalgorithms%
+\lstlistoflistings%
+\endgroup
+
+\end{document}
diff --git a/titlepage.tex b/titlepage.tex
new file mode 100644 (file)
index 0000000..2a8b21e
--- /dev/null
@@ -0,0 +1 @@
+\maketitle