ERROR: pdfTeX warning (ext4): destination with the same identifier (name{figure.1})

Using Hyperref, Graphicx, and Algorithm together | Shawn Lankton Online

In LaTeX, the hyperref package can be challenging to work with. It is well known that the hyperref package must be loaded last, BUT when using the algorithm package as well things get tricky. algorithm must be loaded after hyperref BUT, doing the following error if figures are used at the same time with pdfTeX:

ERROR: pdfTeX warning (ext4): destination with the same identifier (name{figure.1})

The solution is to load the float package (which is normally loaded by other more high-level packages) before hyperref like so:

\usepackage{amsmath,amsymb,graphicx,subfigure,etc.,etc.}
\usepackage{float}
\usepackage{hyperref}
\usepackage{algorithm}

The other solution is to not use pdfLaTeX, and use regular LaTeX instead.

原文地址:https://www.cnblogs.com/sunleecn/p/3041504.html