在以下 MWE 中,目录中的参考书目条目链接到第 3 页,而不是参考书目所在的第 5 页。
如果我先\printbibliography
然后\addcontentsline
,那么目录中的条目链接到参考书目的最后一页(这在 MWE 中很难放进去,但请参阅另一个问题和第一个回复
(如果我省略\cleardoublepage
,则目录条目将显示错误的页面并链接到错误的页面)
\documentclass{book}
\usepackage{blindtext}
\usepackage{hyperref}
\usepackage{biblatex}
\addbibresource{library.bib}
\begin{document}
\tableofcontents
\chapter{Test}
\cite{Kullback1997}.
\blindtext
\cleardoublepage
\addcontentsline{toc}{chapter}{\bibname}
\printbibliography
\end{document}
和.bib 文件:
@Book{Kullback1997,
Title = {Information Theory and Statistics},
Author = {Kullback, S.},
ISBN = {9780486696843},
Publisher = {Dover Publications},
Series = {A Wiley publication in mathematical statistics},
URL = {https://books.google.com.sa/books?id=05LwShwkhFYC},
Year = {1997},
__markedentry = {[wolfersf:6]},
Lccn = {97014382}
}
答案1
您必须添加一个\phantomsection
as 锚点。但更好的方法是使用 biblatex 工具:
\documentclass{book}
\usepackage{blindtext}
\usepackage{hyperref}
\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
\tableofcontents
\chapter{Test}
\cite{doody}.
\blindtext
%\cleardoublepage
%\phantomsection
%\addcontentsline{toc}{chapter}{\bibname}
\printbibliography[heading=bibintoc]
\end{document}