# Same identifier warnings with hyperref and nd3

I'm getting error messages when I combine hyperref and the nd3 package (for formatting logical deductions), e.g.

"pdfTeX warning (ext4): destination with the same identifier (name{@NDlines.1}) has been already used, duplicate ignored".

I'd like to fix the problem, so could anyone please help me find a way to revise the nd3 package or otherwise avoid generating the errors?

I see from other posts that other packages have similar problems in combination with hyperref, but I couldn't find anything that would help me here.

A MWE:

\documentclass[10pt]{book}
\usepackage{nd3}

\usepackage{hyperref}
\begin{document}

Blah

\begin{ND}
\ndl{}{P}{}
\end{ND}

Blah

\begin{ND}
\ndl{}{Q}{}
\end{ND}

Blah

\end{document}


You need to give hyperref an unique alternative representation for the line counter. E.g.

\documentclass[10pt]{book}
\usepackage{nd3}

\usepackage{hyperref}
\makeatletter
\newcommand\theH@NDlines
{\the@NDnumber.\the@NDlines}
\makeatother
\begin{document}

Blah

\begin{ND}
\ndl{}{P}{}
\end{ND}

Blah

\begin{ND}
\ndl{}{Q}{}
\end{ND}

Blah

\end{document}

• Hm. In my case \newcommand worked. Perhaps you have another version of this nd3-style. – Ulrike Fischer Feb 11 '16 at 13:16