%
%
% document class for ABLAT conferences
%
% last revision 2005-11-07 by Ulrich Bodenhofer
%
%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]

\ProvidesClass{ablat}[2005/10/18]

\DeclareOption*{\ClassError{pptex}{Option '\CurrentOption' not supported.}{Remove the '\CurrentOption' option}}

\ProcessOptions\relax

%
% load class article
%
\LoadClass[a4paper,12pt]{article}

\setlength{\textwidth}{170mm}
\setlength{\textheight}{245mm}
\hoffset = -0.6in
\voffset = -0.7in

\def\partname{Part}
\def\contentsname{Contents}
\def\listfigurename{List of Figures}
\def\listtablename{List of Tables}
\def\refname{\normalsize\bf References}
\def\indexname{Index}
\def\figurename{Figure}
\def\tablename{Table}
\def\abstractname{Abstract}

\def\@ptsize{0}
\@namedef{ds@11pt}{\def\@ptsize{1}}
\@namedef{ds@12pt}{\def\@ptsize{2}}

\def\ds@twoside{\@twosidetrue
           \@mparswitchtrue}

\def\ds@draft{\overfullrule 5\p@}

\newif\if@titlepage \@titlepagefalse
\def\ds@titlepage{\@titlepagetrue}

\def\ds@twocolumn{\@twocolumntrue}

\def\labelenumi{\theenumi.}
\def\theenumi{\arabic{enumi}}

\def\labelenumii{(\theenumii)}
\def\theenumii{\alph{enumii}}
\def\p@enumii{\theenumi}

\def\labelenumiii{\theenumiii.}
\def\theenumiii{\roman{enumiii}}
\def\p@enumiii{\theenumi(\theenumii)}

\def\labelenumiv{\theenumiv.}
\def\theenumiv{\Alph{enumiv}}
\def\p@enumiv{\p@enumiii\theenumiii}

\def\labelitemi{$\m@th\bullet$}
\def\labelitemii{\bf --}
\def\labelitemiii{$\m@th\ast$}
\def\labelitemiv{$\m@th\cdot$}

\def\verse{\let\\=\@centercr
  \list{}{\itemsep\z@ \itemindent -1.5em\listparindent \itemindent
          \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]}
\let\endverse\endlist

\def\quotation{\list{}{\listparindent 1.5em
    \itemindent\listparindent
    \rightmargin\leftmargin \parsep \z@ plus\p@}\item[]}
\let\endquotation=\endlist

\def\quote{\list{}{\rightmargin\leftmargin}\item[]}
\let\endquote=\endlist

\def\descriptionlabel#1{\hspace\labelsep \bf #1}
\def\description{\list{}{\labelwidth\z@ \itemindent-\leftmargin
       \let\makelabel\descriptionlabel}}

\let\enddescription\endlist

\def\theequation{\arabic{equation}}

\def\titlepage{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
     \else \newpage \fi \thispagestyle{empty}\c@page\z@}

\def\endtitlepage{\if@restonecol\twocolumn \else \newpage \fi}

\arraycolsep 5pt

\tabcolsep 6pt

\arrayrulewidth .4pt
\doublerulesep 2pt

\tabbingsep \labelsep

\skip\@mpfootins = \skip\footins

\fboxsep = 3pt

\fboxrule = .4pt

\def\thepart          {\Roman{part}}
\def\thesection       {\arabic{section}}
\def\thesubsection    {\thesection.\arabic{subsection}}
\def\thesubsubsection {\thesubsection .\arabic{subsubsection}}
\def\theparagraph     {\thesubsubsection.\arabic{paragraph}}
\def\thesubparagraph  {\theparagraph.\arabic{subparagraph}}

\def\part{\par
   \addvspace{4ex}
   \@afterindentfalse
   \secdef\@part\@spart}

\def\@part[#1]#2{\ifnum \c@secnumdepth >\m@ne
        \refstepcounter{part}
        \addcontentsline{toc}{part}{\thepart
        \hspace{1em}#1}\else
      \addcontentsline{toc}{part}{#1}\fi
   {\parindent \z@ \raggedright
    \interlinepenalty \@M
    \ifnum \c@secnumdepth >\m@ne
      \Large \bf \partname~\thepart%   THEN Print '\partname' and
      \par\nobreak
    \fi
    \huge \bf
    #2%
    \markboth{}{}\par
   }\nobreak
   \vskip 3ex
   \@afterheading
  }

\def\@spart#1{{\parindent \z@ \raggedright
    \interlinepenalty \@M
    \huge \bf
    #1\par}
    \nobreak
    \vskip 3ex
    \@afterheading
  }

\def\@pnumwidth{1.55em}
\def\@tocrmarg {2.55em}
\def\@dotsep{4.5}
\setcounter{tocdepth}{3}

\def\tableofcontents{\section*{\contentsname
        \@mkboth{\uppercase{\contentsname}}{\uppercase{\contentsname}}}%
  \@starttoc{toc}}

\def\l@part#1#2{\addpenalty{\@secpenalty}%
   \addvspace{2.25em plus\p@}%
   \begingroup
   \@tempdima 3em
     \parindent \z@ \rightskip \@pnumwidth
     \parfillskip -\@pnumwidth
     {\large \bf
     \leavevmode
     #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
     \nobreak
   \endgroup}

\def\l@section#1#2{\addpenalty{\@secpenalty}% good place for page break
   \addvspace{1.0em plus\p@}%
   \@tempdima 1.5em
   \begingroup
     \parindent \z@ \rightskip \@pnumwidth
     \parfillskip -\@pnumwidth
     \bf
     \leavevmode
      \advance\leftskip\@tempdima
      \hskip -\leftskip
     #1\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par
   \endgroup}

\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}}

\def\listoffigures{\section*{\listfigurename
    \@mkboth{\uppercase{\listfigurename}}{\uppercase{\listfigurename}}}%
  \@starttoc{lof}}

\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}

\def\listoftables{\section*{\listtablename\@mkboth
   {\uppercase{\listtablename}}{\uppercase{\listtablename}}}%
  \@starttoc{lot}}
\let\l@table\l@figure

\def\thebibliography#1{\section*{\refname\@mkboth
  {\uppercase{\refname}}{\uppercase{\refname}}}\list
  {\@biblabel{\arabic{enumiv}}}{\settowidth\labelwidth{\@biblabel{#1}}%
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \usecounter{enumiv}%
    \let\p@enumiv\@empty
    \def\theenumiv{\arabic{enumiv}}}%
    \def\newblock{\hskip .11em plus.33em minus.07em}%
    \sloppy\clubpenalty4000\widowpenalty4000
    \sfcode`\.=1000\relax}

\def\endthebibliography{%
  \def\@noitemerr{\@warning{Empty `thebibliography' environment}}%
  \endlist}

\newif\if@restonecol

\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
\columnseprule \z@
\columnsep 35\p@\twocolumn[\section*{\indexname}]%
    \@mkboth{\uppercase{\indexname}}{\uppercase{\indexname}}%
    \thispagestyle{plain}\parindent\z@
    \parskip\z@ plus.3\p@\relax\let\item\@idxitem}

\def\@idxitem{\par\hangindent 40\p@}

\def\subitem{\par\hangindent 40\p@ \hspace*{20\p@}}

\def\subsubitem{\par\hangindent 40\p@ \hspace*{30\p@}}

\def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}

\def\indexspace{\par \vskip 10\p@ plus5\p@ minus3\p@\relax}

\def\footnoterule{\kern-3\p@
  \hrule width .4\columnwidth
  \kern 2.6\p@}

\long\def\@makefntext#1{\parindent 1em\noindent
            \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}#1}

\setcounter{topnumber}{2}
\def\topfraction{.7}
\setcounter{bottomnumber}{1}
\def\bottomfraction{.3}
\setcounter{totalnumber}{3}
\def\textfraction{.2}
\def\floatpagefraction{.5}
\setcounter{dbltopnumber}{2}
\def\dbltopfraction{.7}
\def\dblfloatpagefraction{.5}

\long\def\@makecaption#1#2{%
   \vskip 10\p@
   \setbox\@tempboxa\hbox{#1: #2}%
   \ifdim \wd\@tempboxa >\hsize
       #1: #2\par
     \else
       \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
   \fi}

\def\thefigure{\@arabic\c@figure}

\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{\figurename~\thefigure}
\def\figure{\@float{figure}}
\let\endfigure\end@float
\@namedef{figure*}{\@dblfloat{figure}}
\@namedef{endfigure*}{\end@dblfloat}

\def\thetable{\@arabic\c@table}

\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{\tablename~\thetable}
\def\table{\@float{table}}
\let\endtable\end@float
\@namedef{table*}{\@dblfloat{table}}
\@namedef{endtable*}{\end@dblfloat}

\def\maketitle{\par
 \begingroup
   \def\thefootnote{\fnsymbol{footnote}}%
   \def\@makefnmark{\hbox
       to\z@{$\m@th^{\@thefnmark}$\hss}}%
   \if@twocolumn
     \twocolumn[\@maketitle]%
     \else \newpage
     \global\@topnum\z@
     \@maketitle \fi\thispagestyle{plain}\@thanks
 \endgroup
 \setcounter{footnote}{0}%
 \let\maketitle\relax
 \let\@maketitle\relax
 \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}

\def\@maketitle{\newpage
 \null
 \vskip 2em
 \begin{center}%
  {\LARGE \@title \par}%
  \vskip 1.5em
  {\large
   \lineskip .5em
   \begin{tabular}[t]{c}\@author
   \end{tabular}\par}%
  \vskip 1em
  {\large \@date}%
 \end{center}%
 \par
 \vskip 1.5em}

\def\abstract{\if@twocolumn
\section*{\abstractname}%
\else \small
\begin{center}%
{\bf \abstractname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
\quotation
\fi}

\def\endabstract{\if@twocolumn\else\endquotation\fi}

\mark{{}{}}

\if@twoside
 \def\ps@headings{\let\@mkboth\markboth
  \def\@oddfoot{}\def\@evenfoot{}%       No feet.
  \def\@evenhead{\rm \thepage\hfil \sl \leftmark}%        Left heading.
  \def\@oddhead{{\sl \rightmark}\hfil \rm\thepage}% Right heading.
  \def\sectionmark##1{\markboth {\uppercase{\ifnum \c@secnumdepth >\z@
    \thesection\hskip 1em\relax \fi ##1}}{}}%
  \def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne
          \thesubsection\hskip 1em\relax \fi ##1}}}
\else
 \def\ps@headings{\let\@mkboth\markboth
  \def\@oddfoot{}\def\@evenfoot{}%     No feet.
  \def\@oddhead{{\sl \rightmark}\hfil \rm\thepage}% Heading.
  \def\sectionmark##1{\markright {\uppercase{\ifnum \c@secnumdepth >\z@
    \thesection\hskip 1em\relax \fi ##1}}}}
\fi

\def\ps@myheadings{\let\@mkboth\@gobbletwo
 \def\@oddhead{{\sl\rightmark}\hfil \rm\thepage}%
 \def\@oddfoot{}\def\@evenhead{\rm \thepage\hfil\sl\leftmark}%
 \def\@evenfoot{}\def\sectionmark##1{}\def\subsectionmark##1{}}

\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}

\ps@plain
\pagenumbering{arabic}
\if@twoside\else\raggedbottom\fi
\if@twocolumn
 \@@input twocolum.sty\relax
\else
 \onecolumn
\fi

\if@titlepage
  \@@input titlepag.sty\relax
\fi

\def\softd{{\leavevmode\setbox1=\hbox{d}%
\hbox to 1.05\wd1{d\kern-0.4ex{\char039}\hss}}}%cstocs
\def\softt{{\leavevmode\setbox1=\hbox{t}%
\hbox to \wd1{t\kern-0.6ex{\char039}\hss}}}%cstocs
\def\softl{l\kern-0.45ex\raise0.1ex\hbox{'}\kern-0.10ex}%cstocs
\def\softL{L\kern-0.8ex\raise0.1ex\hbox{'}\kern0.1ex}%cstocs


\endinput
