5

When I use IEEEeqnarray subnumbering and the hyperref package, hyperrefs to the subnumbered equations work fine; but if I try to reference the group of equations, the label is not found.

Example document:

\documentclass[12pt]{report}
\usepackage{IEEEtrantools}
\usepackage{hyperref}

\begin{document}
When I create an IEEEeqnarray with subequation numbering and try to point back to the group of equations, the hyperrefs are broken.

\newpage

\begin{IEEEeqnarray}{rCl}\label{eqn:FirstParentLabel}
f(x) &=& 5x \IEEEyesnumber\IEEEyessubnumber\label{eqn:FirstSubeqnLabel}
\end{IEEEeqnarray}

\begin{IEEEeqnarray}{rCl}\IEEEyesnumber\label{eqn:SecondParentLabel}
g(x) &=& \pi \IEEEyesnumber\IEEEyessubnumber\label{eqn:SecondSubeqnLabel}
\end{IEEEeqnarray}

\begin{IEEEeqnarray}{rCl}
h(x) &=& 42 \IEEEyesnumber\label{eqn:ThirdParentLabel}\IEEEyessubnumber\label{eqn:ThirdSubeqnLabel}
\end{IEEEeqnarray}

\begin{IEEEeqnarray}{rCl}
k(x) &=& C \label{eqn:FourthLabel}
\end{IEEEeqnarray}

\newpage

References to subequations work: \ref{eqn:FirstSubeqnLabel},\ref{eqn:SecondSubeqnLabel}, and \ref{eqn:ThirdSubeqnLabel}.  But references to groups of equations do not work: \ref{eqn:FirstParentLabel}, \ref{eqn:SecondParentLabel}, and \ref{eqn:ThirdParentLabel}.  If I don't use subnumbering everything works fine: \ref{eqn:FourthLabel}.

\end{document}

I'm using TexLive 2012 and the most recent version of IEEEtrantools.sty. Compiler error messages are emitted: pdfTeX warning (dest): name{equation.0.0.3} ha s been referenced but does not exist, replaced by a fixed one

pdfTeX warning (dest): name{equation.0.0.2} has been referenced but does not ex ist, replaced by a fixed one

pdfTeX warning (dest): name{equation.0.0.1} has been referenced but does not ex ist, replaced by a fixed one

Any ideas why this would be? I can't think of any more permutations on the attempts shown above. Thanks!

5

Place a definitive marker - \phantomsection - after every \IEEEyesnumber in order to mark the appropriate hypertarget:

\begin{IEEEeqnarray}{rCl}\IEEEyesnumber\phantomsection\label{eqn:FirstParentLabel}
f(x) &=& 5x \IEEEyessubnumber\label{eqn:FirstSubeqnLabel}
\end{IEEEeqnarray}

\begin{IEEEeqnarray}{rCl}\IEEEyesnumber\phantomsection\label{eqn:SecondParentLabel}
g(x) &=& \pi \IEEEyessubnumber\label{eqn:SecondSubeqnLabel}
\end{IEEEeqnarray}

\begin{IEEEeqnarray}{rCl}\IEEEyesnumber\phantomsection\label{eqn:ThirdParentLabel}
h(x) &=& 42 \IEEEyessubnumber\label{eqn:ThirdSubeqnLabel}
\end{IEEEeqnarray}

\begin{IEEEeqnarray}{rCl}
k(x) &=& C \label{eqn:FourthLabel}
\end{IEEEeqnarray}

\IEEEyessubnumber will override the use of \IEEEyesnumber in terms of the label display. However, at this point, the \phantomsection placement has already established an appropriate (different) hypertarget than what will follow with the sub-equation \label.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.