\documentclass[a4paper,twoside,final]{report}

\usepackage{microtype}
\usepackage{multirow}
\usepackage{tex_support/OSGeomisc} % first file to include
\usepackage{tex_support/OSGeoJournal} % second file to include
\usepackage{tex_support/itemsep} % To reduce space between bullets see \noitemsep in oseojournal.sty
\usepackage{pdfpages}
\usepackage[Sonny]{tex_support/fncychap}
%\usepackage{sectsty}
\usepackage{colortbl}
\usepackage{booktabs}
\usepackage{tex_support/wallpaper}  % For full page image inserts, also good for multi-image on page layouts.  See \ThisCenterWallPaper entries.
\usepackage[printonlyused]{acronym} % 1st time Common Data Model (CDM), 2nd time CDM (both with links) - disabled acronym command in tex_support/OSGeoJournal.sty
\usepackage{lastpage}
\usepackage{endnotes}
\usepackage[sectionbib]{chapterbib}
\usepackage{supertabular}
%\usepackage{longtable}
\usepackage[fit]{truncate}
\usepackage{wrapfig}
%\usepackage{setspace} %to change spacing in doc
\usepackage{enumitem} % to alter spacing around lists
\usepackage{float} % used to create a custom float
\newfloat{graphictable}{tbph}{gtx} % float to allow captioning a table that is really an image
\floatname{graphictable}{Table} % Name to use in caption for the graphic table

%%%DJH changes to vol8 - to be incorporated into style file...%%%

%to slightly reduce the amount of space before section headings and other headings...
\makeatletter %required to avoid confusing LaTeX
\renewcommand\section{\@startsection {section}{1}{\z@}%name, level indent
                                   {-2.5ex \@plus -.7ex \@minus -.2ex}% space before, plus or minus
                                   {1.7ex \@plus.2ex}% space after, plus
                                   {\normalfont\Large\bfseries}}% font size
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-2.25ex\@plus -.6ex \@minus -.2ex}%
                                     {1.2ex \@plus .2ex}%
                                     {\normalfont\large\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-2ex\@plus -.5ex \@minus -.2ex}%
                                     {1ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {1.75ex \@plus.4ex \@minus.2ex}%
                                    {-.7em}%
                                    {\normalfont\normalsize\bfseries}}
\makeatother

% Figures within a column...
\makeatletter
\newenvironment{tablehere}
{\def\@captype{table}}
{}
\newenvironment{figurehere}
{\def\@captype{figure}}
{}
\makeatother

% to change the indent for itemized lists, and general space between paragraphs
\setlength{\leftmargini}{1em}
\setlength{\itemsep}{1pt}
%\setlength{\parskip}{1pt} %unfortunately, changing this alters the global parskip setting: need to find a way to make it refer only to itemize envs
\setlength{\parsep}{0pt}

%altering the captions: smaller font, closer to figs
\usepackage[font=small,labelfont=bf,skip=5pt]{caption} %some problem with \stretch - seems to have no effect

%altering the quotation environment
\renewenvironment{quotation}{%
  \list{}{%
    \leftmargin1em   % this is the adjusting screw
    \rightmargin\leftmargin
  }
  \item\relax
}
{\endlist}
%

%changes to the way bibliographies are displayed
\renewcommand{\bibfont}{\footnotesize}   
 \setlength{\bibsep}{0ex}
%

% changes the way LaTeX handles floats - should be easier to deal with
\renewcommand\floatpagefraction{.9}
\renewcommand\topfraction{.9}
\renewcommand\bottomfraction{.9}
\renewcommand\textfraction{.1}   

%changes font size of addresses
\renewcommand{\address}[1]{\addvspace{\baselineskip}\noindent\small\emph{#1}} %altered font size

%altered the TOC heading
\renewcommand{\contentsname}{Volume 10 Contents}

%%tweaking page margins (first four most important for margins)
\setlength{\textheight}{240mm}
\setlength{\textwidth}{17.5cm}
\setlength{\voffset}{0cm}
\setlength{\oddsidemargin}{-3mm}
\setlength{\evensidemargin}{-8mm}
%\setlength{\columnseprule}{.1pt}
\setlength{\columnsep}{20pt}
\setlength{\topmargin}{0mm}

%%%--%%%%

% Special packages just for this volume 8
\usepackage[numbers]{natbib}
\bibpunct{(}{)}{,}{a}{,}{,} % see troubleshooting.txt
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{listings}
%\usepackage{babel}
\usepackage{array}
\usepackage{textcomp}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{verbatim}
%\usepackage{ooomath} % for cebecauer - no longer required
\usepackage{subfigure} %apparently this has been superseded by the subfig package, which is not backwards compatible. subfig works better with hypcap, caption and so on
\usepackage[user,titleref]{zref} %to handle section refs in gadea
%\usepackage[hypcap=true]{caption}
%\usepackage[hypcap=true,list=true]{subcaption} %in theory these two will solve the hyperref problem, but require some relabelling of caption and figure environments - no time!


\hypersetup{bookmarks=true,
raiselinks=true, %raiselinks in theory should fix the hyperlinking problem, but doesn't seem to
pdfauthor = {Tyler Mitchell, OSGeo},
pdftitle = {OSGeo Journal Volume 10},
pdfsubject = {FOSS4G 2009 proceedings},
pdfkeywords = {open source, geospatial, mapping, FDO, GDAL/OGR, GEOS, GeoTools, MetaCRS, GeoNetwork opensource, metadata, web mapping, deegree, Mapbender, MapBuilder, MapGuide Open Source, MapServer, OpenLayers, Desktop GIS, GRASS GIS, OSSIM, Quantum GIS, gvSIG, PostGIS, geomajas, GeoServer, FOSS4G},
pdfcreator = {LaTeX with hyperref package},
pdfproducer = {dvips + ps2pdf}}

%\usepackage[all]{hypcap} %to fix issue with hyperlinks - needs to be loaded after hyperref, above - doesn't work with subfigutre

%%%%%%  Following section adds DRAFT watermark - remove when final

%\usepackage{graphicx}
%\usepackage{type1cm}
%\usepackage{eso-pic}
%\usepackage{color}
%
%\makeatletter
%\AddToShipoutPicture{%
%            \setlength{\@tempdimb}{.5\paperwidth}%
%            \setlength{\@tempdimc}{.5\paperheight}%
%            \setlength{\unitlength}{1pt}%
%            \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%
%       \makebox(0,0){\rotatebox{45}{\textcolor[gray]{0.75}%
%        {\fontsize{6cm}{6cm}\selectfont{DRAFT}}}}%
%            }%
%}
%\makeatother

%%%%%%  End above DRAFT section


\ChTitleVar{\Huge\sf}  % Set font size for chapter headings

\hyphenation{OSGeo FOSS GFOSS sourceforge OSSIM Apps}

\definecolor{green}{rgb}{0.63,0.80,0.4}

\begin{document}

\setcounter{page}{0}
\volume{8}
\volnumber{8}
\date{Feb 2012}
\title{OSGeo Journal}
\subtitle{FOSS4G 2011 Proceedings}

%% titlepage:
\setcounter{page}{0}
\phantomsection\pdfbookmark[1]{Volume 10}{cover}
%\vspace{1in}
\ThisCenterWallPaper{}{graphics/cover_A4.pdf}
\noindent  \\ % placeholder to force new page over wall paper graphic

\newpage

%% Announcements - FOSS4G
%\phantomsection\pdfbookmark[-1]{Announcement}{announce}
%\ThisCenterWallPaper{}{graphics/poster.png}
%\noindent  \\ % placeholder to force new page over wall paper graphic
%
%\newpage
%% Sponsors graphic
\pagestyle{fancy}
\noitemsep


%% Table of contents
\fancyhead[R]{\truncate{.75\headwidth}{\ChapName}}
\fancyhead[L]{OSGeo Journal Volume 10}
\fancyfoot[C]{Page \thepage\ of \pageref*{LastPage}}
%\phantomsection\addcontentsline{toc}{part}{Editorial}
%\chapter{From the Editor}{
  \begin{multicols}{2}
   \setcounter{tocdepth}{0}
    \tableofcontents
   \setcounter{tocdepth}{2}
  \end{multicols}
%  \vspace{0.5cm}
  \hrule
  \vspace{-1em}
%  \vspace{0.5cm}
% Welcome from Conf. Chair
\vspace{1in}
\input{batty/batty.tex}

%\newpage

%\phantomsection\addcontentsline{toc}{part}{News \& Announcements}
%\chapter*{News \& Announcements}{
%\vspace{-6em}
%	\input{news/journal_news_v8}
%	\hrulefill \clearpage
%	\input{dev_announce/hansmann/hansmann}
%}
%\newpage

%\phantomsection\addcontentsline{toc}{part}{Case Studies}
%\chapter*{Case Studies}{
%	\input{case_studies/wilkins/image_request_app}
%}

%\newpage

%\phantomsection\addcontentsline{toc}{part}{Integration Examples}
%\chapter*{Integration Examples}{
	% needs figures, lots of weird characters in text?
%	\input{integration/cebecauer/cebecauer}

%}
\newpage

\phantomsection\addcontentsline{toc}{part}{FOSS4G 2011 Conference Proceedings}
\chapter*{FOSS4G 2011 Conference Proceedings}{
%\vspace{-10em}
%	 \input{editorial/badard}  % using \input so it injects the tex instead of starting a new page with \include
%\include{tilemill_walsh_gundersen/tilemill_walsh_gundersen}
%\newpage
\include{moreno/moreno}
\newpage
\include{butt_li/butt_li}
\newpage
\include{cavner_stewart_et_al/cavner_stewart_et_al}
\newpage
\include{hollander/Rgrasspam}
\newpage
\include{osgeo-functional-coverages/functional-coverages}
\newpage
\include{jennings/jennings}
\newpage
\include{boerboom/boerboom}
\newpage
\include{knudsen/200-440-1-RV}
\newpage
%	% See biblio in dunsford
%	\include{foss4g09/dunsford/Dunsford01}
%	\newpage
%	% See all comments in Erickson, some urls mess up latex, so got desperate to remove some :)
%	\include{foss4g09/erickson/erickson}
%	\newpage
%	\include{foss4g09/gadea/gadea}
%	\newpage
%	\include{foss4g09/marchionni/OSGeo_MapWindow_Modeler}
}


% Imprint/Impressum
\newpage
\phantomsection\pdfbookmark[-1]{Imprint}{cover-back}

\pagestyle{empty}
\fancyfoot[C]{}
\fancyhead[R]{}

\input{tex_support/imprint}

% Back cover graphic
\ThisCenterWallPaper{}{graphics/cover_back.pdf}
\noindent  \\ % placeholder to force new page over wall paper graphic

\end{document}
