Biblatex:链接 \parencitetitle

Biblatex:链接 \parencitetitle

我如何定义一个像 biblatex 一样工作的引用命令,\citetitle但它在括号中并链接到相应的参考书目条目?(\citetitle本身没有链接)

答案1

以下内容适用于大多数或所有标准样式。

\documentclass{article}

\usepackage{biblatex}

% Copied from \citetitle    
\DeclareCiteCommand{\parencitetitle}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexfield{indextitle}}
     {}%
%    \printfield[citetitle]{labeltitle}}% DELETED
   \printtext[parens]{\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}}%NEW
  {\multicitedelim}
  {\usebibmacro{postnote}}

\usepackage{hyperref}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\parencitetitle{A01}

\clearpage

\printbibliography

\end{document}

相关内容