\documentclass[a4paper,halfparskip]{scrartcl}
\pagestyle{plain}

\usepackage{listings,xcolor,tikz}

\usetikzlibrary{mindmap,positioning,calc}

\definecolor{lstgreen}{rgb}{0,0.6,0}
\definecolor{lstblue}{rgb}{0,0,0.7}

\definecolor{green}{rgb}{0.314,0.62,0.294}

\lstset{language=Java,basicstyle=\small\ttfamily,
keywordstyle=\color{lstblue},
commentstyle=\color{lstgreen}\ttfamily,
tabsize=2,
breaklines=true,
breakatwhitespace=true}
\usepackage{fp}

\input{defs}
\hypersetup{
	pdfauthor = {Jan Grau and Jens Keilwagen}, pdftitle = Jstacs Cookbook
}
\author{Jan Grau and Jens Keilwagen}
\title{Jstacs Cookbook}

\newcounter{first}
\setcounter{first}{1}
\newcounter{last}
\setcounter{last}{1}

\newcommand{\code}[1]{%
\setcounter{first}{\value{off}}%
\setcounter{last}{\value{off}}%
\addtocounter{last}{#1}%
\lstinputlisting[firstline=\arabic{off},lastline=\arabic{last},tabsize=1,breaklines=true]{\codefile}}

\sloppy
\begin{document}

\maketitle
\clearpage%~\clearpage

\tableofcontents
\clearpage

\input{preface}\clearpage
\input{data}\clearpage
\input{infrastructure}\clearpage
\input{sequenceScore}\clearpage
\input{classifier}\clearpage
\input{optimization}\clearpage
\input{goodies}\clearpage
\addtocontents{toc}{\newpage}
\input{recipes}

\end{document}
