+++ /dev/null
-DOCS:=thesis
-GREP?=grep
-LATEX?=pdflatex
-BIBTEX?=bibtex
-BIBTEXFLAGS:=
-MAKEGL?=makeglossaries
-MAKEGLFLAGS?=
-MAKEIDX?=makeindex
-MAKEIDXFLAGS?=
-DOT?=dot
-DOTFLAGS?=-Tpng
-LATEXFLAGS:=-file-line-error -halt-on-error
-
-FIGURES:=$(patsubst fig/%.dot,img/%.png,$(wildcard fig/*.dot))
-LISTINGS:=$(wildcard listings/*)
-TEXS:=$(wildcard *.bib)
-BIBS:=$(wildcard *.tex)
-
-.PHONY: all clean
-.SECONDARY: $(DOCS:%=%.fmt) $(FIGURES)
-
-all: $(DOCS:%=%.pdf)
-
-%.fmt: %.pre
- $(LATEX) $(LATEXFLAGS) -ini -jobname="$(basename $<)" "&$(LATEX) $<\dump"
-
-%.pdf: %.mlog
- if grep -Fiq "Rerun" $<; then $(LATEX) $(LATEXFLAGS) $(basename $<); fi
-
-%.mlog: %.tex %.fmt $(BIBS) $(TEXS) $(FIGURES) $(LISTINGS)
- $(LATEX) $(LATEXFLAGS) $<
- if $(GREP) -q '^\\bibdata{' $(basename $<).aux; then $(BIBTEX) $(BIBTEXFLAGS) $(basename $<); fi
- if $(GREP) -q '\@istfilename' $(basename $<).aux; then $(MAKEGL) $(MAKEGLFLAGS) $(basename $<); fi
- if [ -f $(basename $<).idx ]; then $(MAKEIDX) $(MAKEIDXFLAGS) $(basename $<); fi
- $(LATEX) $(LATEXFLAGS) $< | tee $@
-
-img/%.png: fig/%.dot
- $(DOT) $(DOTFLAGS) $< > $@
-
-clean: $(DOCS:%=clean-%)
- $(RM) $(FIGURES)
-
-clean-%:
- $(RM) $(addprefix $(@:clean-%=%).,acn acr alg aux bbl blg idl idx ilg ind\
- fmt glg glo gls ist loa lof log lol lot mlog nav out pdf snm tdo toc)
recompile(){
for dep in $(deps "$1"); do
- [ "$dep" -nt "$2" ] && return 0
+ if [ "$dep" -nt "$2" ]; then
+ log "$dep is newer than $2, thus recompiling"
+ return 0
+ fi
done
return 1
}
preamble(){
pdflatex $LATEXFLAGS -ini -jobname="$2" "&pdflatex $1\dump"
+ ret=$?
rm -f $2.pdf
+ [ $ret -ne 0 ] && exit 1
}
compile(){
- pdflatex $LATEXFLAGS $1
- grep -q '^\\bibdata{' $1.aux && bibtex $1
- grep -q '\@istfilename' $1.aux && makeglossaries $1
- [ -f $1.idx ] && makeindex $1
+ pdflatex $LATEXFLAGS $1 || exit 1
+
+ if grep -q '^\\bibdata{' $1.aux
+ then bibtex $1 || exit 1
+ fi
+
+ if grep -q '\@istfilename' $1.aux
+ then makeglossaries $1 || exit 1
+ fi
+
+ if [ -f $1.idx ]
+ then makeindex $1 || exit 1
+ fi
+
tmpf=$(mktemp)
- trap RETURN rm -v $tmpf
- pdflatex $LATEXFLAGS $1 | tee $tmpf
- grep -Fiq "Rerun" $tmpf && pdflatex $LATEXFLAGS $1
+ pdflatex $LATEXFLAGS $1 | tee $tmpf || exit 1
+
+ if grep -Fiq "Rerun" $tmpf
+ then pdflatex $LATEXFLAGS $1 || exit 1
+ fi
+
rm -vf $tmpf
}
\documentclass{beamer}
-\usepackage[nodayofweek]{datetime}
+\usepackage{listings} % Source code
+\usepackage[nodayofweek]{datetime} % Use a fixed document date
+% Images directory
\graphicspath{{img/}}
+% Always have url in teletype
\urlstyle{tt}
-\author{Mart Lubbers BSc.\\
-{\small\href{mailto:mart@martlubbers.net}{mart@martlubbers.net}}\\
-~\\
-\textit{Supervisor:}\\
-prof.~dr.~dr.h.c.~ir.~M.J.~Plasmeijer\\[1em]
-\textit{Second reader:}\\
-dr.~P.W.M.~Koopman
+% Setup pdf parameters
+\hypersetup{%
+ pdftitle={Task Oriented Programming and the Internet of Things},
+ pdfauthor={Mart Lubbers},
+ pdfsubject={Task Oriented Programming and the Internet of Things},
+ pdfcreator={Mart Lubbers},
+ pdfproducer={Mart Lubbers},
+ pdfkeywords={TOP,iTasks,Clean,Function Programming,IoT}
+}
+% Clean language spec for listings
+\lstdefinelanguage{Clean}{%
+ alsoletter={ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_`1234567890},
+ alsoletter={~!@\#$\%^\&*-+=?<>:|\\.},
+ morekeywords={generic,implementation,definition,dynamic,module,import,from,where,in,of,case,let,infix,infixr,infixl,class,instance,with,if,derive,::},
+ sensitive=true,
+ morecomment=[l]{//},
+ morecomment=[n]{/*}{*/},
+ morestring=[b]",
+ morestring=[b]',
+ emptylines=1,
+ basewidth=0.45em,
+ columns=[c]fixed,
+ texcl=true,
+ upquote=true,
+ literate=%
+ % Basic Clean constructs
+ {\\}{{$\lambda\:$}}1
+ {A.}{{$\forall\;\,$}}1
+ {E.}{{$\exists\;\,$}}1
+ {*}{{$^*$}}1
+}
+
+% 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,
+ 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,
+ language=Clean
+}
+
+% Toc at every section
+\AtBeginSection[] {%
+ \begin{frame}
+ \frametitle{Table of Contents}
+ \tableofcontents[currentsection]
+ \end{frame}
+}
+
+\author[M. Lubbers]{
+ Mart Lubbers BSc.\\[1em]
+ \small
+ \textit{Supervisor:}\\
+ prof.~dr.~dr.h.c.~ir.~M.J.~Plasmeijer\\[1em]
+ \textit{Second reader:}\\
+ dr.~P.W.M.~Koopman
}
\title{Task Oriented Programming and the Internet of Things}
\subtitle{\sc Master's Thesis: Computing Science}
-\date{\formatdate{10}{7}{2017}}
+\institute[Radboud University]{Radboud University Nijmegen}
+\subject{Task Oriented Programming}
+\date[2017]{\formatdate{10}{7}{2017}}