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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .