[pdftex] Automatic custom equation numbers, hyperref and \ref*

Victor Ivrii vivrii at gmail.com
Tue Feb 21 15:48:54 CET 2006


On 2/21/06, Heiko Oberdiek <oberdiek at uni-freiburg.de> wrote:
> On Tue, Feb 21, 2006 at 06:19:27AM -0500, Victor Ivrii wrote:
>
> > I have equation which is numbered automatically, currently as (2.12)
> > (for example)
> > and labeled by \label{A}.
> >
> > Now, I want to create equation numbered as (2.12)^* and changing its
> > number automatically as number of equation labeled by A changes.
> > The logical and working construction is
> > \begin{equation}
> > 1+1=2
> > \tag*{$(\ref{A})^*$}
> > \label{B}
> > \end{equation}
> >
> > however with hyperref it would create a nested hyperlink which behaves
> > in funny way:
> >
> > (\ref{B}) blah-blah-blah
> >
> > looks as (2.12)^* blah-blah-blah  and (2.12)^* is clickable (a correct
> > link) but blah-blah-blah becomes clickable too with the link to the
> > first page.
>
> A minimal example would have shown your problem, e.g. about
> warnings about already defined destinations.

Well, I found some warnings of this type

! pdfTeX warning (ext4): destination with the same identifier (name{equation.2.
14}) has been already used, duplicate ignored

\@EveryShipout at Output ... at Org@Shipout \box \@cclv


but it is about very innocent equation rather than with the one I used
of this type


>
> I wouldn't use equation and eqnarray with amsmath. Because of
> compatibility issues they aren't too well supported.

Ouch! What about multline, align and split? while it is easy to
substitute {equation}
with {gather} there seem to be no easy substitution for other.


>
> \begin{gather}
> 1+1=2
> \tag*{$(\ref*{A})^*$}
> \label{B}
> \end{gather}

Well, I found the reason why \ref* did not work as promised:
incompatibility with {showkeys} package which is not a big deal since showkeys
is used only in the process of preparation.

This eliminates one part of the problem.

>
> or (references aren't math)
>
> \tag*{(\ref*{A})\textsuperscript{\textasteriskcentered}}
>
> Yours sincerely
>   Heiko <oberdiek at uni-freiburg.de>


However, if I type

\begin{multline}     % It was actually multline
1+1=2
\label{A}
\end{multline}

and then

\begin{multline}     % It was actually multline
1+2=3
\tag*{(\ref*{A})\textsuperscript{\textasteriskcentered}}
\label{B}
\end{multline}

and then

(\ref{B}) blah-blah-blah

then everything is printinted fine but  (2.12)^*   is linked to the
first page, not to
the actual equation \label{B} [exactly the same effect in the mathmode]

However if I replace \ref*{A} by \ref{A} in the tag, again  everything
is printinted fine,
and  (2.12)^*   is linked to the correct equation but appears a
parasite link: from blah-blah-blah (until the end of the outputline)
to the first page.


Thank you very much
                                                                    Victor


PS In completely different topic and in the response to the third
person you mentioned attachfile2. I am rather interested in it




> --
>
> _______________________________________________
> pdftex mailing list
> pdftex at tug.org
> http://tug.org/mailman/listinfo/pdftex
>


--
========================
Victor Ivrii, Department of Mathematics, University of Toronto



More information about the pdftex mailing list