反向引用的页码已打印,但超链接未打印。出了什么问题?

反向引用的页码已打印,但超链接未打印。出了什么问题?

我使用的是 natbibapa 环境,采用 apacite 样式。我希望反向引用超链接出现在每个引用末尾的括号之间。以下是代码...

\documentclass[12pt,a4paper,twoside]{report}
\usepackage{a4wide}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{xcolor}

\usepackage[natbibapa]{apacite}
\usepackage[colorlinks=true,linktocpage=true,pagebackref=true]{hyperref}
\hypersetup{linkcolor=purple,citecolor=brown,urlcolor=blue}

\let \backreforig \backref
\renewcommand*{\backref}[1]{[\backreforig{#1}]}
\AtBeginDocument{%
\renewcommand*{\PrintBackRefs}[1]{\unskip}%
}

\usepackage{etoolbox}
%
\makeatletter
%
\let\oldciteauthor\citeauthor
%
\def\citeauthor#1{{\NoHyper\oldciteauthor{#1}}}

% Patch case where name and year are separated by aysep
\patchcmd{\NAT@citex}
{\@citea\NAT@hyper@{%
 \NAT@nmfmt{\NAT@nm}%
 \hyper@natlinkbreak{\NAT@aysep\NAT@spacechar
{\@citeb\@extra@b@citeb}%
 \NAT@date}}
{\@citea\NAT@nmfmt{\NAT@nm}%
\NAT@aysep\NAT@spacechar\NAT@hyper@{\NAT@date}}{}{}

% Patch case where name and year are separated by opening bracket
\patchcmd{\NAT@citex}
{\@citea\NAT@hyper@{%
 \NAT@nmfmt{\NAT@nm}%
\hyper@natlinkbreak{\NAT@spacechar\NAT@@open\if*#1*\else#1\NAT@spacechar\fi}%
{\@citeb\@extra@b@citeb}%
 \NAT@date}}
{\@citea\NAT@nmfmt{\NAT@nm}%
\NAT@spacechar\NAT@@open\if*#1*\else#1\NAT@spacechar\fi\NAT@hyper@{\NAT@date}}{}{}

\makeatother

\usepackage{filecontents}
\begin{filecontents}{mybib.bib}
@Article{Araz2014,
author = {Araz, Ozgur M. and Bentley, D. and Muelleman, Robert L.},
title = {Using {G}oogle {F}lu {T}rends data in forecasting influenza-like–illness related {ED} visits in {O}maha, {N}ebraska},
journal = {The American Journal of Emergency Medicine},
year = {2014},
volume = {32},
number = {9},
pages = {1016--1023},
doi = {10.1016/j.ajem.2014.05.052}
}

@Article {Amiri2020,
author = {Amiri, Mohammad Moqaddasi and Tapak, Leili and Faradmal, Javad and Hosseini, Javad and Roshanaei, Ghodratollah},
title = {Prediction of {S}erum {C}reatinine in {H}emodialysis {P}atients {U}sing a {K}ernel {A}pproach for {L}ongitudinal {D}ata},
journal = {Healthcare Informatics Research},
year = {2020},
volume = {26},
number = {2},
pages= {112--118},
doi = {10.4258/hir.2020.26.2.112}
}
\end{filecontents}

\begin{document}

\chapter{Example}

\citet{Araz2014} pointed out that correlation is not present in the residuals.

Serum Creatinine is used to measure kidney function \citep{Amiri2020}.

In a \citeyear{Araz2014} study, \citeauthor{Araz2014} used the number of flu cases as a covariate.

\addcontentsline{toc}{chapter}{References}
\bibliographystyle{apacite}
\setlength\bibhang{0.2 in}
\setlength\bibsep{\baselineskip}
\bibliography{mybib}

\end{document}

页码确实会打印在每个参考文献末尾的括号内。但是,超链接不会打印,如下图所示。

在此处输入图片描述

在此处输入图片描述

我做错了什么?

相关内容