% This files contains the layout definitions for TRAIL Publications
% according to the prescriptions of the Delft University Press (DUP).
% See the template 'trailtpl.tex' for instructions on how to use these definitions.
% DO NOT MAKE ANY CHANGES !!!
%
% This file has been written by Rob M.P. Goverde
% (c) February 2002, Delft

% *************** Used packages *******************

\usepackage{epsf}
\usepackage{amstext}
\usepackage{epsfig}
\usepackage{graphics}
\usepackage{latexsym}
\usepackage{times}

% ****** margins and page settings *****************

\setlength{\hoffset}{-1in}
\setlength{\oddsidemargin}{41mm}
\setlength{\evensidemargin}{41mm}
\setlength{\textwidth}{128mm}
\setlength{\textheight}{200mm}
\setcounter{secnumdepth}{2}

\renewcommand{\section}{\@startsection{section}{1}{0pt}{-\baselineskip}{\baselineskip}{\normalfont\large\bfseries}}
\renewcommand{\subsection}{\@startsection{subsection}{2}{0pt}{-\baselineskip}{\baselineskip}{\normalfont\bfseries}}
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0pt}{-\baselineskip}{0.1mm}{\normalfont\bfseries}}

\def\affiliation#1{\gdef\@affiliation{#1}}
\def\@affiliation{\@latex@error{No \noexpand\affiliation given}\@ehc}

\renewcommand\maketitle{\par
  \begingroup
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
    \long\def\@makefntext##1{\parindent 1em\noindent
            \hb@xt@1.8em{%
                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
    \newpage
    \global\@topnum\z@   % Prevents figures from going at top of page.
    \@maketitle
    \thispagestyle{plain}\@thanks
  \endgroup
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@affiliation\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\affiliation\relax
  \global\let\and\relax
}
\def\@maketitle{%
  \newpage
  \null
  \vskip \baselineskip%
  \begin{center}%
  \let \footnote \thanks
    {\bfseries\Large \@title \par}%
    \vskip \baselineskip%
    {\large
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
    \normalsize\@affiliation
  \end{center}%
  \par
  \vskip \baselineskip}

\renewenvironment{abstract}{%
  \setlength{\parindent}{0pt}
  {\bfseries\abstractname\par}}{%
  \vskip\baselineskip}

\def\keywords#1{%
  {\setlength{\parindent}{0pt}
  {\bfseries Keywords \par}%
  {#1 \par}}%
  \vskip\baselineskip}
