\documentclass[a4,11pt,oneside,openright,titlepage]{scrbook}

%----------------------------------------------
% PACKAGE MANAGEMENT
%
\usepackage{a4}
\usepackage[latin1]{inputenc} 
\usepackage{times}
\usepackage{fancyhdr}
\usepackage{lastpage}
%\usepackage[all, light]{draftcopy}
%\usepackage{supertabular}
%\usepackage{colortbl}
%\usepackage{epsf}
\usepackage{graphicx}
\usepackage{wasysym}

%----------------------------------------------
% Document DATE and VERSION
% set these values when releasing a new version

\def\cleanunderscore#1_#2_#3{\expandafter #1\_#2\_#3}
\def\CVS$#1: #2 ${\expandafter\def\csname CVS#1\endcsname{\cleanunderscore#2}}

\newcommand{\documentdate}{November 29, 2011}
\newcommand{\documentversion}{1.1.2}
\newcommand{\documentID}{}
\newcommand{\documentname}{Model Specification}

%----------------------------------------------
% MACRO DEFINITION
%
%   \Fig{figure}{text}  : creates an mbox around 'figure' and
%                         writes 'text' at the bottom with leading
%                         'Fig. section.figno:'.
%                         Example:
%                         \Fig{\epsfxsize30mm \epsffile{x.png}}{the x}\\
%   \FigNoEntry{}{}     : same as above, no entry in figures list
%
%   \FigCaption{}       : line with figure caption, setting figure
%                         counter and figures list
%

%****************************************************************************
%       Figure makro for graphics continously enumerated.
%

\newcounter{FigCnt}[chapter]
\newcommand{\Fig}[3]%
{
        \refstepcounter{FigCnt}
        \addcontentsline{lof}{figure}%
                {\protect\numberline{\thechapter.\arabic{FigCnt}}{#2}}
        \mbox{#1}
\nopagebreak
        {Fig. \thechapter.\arabic{FigCnt}: #3}

}

\newcommand{\FigNoEntry}[2]%
{
        \refstepcounter{FigCnt}
        \mbox{#1}

\nopagebreak
        {Fig. \thechapter.\arabic{FigCnt}: #2}

}

\newcommand{\FigCaption}[1]%
{
        \refstepcounter{FigCnt}
        \addcontentsline{lof}{figure}%
                {\protect\numberline{\thechapter.\arabic{FigCnt}}{#1}}

        %{Figure \thechapter.\arabic{FigCnt}: #1}
}


\newcommand{\APIMethod}[1]{{\tt\small #1}}
\newcommand{\gunit}[1]{\mbox{ [#1]}}

\newenvironment{methoddesc}[1]{%
\subsubsection*{\APIMethod{#1}}
}%
{
}


% typeset a parameter name
\newcommand{\parameter}[1]{{\tt\small #1}}


%
% END MACRO DEFINITION
%----------------------------------------------


%----------------------------------------------
% DOCUMENT
\begin{document}


%-----------------------------------
% HEADER/FOOTER DEFINITION
% The settings here are for single page documents (only odd page set)

% for some pages latex switches back to pagestyle plain :-(
\fancypagestyle{plain}{%
	\fancyhf{} % clear all header and footer fields
	\fancyhead[RO,LE]{\footnotesize GREAT-ER 3.0 \documentname \\ \leftmark}
	\fancyfoot[RO,LE]{\footnotesize Intevation GmbH} % Author
	\fancyfoot[CO,CE]{\footnotesize \thepage/\pageref{LastPage}}
	% set the document title for the footer here!
	\fancyfoot[LO,RE]{\footnotesize \documentdate 
	\\\documentID}
	\renewcommand{\footrulewidth}{0.4pt}
}

% and now define pagestyle fancy
\fancyhead{} % clear all fields
\fancyhead[RO,LE]{\footnotesize GREAT-ER 3.0 \documentname \\ \leftmark}
\fancyfoot[RO,LE]{\footnotesize Intevation GmbH} % Author
\fancyfoot[CO,CE]{\footnotesize \thepage/\pageref{LastPage}}
% set the document title for the footer here!
\fancyfoot[LO,RE]{\footnotesize \documentdate 
\\\documentID}

\renewcommand{\footrulewidth}{0.4pt}

\pagestyle{fancy}

%-----------------------------------

\parindent0cm

% TITLE PAGE
{

% Icon
\includegraphics[width=\textwidth]{artwork/great-er3_0-title.png}\\[4.5cm]

% Title
\begin{center}
	\sffamily\bfseries\Large 
    \Huge \documentname \\[5.5cm]
\end{center}
}
\thispagestyle{empty}

\vfill

% Author
{\sffamily\small
\begin{tabular}{p{0.3\textwidth}p{0.3\textwidth}p{0.3\textwidth}}
	\includegraphics[width=0.3\textwidth]{/home/intevation/logos/intevation/intevation_logo.png}
&
\parbox[b]{0.3\textwidth}{
Intevation GmbH\\
Neuer Graben 17\\
49074 Osnabrück\\
Germany\\
www.intevation.de
}
&
\documentdate

\end{tabular}
}

\newpage

% PAGE 4

\vfill

This document has been designed with \LaTeX{}.
It is available as source code, PDF- and HTML-format.\\

Version: \documentversion \\
Date: \documentdate \\
Authors: Bernhard Herzog, Frank Koormann

\vfill

\begin{center}Copyright (c) 2002 Intevation GmbH.\end{center}

%    Permission is granted to copy, distribute and/or modify this document
%    under the terms of the GNU Free Documentation License, Version 1.2
%    or any later version published by the Free Software Foundation;
%    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
%    A copy of the license is included in the section entitled ``GNU
%    Free Documentation License''.

\tableofcontents



%
%This can be used as a template for the required software description.
%
%\subsection{Network Framework}
%
%\begin{tabular}{|p{2.5cm}|p{9.5cm}|}\hline
%Name, URL:	& \\ \hline
%Version: 	& \\ \hline
%Licence:	& \\ \hline
%Description: 	& \\ \hline
%Task:		& \\ \hline
%\end{tabular}

\include{great-er_model_concept}
\include{great-er_model_scheduler}
\include{great-er_model_worker}

%-------------------------Appendix-------------------------------------

\begin{appendix}

\renewcommand{\documentID}{gnufdl.tex version 1.2}
\include{gnufdl}
\renewcommand{\documentID}{\CVSId}

\end{appendix}

\end{document}


