From: Mart Lubbers Date: Mon, 3 Jul 2017 16:32:04 +0000 (+0200) Subject: clean up and fix lstlistoflistings indentation X-Git-Tag: hand-in~2 X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=a5e7727b619f6b1f5c123f6ebb3e7fcce2b1f731;p=msc-thesis1617.git clean up and fix lstlistoflistings indentation --- diff --git a/thesis.pre b/thesis.pre index 1b2af12..3272810 100644 --- a/thesis.pre +++ b/thesis.pre @@ -1,6 +1,5 @@ \documentclass[twoside,a4paper,titlepage]{book} - \usepackage{geometry} % Papersize \usepackage[british]{babel} % Internationalization \usepackage[titletoc]{appendix} % Appendices @@ -17,13 +16,30 @@ \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={~!@\#$\%^\&*-+=?<>:|\\.}, @@ -65,38 +83,12 @@ {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, @@ -114,8 +106,10 @@ 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}}} diff --git a/thesis.tex b/thesis.tex index 6a6895f..63d3f92 100644 --- a/thesis.tex +++ b/thesis.tex @@ -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} @@ -30,13 +32,13 @@ \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} @@ -70,14 +73,17 @@ \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}