\documentclass[12pt]{book}

\input{header}

\newcommand{\includechapter}[1]{%
  \graphicspath{{#1/lecture/}{#1/lecture/figures/}{#1/images/}}%
  \setcodepath{#1/code}%
  \renewcommand{\texinputpath}{#1/lecture/}%
  \include{#1/lecture/#1}%
}

%\includeonly{regression/lecture/regression}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document} 

\selectlanguage{english}

\hypersetup{pageanchor=false}
\maketitle
\hypersetup{pageanchor=true}

\frontmatter

\clearpage
\tableofcontents

\clearpage
\listoffigures

\clearpage
\lstlistoflistings

\clearpage
\listofexercisefs

\clearpage
\listofiboxfs


\mainmatter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\part{Programming basics}

\includechapter{programming}

\includechapter{debugging}

\includechapter{plotting}

\includechapter{codestyle}

\includechapter{designpattern}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\part{Data analysis}

% add chapter on simulations (draw random numbers, draw random functions, euler forward, odeint)
% !!! this would be a nice and simple starter !!!
% introduces derivatives which are also needed for fitting
%\includechapter{simulations}

\includechapter{statistics}

% add chapter on statistical tests

\includechapter{bootstrap}

\includechapter{regression}

\includechapter{likelihood}

% add chapter on generalized linear models (versus ANOVA)

% add chapter on nonlinear fitting (methods, initial values, local minima, power law fits on log-log data)

\includechapter{pointprocesses}

% add chapter on time series (amplitude distribution, autocorrelation, crosscorrelation)
%\includechapter{spectral}

% add chapter on filtering and envelopes

% add chapter on event detection, signal detection, ROC

% add chapter on mutual information

% add chapters on linear algebra, PCA, clustering

% add chapter on simple machine learning

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\part{Tools}
% Latex
% markdown, html
% Makefile
% version control (git and github) only put source files into repository!
% distributed computing (ssh and grid engines)
% data handling (structure, storage (rsync), backup, data bases)
% data annotation, meta data

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
\addtocontents{toc}{\setcounter{tocdepth}{0}}

%\chapter{Cheat-Sheet}

%%%% solutions: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\printallsolutions

%%%% indices: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\backmatter

\printindex[enterm]

\selectlanguage{ngerman}
\printindex[determ]
\selectlanguage{english}

%\setindexprenote{Some explanations.}
%\printindex[pcode]
\printindex[mcode]

\end{document}