# Named Equations with cleveref

I have a strange problem, where using a tag with an equation creates a warning (that obviously later leads to some unwanted behavior, though not in the context of this question)

I use to import two files, containing equations

main.text content:

\documentclass{article}

\usepackage{amsmath}
\usepackage{standalone}
\usepackage{import}

\usepackage{hyperref}
\usepackage{cleveref}

\begin{document}
\import{.}{first}
\import{.}{second}
\end{document}


first.tex content:

\documentclass{article}

\usepackage{amsmath}
\usepackage{import}

\begin{document}
$$B > A\tag{B_2}% \label{eq:B_2}$$
\end{document}


second.tex context:

\documentclass{article}

\usepackage{amsmath}
\usepackage{import}

\begin{document}
$$A = B \label{eq:C_1}$$
\end{document}


The warning looks like

pdfTeX warning (ext4): destination with the same identifier (name{equation.0.1} ) has been already used, duplicate ignored ...shipout:D \box_use:N \l_shipout_box _shipout_drop_firstpage... l.13 \end{document}

It appears in connection with using \tag, hyperref and cleveref. Dropping any one of the three removes the problem.

I'm at;

This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.3) (preloaded format=pdflatex 2022.3.16)

Not really sure, but I think the problem was non-existent on 10/2021.

What is the problem? And how should I address it?

• Probably a duplicate of tex.stackexchange.com/questions/488299/… May 12, 2022 at 7:16
• or even tex.stackexchange.com/questions/54728/… (this one have a simple solution to use starred-equation environment) May 12, 2022 at 7:24
• a starred equation would avoid the problem but would also not create a destination so you couldn't link to it. I would use Marijn's solution and prepend a counter. May 12, 2022 at 8:32
• @UlrikeFischer, I have a link in my document (it is though few lines apart from the equation), and it seems to take control to the equation. Which link do you refer to? May 12, 2022 at 8:39
• sorry I meant you don't get a target if you used a starred equation without tag. May 12, 2022 at 10:23