\documentclass[11pt,british,a4paper,twoside,pdftex]{report}
\usepackage{fancyhdr,graphicx,url,graphics,listings,longtable}
\usepackage[dvipsnames,table,pdftex,hyperref,rgb]{xcolor}
\usepackage{framed}
\usepackage[latin1]{inputenc}
\usepackage{hyperref,xspace}
\usepackage{graphicx,boxedminipage}
\usepackage{babel}
%\setlength{\parskip}{1em}
%\setlength{\parindent}{0pt}
\usepackage{varioref}
\newcommand{\abbrev}[1]{\textsc{#1}}
\newcommand{\rpm}{\abbrev{rpm}\xspace}
\newcommand{\unix}{\abbrev{Unix}\xspace}
\newcommand{\bsd}{\abbrev{bsd}\xspace}
\newcommand{\apt}{\abbrev{apt}\xspace}
\newcommand{\vms}{\abbrev{vms}\xspace}
\newcommand{\freebsd}{Free\bsd}
\newcommand{\pkg}[1]{\texttt{#1}}
\newcommand{\directory}[1]{\texttt{#1}}
\newcommand{\function}[1]{\texttt{#1}}
\newcommand{\UnderscoreCommands}{%   (\cite already done)
     \do\directory \do\function
   }
\usepackage[strings]{underscore}

\makeatletter
\newenvironment{example}{%
  \def\FrameCommand{
    \fcolorbox%
    {black}% inner frame
    {gray!25}}%
  \fram@d {}}%
{\endfram@d}
\makeatother

\makeatletter
  \@namedef{datebritish}{%
    \def\today{\ifcase\month\or
      January\or February\or March\or April\or May\or June\or
      July\or August\or September\or October\or November\or
      December\fi \space\number\day, \number\year}}
\makeatother



\date{}
\title{An implemention of support for multiple run-time architectures
  in a packaging system perspective\\{\small TDT4900 Master Thesis, Technology Programme}}
\author{Tollef Fog Heen (tfheen@idi.ntnu.no)}
\date{\today}
\setcounter{tocdepth}{1}
\setcounter{secnumdepth}{4}
\renewcommand{\intextsep}{1em}

%%% Page layout


\pagestyle{fancy}
\lhead[\thepage]{\leftmark}      % Note the different brackets!
\rhead[\leftmark]{\thepage}
\lfoot{An implemention of support for multiple run-time architectures
  in a packaging system perspective}
\rfoot{}
\cfoot{}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\evensidemargin=0.5cm
\oddsidemargin=1.5cm
\headheight=15pt

\begin{document}
\definecolor{shadecolor}{named}{lightgray}

\lstdefinelanguage{DebControl}{
  morekeywords = {Package, Depends, Conflicts },
  sensitive = false ,
  morecomment =[s]{(}{)} ,
  morecomment =[s]{[}{]} ,
}
\lstdefinelanguage{Directory}{
  morekeywords = {/},
  sensitive = false ,
%  morecomment =[s]{(}{)} ,
%  morecomment =[s]{[}{]} ,
}


\pagenumbering{roman}
\bibliographystyle{unsrt}
\renewcommand\bibname{References}
\maketitle

\pagestyle{empty}
\cleardoublepage
\input{preamble}
\cleardoublepage
\input{summary}
\cleardoublepage
\tableofcontents

\cleardoublepage
\input{dissertation}
\cleardoublepage
\pagestyle{fancy}
\pagenumbering{arabic}
\input{introduction}
\cleardoublepage

\input{problem_definition}
\cleardoublepage

\input{existing_solutions}
\cleardoublepage
\input{composition}
\cleardoublepage
\input{prototype_evaluation}
\cleardoublepage
\input{production_design}
\cleardoublepage
\input{postamble}
\cleardoublepage
\input{furtherwork}
\cleardoublepage

\bibliography{bibliography}
\cleardoublepage

\appendix
\input{appendix_prototype}

\end{document} 