I am working on a thesis that has a bibliography per chapter using natbib and bibunits. Some citations appear in different chapters. hyperref appears to always link to the page of the first occurrence of the specific label. How can I make sure that hyperref 'knows' that it should instead link to the specific reference in the chapter-specific bibliography?
A minimum working example that reproduces these errors:
% main.tex
\documentclass{book}
\usepackage[sort&compress,numbers,sectionbib]{natbib}
\usepackage[globalcitecopy]{bibunits}
\usepackage{hyperref}
\bibliographyunit[\chapter]
\defaultbibliographystyle{plain}
\defaultbibliography{bibliography}
\begin{document}
\include{chapter1}
\include{chapter2}
\end{document}
% chapter1.tex
\chapter{}
\citep{article}
\putbib
% chapter2.tex
\chapter{}
\citep{article}
\putbib
% bibliography.bib
@article{article,
author={Dummy},
title={Dummy},
year={2021},
journal={Dummy}
}
For example, just adding
– Johannes Nauta Oct 11 '21 at 19:12\tableofcontentsabove the chapters in the example generates hyperlinks to the wrong pages in the TOC.