[Tex/LaTex] Hyperref, bibentry & natbib conflict – incorrect hyperlink

bibentryhyperrefnatbib

Problem

I want to cite references in text as well as quote the entire entry plus have a reference list at the end. For this I use hyperref, bibentry and natbib. I've taken as inspiration this post. The only difference is that I want to include a reference list as well.

The problem is that the hyperlink points to the \bibentry rather than the entry in the reference.

MWE

\documentclass{article}
\usepackage{natbib}
\bibliographystyle{abbrvnat}

\usepackage{bibentry}
\makeatletter\let\saved@bibitem\@bibitem\makeatother
\usepackage{hyperref}
\makeatletter\let\@bibitem\saved@bibitem\makeatother

\begin{document}
\nobibliography*
Here is a citation \citet{elvis}
%\newpage %uncomment this line and the line below eliminates error but hyperlink still points to \bibentry

Here is the full entry \bibentry{elvis}
%\newpage %uncomment this line 

\bibliography{bibliography}
\end{document}

The bib file, bibliography.bib

@Book{elvis,
    author = "Elvis Presley",
    title = "Turn Me One More Time",
    publisher = "Jail House Books",
    year = 1963,
}

Warning

The above code gives a warning:

destination with the same identifier (name{cite.elvis}) has been already used, duplicate ignored

Solution?

  • Interestingly, adding \newpages to split up the \citet and \bibentry onto separate pages eliminates the warning but the hyperlinking is still wrong.
  • Removing natbib but again hyperlinking does not work.

Does anybody have any ideas how I can solve this problem?

Best Answer

Wrap the \bibentry in NoHypers i.e.

\begin{NoHyper}\bibentry{elvis}\end{NoHyper}

The hyperlink now points to the correct entry in the references.