%%
%% This is file `sublabel.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% sublabel.dtx  (with options: `package')
%% =============================================
%% IMPORTANT NOTICE:
%% 
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
%% 
%% This is a generated file.
%% It may not be distributed without the original source file sublabel.dtx.
%% 
%% Full documentation can be obtained by LaTeXing that original file.
%% Only a few abbreviated comments remain here to describe the usage.
%% =============================================
%% Copyright 1993-1999 Patrick W Daly
%% Max-Planck-Institut f\"ur Aeronomie
%% Max-Planck-Str. 2
%% D-37191 Katlenburg-Lindau
%% Germany
%% E-mail: daly@linmpi.mpg.de
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{sublabel}
       [1999/02/23 4.5 (PWD)]
 % To change a counter foo so that it has sublabels (4a 4b 4c ...)
 % give the command \sublabon{foo}... \sublaboff{foo}
 %
 % The style of the sublabel is given by command \substyle, which takes one
 % argument, a counter. It may be redefined in the document to be whatever
 % style is wanted.
 % Default is {\itshape\alph{#1}}, ie italic lowercase numbers.
 %
 % Options for LaTeX2e:
 %   roman   the style of sublabels is small roman letter
 %   italic  the style is small italic letter (default)
 %-----------------------------------------------------------
\@ifundefined{iffigcaps}{}
  {\PackageWarningNoLine{sublabel}
     {***********************************\MessageBreak
      This package read in after `figcaps'\MessageBreak
      There could be problems with sublabelled\MessageBreak
      figure and table numbers.\MessageBreak
      ***********************************}}
\newcommand{\substyle}{}
  \DeclareOption{italic}{\def\substyle#1{\itshape\alph{#1}}}
  \DeclareOption{roman}{\def\substyle#1{\alph{#1}}}
  \ExecuteOptions{italic}
  \ProcessOptions
\newcommand{\sublabon}[1]{\@bsphack
\@ifundefined{c@#1}{%
    \PackageError{sublabel}
  {\protect\sublabon\space called for a non-existent counter}{\@eha}}
 {\@ifundefined{c@sb@#1}{\expandafter\newcount\csname c@sb@#1\endcsname
  \setcounter{sb@#1}{-1}}{}%
\ifnum\@nameuse{c@sb@#1}<0\else\sublaboff{#1}\fi
\stepcounter{#1}%
\setcounter{sb@#1}{0}%
\def\@tempa{eqnarray}\ifx \@tempa\@currenvir
    \addtocounter{equation}{-1}\setcounter{sb@equation}{1}\fi
\global\expandafter\let\csname @ldthe#1\expandafter\endcsname
    \csname the#1\endcsname
\expandafter\gdef\csname the#1\endcsname{%
   \@nameuse{@ldthe#1}{\substyle{sb@#1}}}
}\@esphack}
\newcommand{\sublaboff}[1]{\@bsphack
\@ifundefined{c@#1}{%
    \PackageError{sublabel}
  {\protect\sublaboff\space called for a non-existent counter}{\@eha}}
 {\@ifundefined{c@sb@#1}{%
    \PackageWarning{sublabel}
 {\protect\sublaboff{#1} called without any previous
    \MessageBreak
  \protect\sublabon{#1} command}}
 {\ifnum\@nameuse{c@sb@#1}<0
    \PackageWarning{sublabel}
 {\protect\sublaboff{#1} called without a previous
    \MessageBreak
  \protect\sublabon{#1} command being active}\else
\ifnum\@nameuse{c@sb@#1}=0\addtocounter{#1}{-1}\fi
\setcounter{sb@#1}{-1}%
\global\expandafter\let\csname the#1\expandafter\endcsname
    \csname @ldthe#1\endcsname
\def\@tempa{eqnarray}\ifx \@tempa\@currenvir
    \stepcounter{equation}\fi
\fi}}\@esphack}
\AtBeginDocument{%
\let\@ldstepcounter=\stepcounter
\renewcommand{\stepcounter}[1]
 {\@ifundefined{c@sb@#1}{\@ldstepcounter{#1}}{\ifnum
  \@nameuse{c@sb@#1}<0\relax
  \@ldstepcounter{#1}\else \@ldstepcounter{sb@#1}\fi}%
}
\let\@ldaddtoctr=\addtocounter
\renewcommand{\addtocounter}[2]
 {\@ifundefined{c@sb@#1}{\@ldaddtoctr{#1}{#2}}{\ifnum
  \@nameuse{c@sb@#1}<0\relax
  \@ldaddtoctr{#1}{#2}\else \@ldaddtoctr{sb@#1}{#2}\fi}%
}
\let\@ldendeqnarray=\endeqnarray
\renewcommand{\endeqnarray}{\@ldendeqnarray
  \@ifundefined{c@sb@equation}{}{\ifnum\c@sb@equation<0\else
  \@ldaddtoctr{equation}{1}\@ldaddtoctr{sb@equation}{-1}\fi}}
}
%% 
%% <<<<< End of generated file <<<<<<
%%
%% End of file `sublabel.sty'.
