如何使作者姓名显示为书目条目的超链接?

如何使作者姓名显示为书目条目的超链接?

在此处输入图片描述

我希望作者姓名(但不\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}

連結的名字。

相关内容