clean up and fix lstlistoflistings indentation
authorMart Lubbers <mart@martlubbers.net>
Mon, 3 Jul 2017 16:32:04 +0000 (18:32 +0200)
committerMart Lubbers <mart@martlubbers.net>
Mon, 3 Jul 2017 16:32:04 +0000 (18:32 +0200)
thesis.pre
thesis.tex

index 1b2af12..3272810 100644 (file)
@@ -1,6 +1,5 @@
 \documentclass[twoside,a4paper,titlepage]{book}
 
-
 \usepackage{geometry}                % Papersize
 \usepackage[british]{babel}          % Internationalization
 \usepackage[titletoc]{appendix}      % Appendices
 \usepackage{epstopdf}                % Eps graphics
 \usepackage{etoolbox}                % Patch chapter command
 
+% Have better page numbering in chapters
 \patchcmd{\chapter}{plain}{headings}{}{}
 
+% Arrows for communication diagrams
 \usetikzlibrary{arrows,shadows}
 
+% 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={Task Oriented Programming and the Internet of Things},
        pdfauthor={Mart Lubbers},
@@ -34,6 +50,7 @@
        hidelinks=true
 }
 
+% Fix gls in hyperlink errors
 \pdfstringdefDisableCommands{%
        \def\acrlong#1{}%
        \def\acrlongpl#1{}%
@@ -45,6 +62,7 @@
        \def\Glspl#1{}%
 }
 
+% Clean language spec for listings
 \lstdefinelanguage{Clean}{%
        alsoletter={ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_`1234567890},
        alsoletter={~!@\#$\%^\&*-+=?<>:|\\.},
                {A.}{{$\forall\;\,$}}1
                {E.}{{$\exists\;\,$}}1
                {*}{{$^*$}}1
-%              {>}{{$>$}}1
-%              {<}{{$<$}}1
-%              {<=}{{$\leq$}}1
-%              {>=}{{$\geq$}}1
-%              {<>}{{$\neq$}}1
-%              {->}{{$\rightarrow$}}2
-%              {<-}{{$\leftarrow$}}1
-%              {=}{{$=$}}1
-%              {~}{{$\sim$}}1
-%              {\#}{{$\sharp$}}1
-%              {\{|}{{$\{\!|\!$}}1
-%              {|\}}{{$\!|\!\}$}}1
-%              {:=}{{$:=$}}2
-%              {==}{{$==$}}2
-%              {++}{{$+\!\!+$}}2
-%              {+++}{{$+\!\!\!\!+\!\!\!\!+$}}2
-%              {:==}{{$:==$}}3
-%              {\{|*|\}}{{$\{\!|\!\!\star\!\!|\!\}$}}3
-               %
-               % Basic iTask constructs
-%              {>||>}{{$\triangleright\triangleright$}}2
-%              {>>=}{{\texttt{>>=}}}3
-%              {>>|}{{\texttt{>>|}}}3
-%              {?>>}{{\texttt{?>>}}}3
-%              {!>>}{{\texttt{!>>}}}3
-%              {-||-}{{\texttt{-||-}}}4
-%              {.||.}{{\texttt{.||.}}}4
-%              {.&&.}{{\texttt{.\&\&.}}}4
 }
 
+% Handy shortcut for inline Clean code
 \newcommand{\CI}[1]{\lstinline[language=Clean,basicstyle=\ttfamily\fontseries{l}\normalsize]|#1|}
 
+% General listings settings
 \lstset{%
        breakatwhitespace=false,
        breaklines=true,
        language=Clean
 }
 
+% Increase the depth for the table of contenst
 \setcounter{secnumdepth}{3}
 
+% Document info
 \title{Task Oriented Programming and the Internet of Things}
 \author{Mart Lubbers BSc.\\
        {\small\href{mailto:mart@martlubbers.net}{mart@martlubbers.net}}}
index 6a6895f..63d3f92 100644 (file)
@@ -1,8 +1,11 @@
 %&thesis
 \usepackage[nonumberlist]{glossaries}  % Glossaries and acronyms
 \usepackage[algochapter]{algorithm2e}             % Pseudocode
+
+% Fix the algorithm font
 \renewcommand\AlCapFnt{\normalfont}
 
+% Initialize the glossaries
 \makeglossaries%
 \input{glossaries}
 
@@ -12,8 +15,6 @@
 %Titlepage
 \input{titlepage}
 
-\glsaddall{}
-
 %Abstract
 \chapter*{\centering Abstract}
 \addcontentsline{toc}{chapter}{Abstract}
@@ -22,6 +23,7 @@
        \input{abstract}
 \end{quotation}
 
+%Acknowledgements
 \chapter*{\centering Acknowledgements}
 \addcontentsline{toc}{chapter}{Acknowledgements}
 \begin{quotation}
 \end{quotation}
 
 %Table of contents
-%\begingroup
-%\let\cleardoublepage\clearpage
 \tableofcontents
-%\endgroup
 
 \mainmatter{}
+
+%Reset glossary and thus the acronyms
 \glsresetall{}
+
 \chapter{Introduction}\label{chp:introduction}
 \input{intro}
 
@@ -62,7 +64,8 @@
 \chapter{Discussion \& Conclusion}\label{chp:conclusion}
 \input{conclusion}
 
-\appendix\label{chp:appendix}
+\appendix%
+\label{chp:appendix}
 
 \chapter{Communication Protocol}\label{app:communication-protocol}
 \input{appendix-protocol}
 \chapter{Device Client Interface}\label{app:device-interface}
 \input{appendix-device-interface}
 
+% Bibliography
 \phantomsection{}
 \addcontentsline{toc}{chapter}{Bibliography}
 \bibliographystyle{ieeetr}
 \bibliography{thesis}
 
+% Glossary
 \addcontentsline{toc}{chapter}{Glossary}
 \printglossaries%
 
+% Lists of
 \cleardoublepage{}
 \phantomsection{}
 \addcontentsline{toc}{chapter}{Lists of \ldots}
@@ -86,8 +92,8 @@
 \let\cleardoublepage\relax
 \listoffigures%
 \listoftables%
-\lstlistoflistings%
 \listofalgorithms%
+\lstlistoflistings%
 \endgroup
 
 \end{document}