![如何使作者姓名显示为书目条目的超链接?](https://linux22.com/image/466179/%E5%A6%82%E4%BD%95%E4%BD%BF%E4%BD%9C%E8%80%85%E5%A7%93%E5%90%8D%E6%98%BE%E7%A4%BA%E4%B8%BA%E4%B9%A6%E7%9B%AE%E6%9D%A1%E7%9B%AE%E7%9A%84%E8%B6%85%E9%93%BE%E6%8E%A5%EF%BC%9F.png)
我希望作者姓名(但不\multicitedelim
)显示为书目条目的超链接
\documentclass{article}
\usepackage[x11names]{xcolor}
\usepackage[style=authoryear-comp,backend=biber,hyperref]{biblatex}
\bibliography{biblatex-examples.bib}
\usepackage[colorlinks,citecolor=DodgerBlue3]{hyperref}
\makeatletter
%Works without the last bracket ;-)
\let\abx@macro@citeauthorOrig\abx@macro@citeauthor
\renewbibmacro{citeauthor}{%
\bibhyperref{%
\let\bibhyperref\relax\relax%
\abx@macro@citeauthor%
}%
}%
\makeatother
\begin{document}
\citeauthor{kastenholz,sigfridsson}
\printbibliography[heading=subbibliography]
\end{document}
答案1
对于\citeauthor
链接来说最好的解决方案可能是。
\documentclass{article}
\usepackage[x11names]{xcolor}
\usepackage[style=authoryear-comp,backend=biber,hyperref]{biblatex}
\bibliography{biblatex-examples.bib}
\usepackage[colorlinks,citecolor=DodgerBlue3]{hyperref}
\DeclareCiteCommand{\citeauthor}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
{\ifciteindex
{\indexnames{labelname}}
{}%
\printtext[bibhyperref]{%
\printnames{labelname}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\begin{document}
\citeauthor{kastenholz,sigfridsson}
\printbibliography[heading=subbibliography]
\end{document}