\ProvidesFile{rnt-eqnarray.sty}
                [2005/03/21 v0.1a]
%This package provides support for Eqnarray environment, which is
%equivalent to the classical eqnarray version. The difference 
%between these two versions are that equation numbers in Eqnarray
%always start from 1, and are always in the plain style (even
%in case that equation numbers are defined to be dependend from
%the section, or subsection.)
%
%Sample usage:
%
% \begin{Eqnarray}
% 1 + 1 & = & 2 \label{myequation}
% \end{Eqnarray}
% The equation (\ref{myequation}) shows us
%
% produces
%
%         1 + 1 = 2 (1)
% The equation (1) shows us
%
              
%new counter for Eqnarray numbers
\newcounter{eqnarray@priklad}
\newenvironment{Eqnarray}{
  \setcounter{eqnarray@priklad}{0}
  \stepcounter{eqnarray@priklad}
  %redefine equationnumber
  \def\@eqnnum{{\normalfont \normalcolor (\arabic{eqnarray@priklad})}} 

\def\@@eqncr{%
    \let\reserved@a\relax
    \ifcase\@eqcnt \def\reserved@a{& & &}\or \def\reserved@a{& &}%
     \or \def\reserved@a{&}\else
       \let\reserved@a\@empty
       \@latex@error{Too many columns in eqnarray environment}\@ehc\fi
     \reserved@a \if@eqnsw\@eqnnum\stepcounter{eqnarray@priklad}\fi %step appropriate counter here
     \global\@eqnswtrue\global\@eqcnt\z@\cr}
  %
  % redefine \label
  \let\LaTeX@label=\label %preserve original Label
  %we have to manually replace \@currentlabel, which is responsible for
  %putting correct equation into the AUX file.
  \def\label##1{\def\@currentlabel{\arabic{eqnarray@priklad}}\LaTeX@label{##1}} 
  \begin{eqnarray}
}
{\end{eqnarray}}
                
               
\endinput                
