\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{agp01}[2001/06/27 APPIA-GULP-PRODE 2001 Document Style 
    For Camera-ready Copy]
\newif\ifAgp@draft
\DeclareOption{10pt}{\ClassWarningNoLine{agp01}{Option `10pt' not supported}}
\DeclareOption{11pt}{\ClassWarningNoLine{agp01}{Option `11pt' not supported}}
\DeclareOption{12pt}{\PassOptionsToClass{12pt}{article}}
\DeclareOption{a4paper}{\ClassWarningNoLine{agp01}
    {Option `a4paper' not supported}}
\DeclareOption{letter}{\ClassWarningNoLine{agp01}
    {Option `letter' not supported}}
\DeclareOption{twoside}{\PassOptionsToClass{twoside}{article}}
\DeclareOption{draft}{\Agp@drafttrue\PassOptionsToClass{draft}{article}}
\DeclareOption{pagenumbers}{\Agp@drafttrue}
\DeclareOption{final}{\Agp@draftfalse\PassOptionsToClass{final}{article}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ExecuteOptions{twoside,12pt}
\ProcessOptions\relax
\LoadClass{article}

\setlength{\topmargin}{-1cm}
\setlength{\oddsidemargin}{0cm}
\setlength{\evensidemargin}{0cm}
\setlength{\textheight}{23.5cm}
\setlength{\textwidth}{15cm}
\setlength{\parindent}{0.5cm}
\setlength{\headsep}{1cm}
\setlength{\headheight}{12pt}
\setlength{\lineskip}{1pt}
\setlength{\normallineskip}{1pt}
\def\baselinestretch{1}

\date{}

\newenvironment{keywords}
{\vspace{-0.6cm}\begin{quotation}\small\itshape Keywords: }
{\vspace{-0.1cm}\end{quotation}\par\normalfont}

\ifAgp@draft
\def\ps@headings{
    \def\@oddhead{\hbox{}{\scriptsize \rightmark} \hfil \thepage}
	\def\@oddfoot{}
    \def\@evenhead{\thepage \hfil \leftmark\hbox{}} \def\@evenfoot{}}
\else
\def\ps@headings{
    \def\@oddhead{\hbox{}{\scriptsize \rightmark} \hfil \hbox{}}
	\def\@oddfoot{}
    \def\@evenhead{\hbox{} \hfil \leftmark\hbox{}} \def\@evenfoot{}}
\fi
        
\def\ps@titlepagestyle{
    \def\@oddhead{}  \def\@oddfoot{\hfil{}\centering{\ }\hfil{}}
    \def\@evenhead{} 
    \def\@evenfoot{\hfil{}\centering{\ }\hfil{}}}

\ps@headings
\pagenumbering{arabic}

\def\maketitle{\par
  \begingroup
  \def\thefootnote{} % the \thanks{} mark type is empty
  \newpage \global\@topnum\z@ \@maketitle
  \thispagestyle{titlepagestyle}\@thanks
  \endgroup
  \let\mytitle\@title
  \setcounter{footnote}{0}\let\maketitle\relax\let\@maketitle\relax
  \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax
}

\def\leftmark{APPIA-GULP-PRODE 2001}
\def\rightmark{\mytitle}

\newcommand{\runningtitle}[1]{\def\rightmark{#1}}

\raggedbottom
\endinput