当我在回忆录中使用 hyperref 并点击目录中的参考书目链接时,我跳转到以下行略低于参考书目。(此行为与单击目录中的其他章节时的行为不同。)我该如何调整?这是 MWE。
\documentclass{memoir}
\usepackage[dvipdfmx]{hyperref}
\begin{document}
\frontmatter
\tableofcontents*
\mainmatter
\chapter{Main Body}
We all are on the sholders of giants~\cite{T}.
\backmatter
\begin{thebibliography}{9}
\bibitem{T} S.~Tand, On the sholders of giants, (2017).
\end{thebibliography}
\end{document}
答案1
memoir
插入了不必要的 \phantomsection,导致链接目标下移。我认为这是一个应该报告的错误。解决方法是:
\documentclass{memoir}
\usepackage{xpatch}
\makeatletter
\xpatchcmd\@memb@bchap{\phantomsection}{}{}{\fail}
\makeatother
\usepackage[dvipdfmx]{hyperref}
\begin{document}
\frontmatter
\tableofcontents*
\mainmatter
\chapter{Main Body}
We all are on the sholders of giants~\cite{T}.
\backmatter
\begin{thebibliography}{9}
\bibitem{T} S.~Tand, On the sholders of giants, (2017).
\end{thebibliography}
\end{document}