[Tugindia] Problem with amsmath and varioref.

S. venkataraman tugindia@tug.org
Wed, 8 Jan 2003 09:51:53 +0530


Hi,
I have a problem using amsmath with varioref package. 
I have given the code that gives the problem. I am using the version 
of varioref that was updated in sep. 2001, i.e. the latest one.
As far as I can see, I am not doing anything wrong.  It gives the
following amsmath error:

! Package amsmath Error: Multiple \label's: label '4@vr' will be lost.

See the amsmath package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                      
                                          
l.18 ...rm{using eqn.(\vref{eq-11})}\label
                                          {eq-12}

This works fine if I replace equation by eqnarray. I couldn't find 
anything in the documentation about this error. I downloaded the 
latest version from CTAN very recently and installed it.
Best regards,
Venkataraman.
%%%%%%%%%%%%%%%%%%%beginning of the file%%%%%%
\documentclass{article}
\newcommand{\Voo}{V_{11}}
\newcommand{\Vot}{V_{12}}
\newcommand{\Vto}{V_{21}}
\newcommand{\Vtt}{V_{22}}
\newcommand{\Vth}{V_{23}}
\newcommand{\Vho}{V_{31}}
\newcommand{\Vht}{V_{32}}
\newcommand{\vt}[1]{\ensuremath{V_{#1}}}
\usepackage{amsmath}
\usepackage{varioref}
\begin{document}
\begin{eqnarray}
f\left(\vt{12}\right)&=&\min\left\{8+f\left(\vt{22}\right),12+f\left(\vt
{23}\right)\right\}\nonumber\\
&=&\min\left\{8+15,12+17\right\}=23\label{eq-11}
\end{eqnarray}
%The troublesome part.  Works fine if I use eqnarray instead of
equation.
\begin{equation}f\left(\vt{31}\right)=8\textrm{ and }
  f\left(\vt{32}\right)=12\textrm{using eqn.(\vref{eq-11})}\label{eq-12}
\end{equation} 
\end{document}