%%
%% This is file `abstract.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% abstract.dtx  (with options: `usc')
%% 
%% -----------------------------------------------------------------
%%   Author: Peter Wilson (CUA) now at peter.r.wilson@boeing.com until June 2004
%%                              (or at: pandgwilson at earthlink dot net)
%%   Copyright 2000 --- 2004 Peter R. Wilson
%% 
%%   This work may be distributed and/or modified under the
%%   conditions of the LaTeX Project Public License, either
%%   version 1.3 of this license or (at your option) any
%%   later version.
%%   The latest version of the license is in
%%      http://www.latex-project.org/lppl.txt
%%   and version 1.3 or later is part of all distributions of
%%   LaTeX version 2003/06/01 or later.
%% 
%%   This work has the LPPL maintenance status "author-maintained".
%% 
%%   This work consists of the files listed in the README file.
%% -----------------------------------------------------------------
%% 
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{abstract}[2001/02/11 v1.1 configurable abstracts]

\newif\if@bsonecol
  \@bsonecoltrue
\newif\ifadd@bstotoc
  \add@bstotocfalse
\newif\ifnumber@bs
  \number@bsfalse
\newif\if@bsrunin
  \@bsruninfalse

\DeclareOption{original}{\@bsonecolfalse}
\DeclareOption{addtotoc}{\add@bstotoctrue}
\DeclareOption{number}{\number@bstrue}
\DeclareOption{runin}{\@bsrunintrue}
\ProcessOptions\relax
\if@bsrunin\number@bsfalse\fi

\newcommand{\abstractnamefont}{\normalfont\small\bfseries}
\newcommand{\abstracttextfont}{\normalfont\small}

\newcommand{\absnamepos}{center}
\newlength{\abstitleskip} \setlength{\abstitleskip}{-0.5em}
\newlength{\absleftindent}
\newlength{\absrightindent}
\newlength{\absparindent}
\newlength{\absparsep}

\newcommand{\abslabeldelim}[1]{\def\@bslabeldelim{#1}}
\abslabeldelim{}
\newcommand{\@bsrunintitle}{%
  \hspace*{\abstitleskip}{\abstractnamefont\abstractname\@bslabeldelim}}

\if@titlepage
  \setlength{\absleftindent}{\z@}
  \renewcommand{\abstractnamefont}{\normalfont\bfseries}
  \renewcommand{\abstracttextfont}{\normalfont}
  \setlength{\abstitleskip}{0em}
\else
  \if@twocolumn
    \if@bsonecol
      \setlength{\absleftindent}{\leftmargin}
    \else
      \setlength{\absleftindent}{\z@}
      \renewcommand{\abstractnamefont}{\normalfont\Large\bfseries}
      \renewcommand{\abstracttextfont}{\normalfont}
      \renewcommand{\absnamepos}{flushleft}
      \setlength{\abstitleskip}{0em}
    \fi
  \else
    \setlength{\absleftindent}{\leftmargin}
  \fi
\fi
\setlength{\absrightindent}{\absleftindent}
\AtBeginDocument{\setlength{\absparindent}{\parindent}
                 \setlength{\absparsep}{\parskip}}

\newenvironment{@bstr@ctlist}{%
  \list{}{%
          %%\topsep        \z@
          \partopsep     \z@
          \listparindent \absparindent
          \itemindent    \listparindent
          \leftmargin    \absleftindent
          \rightmargin   \absrightindent
          \parsep        \absparsep}%
  \item\relax}
  {\endlist}

\newcommand{\put@bsintoc}{%
  \ifadd@bstotoc
    \ifnumber@bs\else
      \@ifundefined{chapter}{\addcontentsline{toc}{section}{\abstractname}}{%
                             \addcontentsline{toc}{chapter}{\abstractname}}
    \fi
  \fi}

\newcommand{\num@bs}{%
  \@ifundefined{chapter}{\section{\abstractname}}{%
                         \chapter{\abstractname}}
}

\if@titlepage
  \renewenvironment{abstract}{%
    \titlepage
    \null\vfil
    \@beginparpenalty\@lowpenalty
    \if@bsrunin\else
      \ifnumber@bs \num@bs \else
        \begin{\absnamepos}%
          \abstractnamefont \abstractname
          \@endparpenalty\@M
        \end\absnamepos%
        \vspace{\abstitleskip}%
      \fi
    \fi
    \put@bsintoc%
    \begin{@bstr@ctlist}\if@bsrunin\@bsrunintitle\fi\abstracttextfont}%
    {\par\end{@bstr@ctlist}\vfil\null\endtitlepage}
\else
  \renewenvironment{abstract}{%
    \if@bsrunin\else
      \ifnumber@bs \num@bs \else
        \begin{\absnamepos}\abstractnamefont\abstractname\end\absnamepos%
        \vspace{\abstitleskip}%
      \fi
    \fi
    \put@bsintoc%
    \begin{@bstr@ctlist}\if@bsrunin\@bsrunintitle\fi\abstracttextfont}%
    {\par\end{@bstr@ctlist}}
\fi

\newenvironment{onecolabstract}{%
  \begin{@twocolumnfalse}\begin{abstract}}{%
  \end{abstract}\end{@twocolumnfalse}}

\providecommand{\appendiargdef}[2]{\begingroup
  \toks@\expandafter{#1{##1}#2}%
  \edef\@bsx{\endgroup \def\noexpand#1####1{\the\toks@}}%
  \@bsx}

\appendiargdef{\thanks}{%
  \protected@xdef\@bs@thanks{\@bs@thanks
    \protect\footnotetext[\the\c@footnote]{#1}}%
}
\let\@bs@thanks\@empty

\newcommand{\saythanks}{\begingroup
  \renewcommand{\thefootnote}{\fnsymbol{footnote}}\@bs@thanks
  \endgroup\global\let\@bs@thanks\@empty}

\endinput
%%
%% End of file `abstract.sty'.
