%%
%% This is file `method.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% method.dtx  (with options: `method')
%% 
%% This is a generated file.
%% Copyright (C) 1997-1999 Thomas Leineweber, University of Dortmund.
%% 
%% This file may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
%% 
%% For error reports in case of UNCHANGED versions see the readme file.
%% 
%% Please do not request updates from me directly.  Distribution is
%% done through the Comprehensive TeX Archive Network (CTAN).
%% 
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{method}
              [1999/03/25 v2.0b
               LaTeX-package for method- and
               data-descriptions (TL)]

\newcounter{meth@paranum}
\newcounter{meth@headparanum}
\newlength{\meth@totwid}
\def\meth@indent{3.5cm}
\def\meth@listdecl{\labelwidth3cm \labelsep0.5cm
                   \itemindent0cm \leftmargin\meth@indent
                   \topsep0cm \listparindent0cm}
\newlength{\meth@righttotwid}
\newlength{\meth@namewid}
\newlength{\meth@nameindent}
\newlength{\meth@rightnamewid}
\DeclareOption{german}{\def\textsee{Siehe auch:}
                       \def\textinit{Erzeugung:}
                       \def\textdel{Freigabe:}
                       \def\textreturn{R\"uckgabewert:}
                       \def\textprecond{Vorbed.:}
                       \def\textpostcond{Nachbed.:}
                       \def\textdescr{Beschreibung:}
                       \def\texterror{Ausnahmebeh.:}}

\DeclareOption{english}{\def\textsee{see also:}
                       \def\textinit{initialisation:}
                       \def\textdel{disposal:}
                       \def\textreturn{return value:}
                       \def\textprecond{precondition:}
                       \def\textpostcond{postcondition:}
                       \def\textdescr{description:}
                       \def\texterror{exceptions:}}
\DeclareOption{french}{\def\textsee{voir aussi:}
                       \def\textinit{initialisation:}
                       \def\textdel{lib\'eration:}
                       \def\textreturn{valeur de retour:}
                       \def\textprecond{pr\'econdition:}
                       \def\textpostcond{postcondition:}
                       \def\textdescr{description:}
                       \def\texterror{exceptions:}}
\ExecuteOptions{english}
\ProcessOptions\relax
\newcount\meth@where  \meth@where=99
\def\meth@checkdoubleopen{
  \ifnum\meth@where<99
     \PackageError{method}%
       {There is an method.sty-environment open!}%
       {}
  \fi
}
\def\meth@checknotopen{
  \ifnum\meth@where=99
     \PackageError{method}%
       {There is no method.sty-environment open!}%
       {}
  \fi
}
\newenvironment{method}
{
  \meth@checkdoubleopen
  \meth@where=0
  \setlength{\meth@totwid}{\textwidth}
  \addtolength{\meth@totwid}{-6mm}
  \setlength{\meth@righttotwid}{\meth@totwid}
  \addtolength{\meth@righttotwid}{-\meth@indent}
  \sloppy
  \def\meth@head{}
  \def\meth@headtabbed{}
  \setcounter{meth@headparanum}{0}
   \def\meth@hpa{}\def\meth@hpb{}\def\meth@hpc{}\def\meth@hpd{}
   \def\meth@hpe{}\def\meth@hpf{}\def\meth@hpg{}\def\meth@hph{}
   \def\meth@hpi{}\def\meth@hpj{}\def\meth@hpk{}\def\meth@hpl{}
   \def\meth@hpm{}\def\meth@hpn{}\def\meth@hpo{}\def\meth@hpp{}
   \def\meth@hpq{}\def\meth@hpr{}\def\meth@hps{}\def\meth@hpt{}
   \def\meth@hpu{}\def\meth@hpv{}\def\meth@hpw{}\def\meth@hpx{}
   \def\meth@hpy{}\def\meth@hpz{}
  \setcounter{meth@paranum}{0}
   \def\meth@pa{}\def\meth@pb{}\def\meth@pc{}\def\meth@pd{}
   \def\meth@pe{}\def\meth@pf{}\def\meth@pg{}\def\meth@ph{}
   \def\meth@pi{}\def\meth@pj{}\def\meth@pk{}\def\meth@pl{}
   \def\meth@pm{}\def\meth@pn{}\def\meth@po{}\def\meth@pp{}
   \def\meth@pq{}\def\meth@pr{}\def\meth@ps{}\def\meth@pt{}
   \def\meth@pu{}\def\meth@pv{}\def\meth@pw{}\def\meth@px{}
   \def\meth@py{}\def\meth@pz{}
  \def\meth@precond{}
  \def\meth@descr{}
  \def\meth@postcond{}
  \def\meth@error{}
  \def\meth@return{}
  \def\meth@see{}
}{
  \parindent0cm
  \vspace{2mm}
  \meth@head\meth@headtabbed
  \nopagebreak[4]
  \meth@pa \meth@pb \meth@pc \meth@pd \meth@pe \meth@pf \meth@pg
  \meth@ph \meth@pi \meth@pj \meth@pk \meth@pl \meth@pm \meth@pn
  \meth@po \meth@pp \meth@pq \meth@pr \meth@ps \meth@pt \meth@pu
  \meth@pv \meth@pw \meth@px \meth@py \meth@pz
  \meth@precond
  \meth@descr
  \meth@postcond
  \meth@error
  \meth@return
  \meth@see
  \meth@where=99
}
\newenvironment{data}
{
  \meth@checkdoubleopen
  \meth@where=1
  \setlength{\meth@totwid}{\textwidth}
  \addtolength{\meth@totwid}{-6mm}
  \sloppy
  \def\meth@head{}
  \def\meth@descr{}
  \def\meth@init{}
  \def\meth@del{}
  \def\meth@see{}
}{
  \parindent0cm
  \vspace{2mm}
  \meth@head
  \nopagebreak
  \meth@descr
  \meth@init
  \meth@del
  \meth@see
  \meth@where=99
}
\newcommand{\head}[1]{
  \meth@checknotopen
  \ifnum\meth@where=0
    \def\meth@head{
      {\setlength{\fboxrule}{0.2mm}%
       \fbox{\parbox{\meth@indent}{\hfill}
             \begin{minipage}{\meth@righttotwid}
               {\parindent-\meth@indent \texttt{#1}}
             \end{minipage}
            }}
    }
  \fi%
  \ifnum\meth@where=1
    \def\meth@head{
      {\setlength{\fboxrule}{0.1mm}%
       \fbox{\hspace{2mm}\begin{minipage}{\meth@totwid}
         \texttt{#1}
       \end{minipage}}
      }
    }
  \fi%
}
\newcommand{\headtabbed}[1]{
  \meth@checknotopen
  \def\meth@headtabbed{
     \setlength{\fboxrule}{0.2mm}%
     \settowidth{\meth@namewid}{\texttt{#1}}%
     \setlength{\meth@rightnamewid}{\meth@totwid}
     \addtolength{\meth@rightnamewid}{-\meth@namewid}
     \setlength{\meth@nameindent}{\meth@namewid}
     \addtolength{\meth@nameindent}{2mm}
     \fbox{\parbox{\meth@nameindent}{\hfill}%
             \begin{minipage}{\meth@rightnamewid}
                \parindent-\meth@namewid
                \texttt{#1\meth@hpa
                  \meth@hpb
                  \meth@hpc
                  \meth@hpd
                  \meth@hpe
                  \meth@hpf
                  \meth@hpg
                  \meth@hph
                  \meth@hpi
                  \meth@hpj
                  \meth@hpk
                  \meth@hpl
                  \meth@hpm
                  \meth@hpn
                  \meth@hpo
                  \meth@hpp
                  \meth@hpq
                  \meth@hpr
                  \meth@hps
                  \meth@hpt
                  \meth@hpu
                  \meth@hpv
                  \meth@hpw
                  \meth@hpx
                  \meth@hpy
                  \meth@hpz}%
             \end{minipage}%
          }
  }
}
\newcommand{\meth@defheadpara}[1]{
  \ifcase\value{meth@headparanum}
    \def\meth@hpa{#1}  \or
    \def\meth@hpb{\\#1}  \or
    \def\meth@hpc{\\#1}  \or
    \def\meth@hpd{\\#1}  \or
    \def\meth@hpe{\\#1}  \or
    \def\meth@hpf{\\#1}  \or
    \def\meth@hpg{\\#1}  \or
    \def\meth@hph{\\#1}  \or
    \def\meth@hpi{\\#1}  \or
    \def\meth@hpj{\\#1}  \or
    \def\meth@hpk{\\#1}  \or
    \def\meth@hpl{\\#1}  \or
    \def\meth@hpm{\\#1}  \or
    \def\meth@hpn{\\#1}  \or
    \def\meth@hpo{\\#1}  \or
    \def\meth@hpp{\\#1}  \or
    \def\meth@hpq{\\#1}  \or
    \def\meth@hpr{\\#1}  \or
    \def\meth@hps{\\#1}  \or
    \def\meth@hpt{\\#1}  \or
    \def\meth@hpu{\\#1}  \or
    \def\meth@hpv{\\#1}  \or
    \def\meth@hpw{\\#1}  \or
    \def\meth@hpx{\\#1}  \or
    \def\meth@hpy{\\#1}  \or
    \def\meth@hpz{\\#1}  \or
    \PackageError{method}%
       {Too many parameters in method-environment !}{}
  \fi
  \stepcounter{meth@headparanum}
}
\newcommand{\headpara}[1]{
  \meth@checknotopen
  \meth@defheadpara{#1}
}
\newcommand{\meth@defpara}[1]{
  \ifcase\value{meth@paranum}
    \def\meth@pa{#1}  \or
    \def\meth@pb{#1}  \or
    \def\meth@pc{#1}  \or
    \def\meth@pd{#1}  \or
    \def\meth@pe{#1}  \or
    \def\meth@pf{#1}  \or
    \def\meth@pg{#1}  \or
    \def\meth@ph{#1}  \or
    \def\meth@pi{#1}  \or
    \def\meth@pj{#1}  \or
    \def\meth@pk{#1}  \or
    \def\meth@pl{#1}  \or
    \def\meth@pm{#1}  \or
    \def\meth@pn{#1}  \or
    \def\meth@po{#1}  \or
    \def\meth@pp{#1}  \or
    \def\meth@pq{#1}  \or
    \def\meth@pr{#1}  \or
    \def\meth@ps{#1}  \or
    \def\meth@pt{#1}  \or
    \def\meth@pu{#1}  \or
    \def\meth@pv{#1}  \or
    \def\meth@pw{#1}  \or
    \def\meth@px{#1}  \or
    \def\meth@py{#1}  \or
    \def\meth@pz{#1}  \or
    \PackageError{method}%
    {Too many parameters in method.sty-environment !}
  \fi
  \stepcounter{meth@paranum}
}
\newcommand{\para}[2]{
  \meth@checknotopen
  \meth@defpara{\begin{list}{\texttt{#1}}{\meth@listdecl}
    \item #2
    \end{list}}
}
\newcommand{\precond}[1]{
  \meth@checknotopen
  \def\meth@precond{\begin{list}{\textbf{\textprecond}}{\meth@listdecl}
    \item #1
    \end{list}}
}
\newcommand{\postcond}[1]{
  \meth@checknotopen
  \def\meth@postcond{\begin{list}{\textbf{\textpostcond}}{\meth@listdecl}
      \item #1
    \end{list}}
}
\newcommand{\descr}[1]{
  \meth@checknotopen
  \def\meth@descr{\begin{list}{\textbf{\textdescr}}{\meth@listdecl}
      \item #1
    \end{list}}
}
\newcommand{\error}[1]{
  \meth@checknotopen
  \def\meth@error{\begin{list}{\textbf{\texterror}}{\meth@listdecl}
      \item #1
    \end{list}}
}
\newcommand{\return}[1]{
  \meth@checknotopen
  \def\meth@return{\begin{list}{\textbf{\textreturn}}{\meth@listdecl}
    \item #1
    \end{list}}
}
\newcommand{\see}[1]{
  \meth@checknotopen
  \def\meth@see{\begin{list}{\textbf{\textsee}}{\meth@listdecl}
    \item #1
    \end{list}}
}
\newcommand{\init}[1]{
  \meth@checknotopen
  \def\meth@init{\begin{list}{\textbf{\textinit}}{\meth@listdecl}
    \item #1
    \end{list}}
}
\newcommand{\del}[1]{
  \meth@checknotopen
  \def\meth@del{\begin{list}{\textbf{\textdel}}{\meth@listdecl}
    \item #1
    \end{list}}
}
\endinput
%%
%% End of file `method.sty'.
