\documentclass[12pt,twoside,DIV=calc,usegeometry,index=totoc]{scrbook}

%\usepackage{showframe} % to show the page layout

\usepackage[utf8]{inputenc}

\usepackage{titlesec}

\usepackage{xspace}
\usepackage{microtype}

\usepackage[main=english,french]{babel}

\usepackage{amssymb,amsmath,amsthm}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}

\usepackage{url}
\usepackage{graphicx}

\usepackage{caption}
\usepackage{subcaption}

\usepackage{enumitem}

\usepackage{hyperref}

% bold math
\usepackage{bm}

\usepackage{booktabs}

\usepackage{adjustbox}
\usepackage{array}


\usepackage{verbatim}

\usepackage{listings}

\usepackage{multicol}


% stuff like \ding for symbols
\usepackage{pifont}

\usepackage[
  natbib=true,
  style=alphabetic,
  backref=true,
  doi=false,
  isbn=false,
]{biblatex}
\addbibresource{ref.bib}

\usepackage{epsfig}
\usepackage{textpos}
\usepackage{ifthen}
\usepackage{makeidx}
\usepackage{babel}
\usepackage{float}
\usepackage{calc}
\usepackage{vmargin}
\usepackage{letterspace}
\usepackage[pass]{geometry}

\usepackage{eurosym}


\usepackage{bytefield}

\usepackage[binary-units,detect-weight=true,detect-family=true]{siunitx}

\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}

\usepackage{qrcode}

\usepackage{cryptocode}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{positioning}
\usetikzlibrary{calc}

\usepackage{mdframed}

\KOMAoption{titlepage}{firstiscover}
\KOMAoption{bibliography}{totocnumbered}

% Typography
\usepackage[sc,osf]{mathpazo}
\linespread{1.05}
\usepackage[scaled]{helvet} % ss
\usepackage{courier} % tt
\normalfont
\usepackage[T1]{fontenc}

\author{Florian Dold}
\title{The GNU Taler System: Practical and Provably Secure Electronic Payments}

\begin{document}

\frontmatter
\include{titlepage-rennes}
\include{abstract}
\include{abstract-french}
\include{acknowledgements}
\tableofcontents
\listoffigures
\mainmatter


\include{introduction}
\include{taler/design}
\include{taler/security}
\include{taler/implementation}
\graphicspath{{consensus/}}
\include{consensus/chap}
\graphicspath{{/}}
\include{conclusions}

\printbibliography[heading=bibintoc]

\appendix

% FIXME: include the proper french summary
\include{summary-french}

\chapter{draft-dold-payto}\label{appendix:payto}
{\small
\verbatiminput{draft-dold-payto.raw.txt}
}

\chapter{Coin Spending Simulation}\label{appendix:coinsim}
The most recent version of this TypeScript program can be found in the repository
of the wallet reference implementation (\url{https://git.taler.net/wallet-webex.git/tree/contrib/coinsim.ts}).

\lstinputlisting[basicstyle=\footnotesize]{coinsim.ts}

\chapter{Taler HTTP API Reference}\label{chap:taler-api-reference}
Available at \url{https://docs.taler.net/api/index.html}.  The API reference
will be included in the final print version of the manuscript.


\end{document}
