% LaTeX preamble
% $Id$

% use the KOMA script
\documentclass[BCOR7mm,12pt,abstracton,final,twoside]{scrartcl}

% set titles to antiqua
\addtokomafont{sectioning}{\rmfamily}
\addtokomafont{descriptionlabel}{\rmfamily}

% use latin1 as input encoding
\usepackage[latin1]{inputenc}

% Multilingual environment
\usepackage[ngerman,english]{babel}

% use colors
\usepackage[usenames,dvipsnames]{color}

% easier handling of included figures
\usepackage{graphicx}
\graphicspath{{figures/}}

% boxed verbatim input
\usepackage{bverb}

% final detection
\usepackage{ifthen}
\newboolean{final}
\input{final}

% PDF meta information
\usepackage[
	pdfborder=0 0 0,
	bookmarksopen=true,
	pdfauthor={Beat Strasser},
	pdfsubject={JXTA},
	pdftitle={VamPeer - JXTA implementation for Eiffel}
]{hyperref}

% fancy headers
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markboth{#1}{#1}}
\renewcommand{\subsectionmark}[1]{}
\renewcommand{\subsubsectionmark}[1]{}
\fancyhf{}
\fancyhead[LO,RE]{\slshape \rightmark}
\fancyhead[LE,RO]{VamPeer - JXTA implementation for Eiffel}
\fancyfoot[C]{\thepage}

% SVN ID info in the footer
\usepackage[nofancy]{svninfo}
\ifthenelse{\boolean{final}}{}{
	\fancyfoot[LE,RO]{\textsf{\small{\svnInfoFile, Revision \svnInfoRevision}}}
	\fancyfoot[LO,RE]{\textsf{\small{\svnInfoDate ~ \svnInfoTime ~ \svnInfoOwner}}}
}

% custom command: a toc entry without section header
\newcommand{\hidesection}[1]{
	\addtocounter{section}{1}
	\addcontentsline{toc}{section}{\protect\numberline{\thesection}{#1}}
	\markboth{#1}{#1}
}

% custom command: italic VamPeer
\newcommand{\vampeer}{\textit{VamPeer}}

% custom command: draft note
\newcommand{\draftnote}[1]{
\ifthenelse{\boolean{final}}{}{
	\noindent\framebox[\textwidth]{\begin{minipage}[c]{0.98\textwidth}
	\begin{center}\textsf{#1}\end{center}
	\end{minipage}}
}}
