2

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}
1

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}
  • I had to change \newcommand to \renewcommand, but then this solution worked brilliantly. Thank you!!! – ephraim Feb 11 '16 at 13:13
  • Hm. In my case \newcommand worked. Perhaps you have another version of this nd3-style. – Ulrike Fischer Feb 11 '16 at 13:16

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.