

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{twlt}
              [2000/03/08 v1.1
		TWLT LaTeX document class]

\LoadClass[a4paper]{article}

% Declare a new if for lap citation style:
\newif\if@lapcitestyle

% The class options.
% lap = use the lap citation style, i.e. \cite gives normal
% citation like Doe (1980) and \cite* gives only the year.

\DeclareOption{lap}
        {\@lapcitestyletrue}
\DeclareOption{nolap}
        {\@lapcitestylefalse}

% Default: no lap citation style:
%\ExecuteOptions{nolap}

% Execute the code of the options:
\ProcessOptions

% Some includes and definitions
\usepackage{epsfig}
\usepackage{natbib}
\usepackage{a4wide}

\pagestyle{empty}
\let\oldmaketitle\maketitle
\renewcommand\maketitle{\oldmaketitle\thispagestyle{empty}}
\date{}
\bibliographystyle{apalike}

% If the lap citation style is to be used:
\if@lapcitestyle
        % Give a warning that this option is active:
        \ClassWarning{twlt}{Using 'lap' citition style + jh}

        % Rename \oldcite to \cite:
        %\let\oldcite\cite

        % If a star is given, \cite is \citeyear, otherwise it is \oldcite:
        \renewcommand\cite{\@ifstar{\citeyear}{\citealt}}
\fi

\sloppy
\def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus
    -.2ex}{0.5ex plus .2ex}{\large\sc}}
\def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus
    -.2ex}{0.2ex plus .2ex}{\large\sc}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus -1ex minus
    -.2ex}{0.2ex plus .2ex}{\normalsize\sc}}

% Adapted from 'article.cls' to prevent indentation in abstract:
\newenvironment{quotationNoIndent}{
  \list{}{
    \listparindent 0em                % This is all I changed
    \itemindent    \listparindent
    %\advance\leftmargin 1cm          % Add to make the abstract less wide
    \rightmargin   \leftmargin
    \parsep        \z@ \@plus\p@
  }
  \item\relax
}{
  \endlist
}
\renewenvironment{abstract}{
  \small
  \begin{center}
     {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}
  \end{center}
  \quotationNoIndent                  % Was: \quotation
}{
  \endquotationNoIndent               % Was: \quotation
}
\endinput
%%
%% End of file `twlt.cls'.
