我想让cite 生成的整个[num] 都能点击跳转到参考文献列表相应的位置,问了AI,可依然没成功。求大佬们帮我看看。
\documentclass{article}
\usepackage{ctex}
\usepackage[hidelinks]{hyperref}
\usepackage[numbers]{natbib}
\bibliographystyle{gbt7714-numerical}
% \makeatletter
% \renewcommand\NAT@open{\ifNAT@numbers\NAT@hyper@open\else( \fi}
% \renewcommand\NAT@close{\ifNAT@numbers\NAT@hyper@close\else) \fi}
% \newcommand\NAT@hyper@open{%
% \begingroup
% \expandafter\let\expandafter\@tempa\csname Hy@raisedlink\endcsname
% \def\Hy@raisedlink##1{\@tempa{\hyper@linkstart{cite}{}}##1}%
% \hyper@linkstart{cite}{}[}
% \newcommand\NAT@hyper@close{]%
% \hyper@linkend
% \endgroup}
% \makeatother
\makeatletter
\renewcommand\NAT@open{\hyper@linkstart{cite}{}[}
\renewcommand\NAT@close{]\hyper@linkend}
\makeatother
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{dodorico2007soil,
title = {On soil moisture--vegetation feedbacks},
author = {D'Odorico, Paolo and others},
journal = {J. Geophys. Res.},
volume = {112},
year = {2007}
}
\end{filecontents}
\begin{document}
这是测试 \cite{dodorico2007soil}。
\bibliography{\jobname}
\end{document}