\documentclass[a4paper,11pt,bibliography=totoc,twoside]{scrbook}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ae}
\usepackage[ngerman,english]{babel}
\usepackage{makeidx}%,showidx}
% evil hack to enable command expansion in \index
% \makeatletter
% \def\makeindex{%
%   \newwrite\@indexfile
%   \immediate\openout\@indexfile=\jobname.idx
%   \def\index{\@bsphack\begingroup
%               \@sanitize
%               \@wrindex} \typeout
%     {Writing custom index file \jobname.idx}%
%   \let\makeindex\@empty
% }
% \def\@wrindex#1{%
%   \edef\@wrindex@params{#1}%
%   \protected@write\@indexfile{}%
%     {\string\indexentry{\@wrindex@params}{\thepage}}%
%   \endgroup\@esphack}
% \def\T1{\@empty} % someone needs this... don't know why
% \let\@origindex\index
% \renewcommand{\index}[1]{\expandafter\@origindex{#1}}
% \def\index#1{\expandafter\@datrueindex{#1}\typeout{new index used}}
% \makeatother
\usepackage{hyperref,color,url,acronym,graphicx,amsfonts,amsmath}
\usepackage{sidecap}
\usepackage{todonotes}
\usepackage{enumitem}

\makeindex

%\newcommand{\todo}[1]{\textcolor{red}{\index{Todo}\LARGE TODO:~#1}}
\newcommand{\definition}[1]{\textit{#1}\index{#1}}
\newcommand{\cmd}[1]{\texttt{#1}\index{#1 (command)}}
\newcommand{\prog}[1]{\texttt{#1}\index{#1 (program)}}
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\class}[1]{\code{#1}\index{#1 (class)}}
\newcommand{\file}[1]{\texttt{#1}\index{#1 (file)}}
\newcommand{\filepath}[1]{\texttt{#1}}
\newcommand{\magicvalue}[1]{\code{#1}}
\newcommand{\opcode}[1]{\ac{opcode} \magicvalue{#1}}

% ignore output, but evaluate command with side-effects
\newsavebox{\trashbox}
\newcommand{\ignoreoutput}[1]{\setbox\trashbox\vbox{#1}}

\author{Roland Hieber}
\title{Error modeling of an autonomous, mobile robot}
% \date{July 9, 2011}

\makeatletter
\hypersetup{
  colorlinks=false, % FIXME turn of for printing
  pdftitle={\@title},
  pdfauthor={\@author},
  pdfcreator={\@author}
}

\begin{document}
\pagenumbering{roman}

\begin{titlepage}
  \vskip 60pt
  \begin{center}
    {\large Braunschweig University of Technology}\\
    {\large Institute of Operating Systems and Computer Networks}\\[2cm]
    {\large Bachelor Thesis}\\[2cm]
    {\LARGE \@title \par}
    \vskip 6em
    {\large by}\\[.5em]
    {\large \@author}\\[7em]
    {\large \bf Thesis Advisor:}\\[.5em]
    {\large Prof. Dr. S\'andor Fekete}\\
    \par
    \vfill
    {\large Braunschweig - \today}
  \end{center}
  \makeatother
%   \par
  % thanks?
\end{titlepage}
\cleardoublepage

\selectlanguage{ngerman}
\vspace*{7cm}
\centerline{\bf Erklärung}
\vspace*{1cm}
Ich versichere, die vorliegende Arbeit selbstständig und nur unter Benutzung
der angegebenen Hilfsmittel angefertigt zu haben.

\vspace*{3cm}
Braunschweig, den \today

\selectlanguage{english}
\pagestyle{headings}
\cleardoublepage

% \begin{abstract}
  \todo{abstract!!!}
% \end{abstract}

\cleardoublepage
\pagenumbering{arabic}
\pagestyle{headings}

\tableofcontents
\cleardoublepage
\listoffigures
\cleardoublepage
% \listoftables
% \cleardoublepage

\input{acronyms}
\cleardoublepage

% chapters
\input{introduction}
\input{preliminaries}
\input{experiment1}
\input{experiment2}
\input{experiment3}
\input{conclusion}
\input{implementation}

\addcontentsline{toc}{chapter}{Index}
\printindex

\bibliographystyle{alpha}
\bibliography{biblio}
\nocite{hacking-roomba}

\end{document}
