5

When compiling my text document, I get the following warning:

[5] [6] [7pdfTeX warning (ext4): destination with the same identifier (name{equ
ation.2.0.10}) has been already used, duplicate ignored

\AtBegShi@Output ...ipout \box \AtBeginShipoutBox 
                                              \fi \fi 
l.210     \end{equation}

A quick google search reveals that this is a problem hyperref has with suppressed equation numbers: It suggests using

\begin{align*} ... \end{align*}

instead of

\begin{align} ... \notag \end{align}

Which has the same visual effect of not displaying an equation number. So far, so good. But what if I want to have an equation number for the last line of my align-environment, and only suppress the numbering of all the preceding lines?

I'm also confused about this warning occurring only once, although I use \notag all the time.

Here is a minimal example:

\documentclass{report}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}

\usepackage[pdftex, colorlinks=true,bookmarksnumbered=true]{hyperref}
\usepackage{amsmath}

\usepackage[hyperref, amsmath, thmmarks]{ntheorem}

\begin{document}
  \begin{equation}
    \begin{split}
        (a+b)^2 = \\
        a^2 + 2ab + b^2
    \end{split}
  \end{equation}
\end{document}

The offending package is ntheorem and the offending command is the split environment if I remove either of the, I get no warning any more.

  • I couldn't reproduce this. Please add a minimal working example (MWE) that illustrates your problem. – Lev Bishop Apr 17 '11 at 19:41
  • 1
    if you want only one number on an aligned display, and you are using amsmath, you can use the aligned substructure within equation to get only a single number. then you don't need \notag at all. – barbara beeton Apr 17 '11 at 20:09
  • @Barbara Beeton Thank you. I know about this; however, in this case the number gets centered with respect to the entire equation. I'd rather have it at the bottom. – Lagerbaer Apr 17 '11 at 22:37
  • @Lev Bishop I will try to get a MWE. – Lagerbaer Apr 17 '11 at 22:37
  • When you want only one number on the last line of an aligned display, you usually use the align env with \nonumber. That's the standard practice, I think. If hyperref complains about it, either hyperref or align should be fixed, I guess. Or perhaps amsmath should include another version of align that gives a number only to the last line. Or perhaps \nonumber should be fixed to cooperate with hyperref. – Ryo Mar 10 '18 at 3:30
4

At least for your minimal example, it's enough to replace equation environment with gather. As the hyperref readme says: \let\equation\gather \let\endequation\endgather. Also you should load hyperref after amsmath (usually hyperref should be the last package loaded, but ntheorem is special and should come after).

  • Thanks. I did play around with order in which the packages were loaded; this did not remove the error. Your advise, however, does the trick. – Lagerbaer Apr 18 '11 at 1:12

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.