\documentclass[11pt,a4paper,headinclude,footinclude,DIV16]{scrreprt}
\usepackage[usenames,dvipsnames,table]{xcolor} % include at beginning because of compitibility issues
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[automark]{scrpage2}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{enumerate}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{mhchem}

\usepackage{listings}
\usepackage[square,numbers]{natbib}
\usepackage{pdflscape}
\usepackage{rotating}
\usepackage{subfig}
\usepackage{tabularx}
\usepackage{theorem}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usepackage{units}
\usepackage{url}
\usepackage{xspace}
\usepackage{accsupp}
\hypersetup{bookmarksdepth=3}
\usetikzlibrary{arrows}
\usetikzlibrary{backgrounds}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{fit}
\usetikzlibrary{patterns}
\usetikzlibrary{positioning}
\usetikzlibrary{shapes}
\usetikzlibrary{trees}
\include{0_listingstyle}

\DeclareGraphicsExtensions{.pdf, .jpg}

% Dune and Dumux logo
\newcommand{\Dune}{{DUNE}\xspace}
\newcommand{\Dumux}{\texorpdfstring{Du\-Mu$^\text{x}$\xspace}{DuMuX\xspace}}
\newcommand{\DumuxVersion}{3.3}
\definecolor{dumuxYellow}{HTML}{E19417}
\definecolor{dumuxBlue}{HTML}{0C73CF}

% sytles
\newcommand{\nextline}{\par\phantom{a}\vspace*{0.1\textwidth}}
\newcommand{\snakeline}{\uwave{\mbox{}}}
\DeclareRobustCommand\Cplusplus{\texorpdfstring{C\nolinebreak[4]\hspace{-.05em}\raisebox{.4ex}{\tiny\bfseries ++}\xspace}{C++}}

% notation
\newcommand{\porosity}{\phi}
\newcommand{\saturation}{S}

% a new counter you can give a label to it and thus reference it
% syntax: \numberThis{printedTextToBeLabeled}{label}
% if you wanted a \newline after a numbered thing, you could just add a empty line after ``\label{#2}''
\newcounter{thingCounter}
\renewcommand{\thethingCounter}{\arabic{thingCounter}}
\newcommand{\numberThis}[2]{%
        \refstepcounter{thingCounter}%
        \thethingCounter.\ #1 \label{#2}
}

%The theorems
\theorembodyfont{\upshape}
\theoremheaderfont{\sffamily\bfseries}
\newtheorem{lst}{Listing}

\DeclareMathOperator{\grad}{\mathbf{grad}}
\DeclareMathOperator{\curl}{curl}
\DeclareMathOperator{\Div}{div}
\newcommand{\meas}[1]{\lvert{#1}\rvert}

\pagestyle{scrheadings}

\title{
\begin{center}
\includegraphics[width=0.7\textwidth]{../logo/dumux_logo_hires_whitebg.png}
\\[3cm]
{\Huge Handbook}
\end{center}
}

\author{}

\date{Version \DumuxVersion, \\
Handbook version from \today}

\publishers{%
\vspace{10mm}
{\normalsize Lehrstuhl f\"ur Hydromechanik und Hydrosystemmodellierung, \\
Universit\"at Stuttgart, Paffenwaldring 61, D-70569 Stuttgart, Germany}\\
%
\bigskip
{\normalsize \texttt{\url{http://dumux.org}}}\\
}

\begin{document}

\maketitle

\setcounter{tocdepth}{1}
\tableofcontents
\newpage

\chapter{Introduction}
\input{1_introduction}

\chapter{Quick Start}\label{quick-install}
In this chapter we provide a quick start guide to
your first \Dumux experience, including an install script with all necessary instructions
on how to very quickly install the latest release version of \Dumux.
You should have a recent working Linux environment.
If you need more information, please have a look at the detailed installation
instructions in chapter \ref{detailed-install}.
\input{2_quickinstall}

\chapter{Detailed Installation, Documentation, and Externals}\label{detailed-install}
In this chapter, we provide more detailed information on how to obtain source code, build and test \Dune and \Dumux.
It further contains information on
how to build the documentation and about external libraries and modules.
\input{3_detailedinstall}

\chapter{Learning to use \Dumux}\label{chp:tutorial}
So, you've downloaded your very own copy of \Dumux and its dependencies.
You've run dunecontrol, and your example ``test$\_$dumux" not only compiles,
but it even shows a nice simulation in ParaView.
Maybe you've read through parts of the handbook, and even started looking
through the Doxygen documentation.
Well done. What now? \par
%
\textit{``How on earth is this going to help me solve my multi-(phase, component,
  scale, physics) flow and transport problems in porous media systems?''}, you begin to wonder.
Don't panic! In order to best ease our prospective users and developers into the
wonderful \Dumux simulation environment, we've prepared a \Dumux course and extensively-documented examples.
\input{4_course}
\input{4_examples}
\input{4_furtherpractice}

\chapter{Overview and Infrastructure}
This chapter provides an overview of the general structure in \Dumux (\ref{sc_structure})
and gives help for basic work with \Dumux
(\ref{sc_newfoldersetup}-\ref{sc_developingdumux}).
Further it presents useful external tools (\ref{sc_externaltools}) and basic
concepts (\ref{sc_linearsystem}).
\input{5_structure}
\input{5_newfoldersetup}
\input{5_parameterfiles}
\input{5_restartsimulations}
\input{5_developingdumux}
\input{5_externaltools}
\input{5_assemblinglinearsystem}

\chapter{Advanced \Dumux\ -- Detailed Instructions}
This chapter contains detailed information for those who are interested
in deeper modifications of underlying \Dumux models, classes, functions, etc.
\input{6_basics}
\input{6_temporaldiscretizations}
\input{6_spatialdiscretizations}
\input{6_stepsofasimulation}
\input{6_propertysystem}
\input{6_inputoutput}
\input{6_parallel}

\bibliographystyle{plainnat}
\bibliography{dumux-handbook}
\end{document}
