X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=preamble.tex;h=3320aa33703391f0ff1c0616819cf2313d79c6d0;hb=8a2e750b77b5d35c7eb7a96c647b7e5e1fec943a;hp=f842e92845b11de9355f785344e6d42340dc04ab;hpb=eac6f8e9367bfe72d3886bf86132a04212a50428;p=phd-thesis.git diff --git a/preamble.tex b/preamble.tex index f842e92..3320aa3 100644 --- a/preamble.tex +++ b/preamble.tex @@ -1,3 +1,6 @@ +% Input encoding +\usepackage[utf8]{inputenc} + % Papersize \usepackage{geometry} \geometry{ @@ -12,7 +15,10 @@ } % Font encoding -\usepackage[T1]{fontenc} +\usepackage[T1,T2A]{fontenc} + +% standalone figures +\usepackage[subpreambles=true]{standalone} % Less bad boxes \usepackage{microtype} @@ -21,11 +27,12 @@ \usepackage{morewrites} % Internationalisation -\usepackage[british]{babel} +\usepackage[dutch,russian,british]{babel} +%\babelfont[russian]{rm}{Liberation Serif} % Appendices % TODO is this necessary? -\usepackage[titletoc]{appendix} +%\usepackage[titletoc]{appendix} % Hyperlinks %\usepackage[pagebackref]{hyperref} @@ -37,14 +44,20 @@ pdfsubject={}, % pdfcreator={}, % pdfproducer={}, - pdfkeywords={task oriented programming, functional programming, domain specific languages, internet of things}, + pdfkeywords={task-oriented programming, functional programming, domain specific languages, internet of things}, hidelinks, } +\urlstyle{same} +\usepackage{xmpincl} +\includexmp{CC_Attribution-NoDerivatives_4.0_International} % Graphics \usepackage{graphicx} % Images directory \graphicspath{{img/}} +%subfigures +\usepackage{caption} +\usepackage{subcaption} % Nice tables \usepackage{booktabs} @@ -56,23 +69,61 @@ \usepackage[nodayofweek]{datetime} % Code +\usepackage{stmaryrd} % Short arrow \usepackage{listings} % General listings settings \lstset{% + basewidth=0.45em, + basicstyle=\linespread{0.9}\tt\footnotesize, breakatwhitespace=false, breaklines=true, captionpos=b, + columns=[c]fixed, + commentstyle=\sl, + escapeinside={(+}{+)}, % chktex 9 + frame=L, keepspaces=true, - basicstyle=\ttfamily\fontseries{l}\footnotesize, - commentstyle=\slshape\fontseries{m}, - keywordstyle=\bfseries\fontseries{b}, - stringstyle=\ttfamily, + keywordstyle=\bf, + postbreak=\mbox{\textcolor{gray}{$\hookrightarrow$}\space}, showspaces=false, showstringspaces=false, showtabs=false, + stringstyle=\it, tabsize=4, - frame=L, +% literate=% +% {a0}{{a\textsubscript{0}}}2 +% {a1}{{a\textsubscript{1}}}2 +% {a2}{{a\textsubscript{2}}}2 +%% {an}{{a\textsubscript{n}}}2 +% {c0}{{c\textsubscript{0}}}2 +% {c1}{{c\textsubscript{1}}}2 +% {c2}{{c\textsubscript{2}}}2 +% {cn}{{c\textsubscript{n}}}2 +% {f0}{{f\textsubscript{0}}}2 +% {f1}{{f\textsubscript{1}}}2 +% {f2}{{f\textsubscript{2}}}2 +% {fn}{{f\textsubscript{n}}}2 +% {t0}{{t\textsubscript{0}}}2 +% {t1}{{t\textsubscript{1}}}2 +% {t2}{{t\textsubscript{2}}}2 +% {tn}{{t\textsubscript{n}}}2 +% {v0}{{v\textsubscript{0}}}2 +% {v1}{{v\textsubscript{1}}}2 +% {v2}{{v\textsubscript{2}}}2 +% {vn}{{v\textsubscript{n}}}2 +% {C0}{{C\textsubscript{0}}}2 +% {C1}{{C\textsubscript{1}}}2 +% {C2}{{C\textsubscript{2}}}2 +% {Cn}{{C\textsubscript{n}}}2 +% {R0}{{R\textsubscript{0}}}2 +% {R1}{{R\textsubscript{1}}}2 +% {R2}{{R\textsubscript{2}}}2 +% {Rn}{{R\textsubscript{n}}}2 } +\usepackage{lstlangclean} +\usepackage{lstlanghaskell} +\newcommand{\cleaninline}[1]{\lstinline[language=Clean,postbreak=]|#1|} +\newcommand{\haskellinline}[1]{\lstinline[language=Haskell,style=haskell,postbreak=]|#1|} % Fix list of listings title \renewcommand{\lstlistlistingname}{List of Listings} % Fix list of listings chapter separator @@ -83,6 +134,19 @@ \my@chapter} \makeatother +\lstnewenvironment{lstClean}[1][] + {% + \lstset{language=Clean, #1} + \renewcommand*{\lstlistingname}{Listing (Clean)} + } + {} +\lstnewenvironment{lstHaskell}[1][] + {% + \lstset{language=Haskell,style=haskell,#1}% + \renewcommand*{\lstlistingname}{Listing (Haskell)} + } + {} + % Glossaries and acronyms \usepackage[acronym,nonumberlist]{glossaries} % Fix gls in hyperlink errors @@ -101,8 +165,10 @@ \def\Acrfullpl#1{}% \def\gls#1{}% \def\glspl#1{}% + \def\glsentrytext#1{}% \def\Gls#1{}% \def\Glspl#1{}% + \def\Glsentrytext#1{}% \def\titlecap#1{}% } @@ -128,7 +194,7 @@ \setlist{noitemsep} \setlist[description]{leftmargin=\parindent} -% Epigraph (lovecraft) +% Epigraph \usepackage{epigraph} % Thumb marks on the page @@ -145,6 +211,12 @@ \usepackage{fancyhdr} \pagestyle{fancy} +% Tables spanning pages +\usepackage{longtable} + +% Easy references +\usepackage{cleveref} + % To patch the chapter command \usepackage{etoolbox} % Have better page numbering in chapters @@ -158,3 +230,16 @@ % Initialize the glossaries \makeglossaries% \input{glossaries} + +% Custom commands +\newcommand{\GHCmod}[1]{\texttt{#1}} +\newcommand{\requiresGHCmod}[1]{\footnote{Requires \GHCmod{#1} to be enabled.}} +\newcommand{\etc}{{\fontfamily{cmr}\selectfont{\itshape\/\&c}}} +\newcommand{\rdmentry}[6]{#1: #2 (#3): #4. #5.\ \href{https://doi.org/#6}{#6}} +\newcommand{\mlubbers}{Lubbers, M.\ (Radboud University)} +\newcommand{\pkoopman}{Koopman, dr.\ P.\ (Radboud University)} +\newcommand{\rplasmeijer}{Plasmeijer, prof.\ dr.\ ir.\ R.\ (Radboud University)} + +\bibliographystyle{alpha} + +\usepackage{subfiles}