% newequation.sty
%
% 12 Jan 91  Created.
%            clayton@thumper.bellcore.com
%
% newequation.sty defines the \newequation command, which defines
% new equation environments.  The command format is
%
%    \newequation{name}{format}
%
% where "name" is the name of the new equation environment and "format"
% is the format of the equation number.  For example,
%
%    \newequation{define}{(D\arabic{define})}
%
% The new environment follows Latex's numbered sections convention:
% there's a counter called "name" and a command called \the"name" with
% "format" as its initial definition.  See section 5.3 in the Latex
% user's guide for more on numbering.

\def \newequation#1#2{
   \@definecounter{#1}
   \@namedef{the#1}{\hbox{#2}}
   \@namedef{#1}{$$\refstepcounter{#1}}
   \@namedef{end#1}{
      \eqno \csname the#1\endcsname $$\global\@ignoretrue
      }
   }
