\documentclass[a4paper,10pt]{report}

\usepackage[margin=1in]{geometry}
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\usepackage{listings}
\usepackage[round]{natbib}
\usepackage{makeidx}
\usepackage{url}
\usepackage{longtable}
\usepackage{tabularx}
\usepackage[nottoc]{tocbibind}
\usepackage{color}
\usepackage{prettyref}
\usepackage{fancyhdr}
\usepackage{mathpazo}
\usepackage{helvet}
\usepackage[pdftex,breaklinks=true,colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue,
filecolor=blue,pdffitwindow,backref=true,pagebackref=false,bookmarks=true,bookmarksopen=true,
bookmarksnumbered=true]{hyperref}

\pagestyle{fancyplain}
% chapter mark, only needed for twosided print
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
% section mark
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}

\lhead[\fancyplain{}{\bfseries\thepage}]%    [even]{odd}
      {\fancyplain{}{\bfseries\rightmark}}
\chead[\fancyplain{}{}]{\fancyplain{}{}}
\rhead[\fancyplain{}{\bfseries\leftmark}]%
      {\fancyplain{}{\bfseries\thepage}}

%% prettyref formats
\newrefformat{fig}{\hyperref[#1]{Fig.\,\ref*{#1}}}
\newrefformat{chap}{\hyperref[#1]{Chapt.\,\ref*{#1}}}
\newrefformat{sec}{\hyperref[#1]{Sec.\,\ref*{#1}}}
\newrefformat{tab}{\hyperref[#1]{Tab.\,\ref*{#1}}}
\newrefformat{app}{\hyperref[#1]{App.\,\ref*{#1}}}
\newrefformat{subsec}{\hyperref[#1]{Sec.\,\ref*{#1}}}
\newrefformat{eq}{\hyperref[#1]{(\ref*{#1})}}

\graphicspath{{figures/}{../../extras/logos/}}

\makeindex

\definecolor{lstcolor}{gray}{0.9}
\lstset{% Settings for the listing package
  language=Python,
  numbers=none,
  basicstyle=\small,
  showstringspaces=false,
  lineskip=2pt,
  escapechar=!,
  backgroundcolor=\color{lstcolor},
  morekeywords={Create,SetStatus,GetStatus,Connect,
     GetNodes,GetLeaves,
     ConvergentConnect,DivergentConnect,
     Simulate,RandomConvergentConnect,
     RandomDivergentConnect,CopyModel,
     SetKernelStatus,PrintNetwork,SetDefaults,
   voltage_trace,raster_plot,ResetKernel,FindConnections,
   CreateLayer,ConnectLayers,GetPosition,GetLayer,
   GetElement,FindNearestElement,Displacement,Distance,
   DumpLayerNodes,DumpLayerConnections,FindCenterElement,
   GetTargetNodes,GetTargetPositions,PlotTargets,PlotKernel,PlotLayer},
  rangeprefix=\#\{\ ,
  rangesuffix=\ \#\},
  includerangemarker=false}

\renewcommand{\abstractname}{}

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

\title{\Huge\bf NEST 2.0\\[0.5ex] User Manual}
\author{\includegraphics[width=20ex]{nest-logo}}
\date{\vfill\today}

\begin{document}

\maketitle

\begin{abstract}  
  \vspace*{\fill}{\centerline{\footnotesize{Copyright \copyright{} 2011 The NEST Initiative}}}
\end{abstract}

\tableofcontents

\clearpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
principle of least surprise?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Preface}   
\section{What is NEST?}
what  is special?,
philosopy?,
why this design?,
what it can do, and what it can't?,
what is an axon/dendrite/\ldots?

\section{Audience}
\section{How to read this manual}
\section{Organization of this book}
\section{Acknowledgments}
\href{http://www.nest-initiative.org}{www.nest-initiative.org}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{NEST Cookbook}
assume that NEST is already installed

(examples: minimal python scripts with figures; links to \prettyref{chap:complete_reference})

\section{``Hello world''}

which models exist, devices, how to combine different devices, input device
examples (sine, dc, step, noise generator etc.)

many pictures (e.g. distributions), equations

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Installation}
\section{Introduction}
\section{What gets installed where?}
\section{Dependencies}
\section{Minimal configuration}
\section{Standard configuration}
\section{Choice of compiler}
\subsection{Compiler-specific options}
\section{Configuration options}
\section{Mac OS X}
\subsection{Installation}
\subsubsection{From a tarball}
\subsubsection{From Subversion checkout}
\subsection{Discussion}
\subsection{Using the correct compiler}
\subsection{Compilation problems}
\subsection{MPI}
\section{Windows}
\subsection{Using the NEST LiveCD}
\subsection{Virtual Machines}
\subsection{Cygwin}
\section{Multi-threading}
\section{MPI}
\section{Getting started}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{User's manual}
\section{Help!}
(where to get help)
\section{Controlling NEST}
\subsection{PyNEST}
\citep{Eppler09_12}
\subsection{PyNN}
(see \href{http://www.neuralensemble.org/trac/PyNN}{www.neuralensemble.org/trac/PyNN})
\subsection{SLI}
\subsection{MUSIC}
\section{Simulation configuration}
\subsection{Multi-threading}
\subsection{MPI}
\section{Neuron models}
\section{Synapse models}
\section{Stimulation}
\section{Recording}
\section{Connections}
\section{Topology library}
(include HEP's documentation)
\section{Save data}
\section{Visualisation}
\section{Frequently Asked Questions}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Developer's manual}

(see \href{http://nest-initiative.org/index.php/Software:Documentation}{www.nest-initiative.org/index.php/Software:Documentation})

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Complete reference}\label{chap:complete_reference}
(will be automatically generated from pynest docstrings)
\section{Models}
\subsection{Neuron models}
\subsection{Synapse models}
\subsection{Stimulus devices}
\subsection{Recording devices}
\section{Functions}
(structure from \href{ http://nest-initiative.org/index.php/PyNEST}{ http://nest-initiative.org/index.php/PyNEST})
\subsection{Information on NEST}
\subsection{Low-level access to SLI}
\subsection{Simulation control}
\subsection{Models}
\subsection{Nodes}
\subsection{Connections}
\subsection{Structured networks}
\subsection{Distributed simulations}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\bibliographystyle{neuralcomput_natbib}
\bibliography{math,brain}
%  \addcontentsline{toc}{chapter}{Bibliography}

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

\end{document}