\documentclass[11pt,fleqn]{article}

\usepackage[T1]{fontenc}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{csquotes}
\usepackage{latexsym}
\usepackage{makeidx}
\usepackage{url}
\usepackage{xspace}
\usepackage{graphicx}
\usepackage{syntax}
\usepackage{textcomp}

\input{version}

% define home dir of the Curry system in order to locate tool manuals:
\newcommand{\curryhome}{../..}

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

\usepackage[colorlinks,linkcolor=blue]{hyperref}
\hypersetup{bookmarksopen=true}
\hypersetup{bookmarksopenlevel=0}
\hypersetup{pdftitle={PAKCS: The Portland Aachen Kiel Curry System}}
\hypersetup{pdfauthor={Michael Hanus}}
%\hypersetup{pdfstartview=Title}
\hypersetup{pdfstartview=FitH}
\usepackage{thumbpdf}

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

\setlength{\textwidth}{16.5cm}
\setlength{\textheight}{23cm}
\renewcommand{\baselinestretch}{1.1}
\setlength{\topmargin}{-1cm}
\setlength{\oddsidemargin}{0cm}
\setlength{\evensidemargin}{0cm}
\setlength{\marginparwidth}{0.0cm}
\setlength{\marginparsep}{0.0cm}

\newlength{\figurewidth}
\setlength{\figurewidth}{\textwidth}
\addtolength{\figurewidth}{-0.4cm}

% font for program texts
\renewcommand{\tt}{\usefont{OT1}{cmtt}{m}{n}\selectfont}
\newcommand{\codefont}{\small\tt}

\usepackage{listings}
\lstset{aboveskip=1.5ex,
        belowskip=1.5ex,
        showstringspaces=false, % no special string space
        mathescape=true,
        flexiblecolumns=false,
        xleftmargin=2ex,
        basewidth=0.52em,
        basicstyle=\small\ttfamily}

\lstset{literate={->}{{$\rightarrow{}\!\!\!$}}3
       }

\lstnewenvironment{curry}{}{}
\lstnewenvironment{currynomath}{\lstset{mathescape=false}}{} % Curry w/o math
\newcommand{\listline}{\vrule width0pt depth1.75ex}

% program text in normal text
\newcommand{\code}[1]{\mbox{\codefont #1}}

% program text in normal text with apostrophs
\newcommand{\ccode}[1]{``\code{#1}''}

\newcommand{\pindex}[1]{\index{#1@{\tt #1}}}  % program elements in index

\newcommand{\todo}[1]{\fbox{\sc To do: #1}}
\newcommand{\CYS}{PAKCS\xspace} % name of the Curry system described here
\newcommand{\cyshome}{\mbox{\textit{pakcshome}}\xspace} % symbolic installation directory
\newcommand{\curryrc}{.pakcsrc} % name of the system's rc file

% allow underscores in programs:
\catcode`\_=\active
\let_=\sb
\catcode`\_=12

\newcommand{\translation}[1]{\bigskip\fbox{\begin{minipage}{15cm}\textbf{Translation: }{#1}\end{minipage}}\par\bigskip}

% produce an index:
\makeindex

\begin{document}
\sloppy

\begin{titlepage}
\pdfbookmark[1]{Title}{Title}
\begin{center}
\fbox{
\begin{minipage}[t]{\figurewidth}
\begin{center}\vspace{10ex}
{\Huge\bf PAKCS \pakcsversion}\\[4ex]
{\huge The Portland Aachen Kiel Curry System}\\[5ex]
{\huge User Manual}\\[2ex]
\pakcsversiondate\\[4ex]
\Large
Michael Hanus$^1$ [editor] \\[2ex]
{\large Additional Contributors:}\\[2ex]
Sergio Antoy$^2$ \\
Bernd Bra\ss{}el$^3$ \\
Martin Engelke$^4$ \\
Klaus H\"oppner$^5$ \\
Johannes Koj$^6$ \\
Philipp Niederau$^7$ \\
Bj\"orn Peem\"oller$^8$ \\
Ramin Sadre$^9$ \\
Frank Steiner$^{10}$ \\
Finn Teegen$^{11}$ \\[2ex]
\normalsize
(1) University of Kiel, Germany, {\tt mh@informatik.uni-kiel.de} \\
(2) Portland State University, USA, {\tt antoy@cs.pdx.edu} \\
(3) University of Kiel, Germany, {\tt bbr@informatik.uni-kiel.de} \\
(4) University of Kiel, Germany, {\tt men@informatik.uni-kiel.de} \\
(5) University of Kiel, Germany, {\tt klh@informatik.uni-kiel.de} \\
(6) RWTH Aachen, Germany, {\tt johannes.koj@sdm.de} \\
(7) RWTH Aachen, Germany, {\tt philipp@navigium.de} \\
(8) University of Kiel, Germany, {\tt bjp@informatik.uni-kiel.de} \\
(9) RWTH Aachen, Germany, {\tt ramin@lvs.informatik.rwth-aachen.de} \\
(10) LMU Munich, Germany, {\tt fst@bio.informatik.uni-muenchen.de} \\
(11) University of Kiel, Germany, {\tt fte@informatik.uni-kiel.de} \\~
\end{center}
\end{minipage}}
\end{center}
\end{titlepage}

\pdfbookmark[1]{Contents}{Contents}
\tableofcontents

\clearpage
\include{preface}
\include{overview}
\include{usage}
\include{extensions}
\include{syntax}
\clearpage
\input{tooldocs/transbooleq/manual}
\clearpage
\input{tooldocs/cpm/currysystem_manual}
\clearpage
\input{tooldocs/currycheck/manual}
\clearpage
\input{tooldocs/currybrowse/manual}
\clearpage
\input{tooldocs/currydoc/manual}
\clearpage
\input{tooldocs/casc/manual}
\clearpage
\input{tooldocs/verify/manual}
\clearpage
\newcommand{\curryppdocs}{tooldocs/currypp}
\input{tooldocs/currypp/manual}
\clearpage
\input{tooldocs/runcurry/manual}
\clearpage
\input{tooldocs/cass/manual}
\clearpage
\input{tooldocs/ertools/manual}
\clearpage
\input{tooldocs/spicey/manual}
\clearpage
\input{tooldocs/peval/manual}
\include{preprocessing}
\include{problems}

% Bibliography
\addcontentsline{toc}{section}{Bibliography}
\bibliography{manual}
\bibliographystyle{plain}

\appendix

\include{libraries}
\include{markdown_syntax}
\clearpage
\input{tooldocs/currypp/sqlsyntax}
\include{distribution}
\include{auxiliary_files}
\include{external_ops}

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

\end{document}
