\documentclass[twoside,a4paper,titlepage]{book}
-
\usepackage{geometry} % Papersize
\usepackage[british]{babel} % Internationalization
\usepackage[titletoc]{appendix} % Appendices
\usepackage{graphicx} % Graphics
\usepackage{epstopdf} % Eps graphics
\usepackage{etoolbox} % Patch chapter command
+\usepackage[nodayofweek]{datetime} % Use a fixed document date
+
+% Fix fonts
+\normalfont
+\DeclareFontShape{OT1}{lmr}{bx}{sc} { <-> ssub * lmr/bx/n }{}
+% 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},
hidelinks=true
}
+% Fix gls in hyperlink errors
\pdfstringdefDisableCommands{%
\def\acrlong#1{}%
\def\acrlongpl#1{}%
\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,
captionpos=b,
keepspaces=true,
basicstyle=\ttfamily\fontseries{l}\footnotesize,
- commentstyle=\itshape\fontseries{m},
+ commentstyle=\slshape\fontseries{m},
keywordstyle=\bfseries\fontseries{b},
stringstyle=\ttfamily,
showspaces=false,
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}}}
-\date{\today}
+\date{\formatdate{10}{7}{2017}}