在在 biblatex 中引用作者的全名,lockstep 提出了以下解决方案来排版作者姓名
\begin{filecontents}{\jobname.bib}
@book{Knu86,
author = {Knuth, Donald E.},
year = {1986},
title = {The \TeX book},
}
\end{filecontents}
\documentclass{article}
\usepackage[x11names]{xcolor}
\usepackage{hyperref}
% BEGIN_FOLD
\hypersetup{citecolor=SlateBlue2, citebordercolor=SlateBlue2, colorlinks=true}
% END_FOLD
\usepackage[giveninits=true]{biblatex}
% BEGIN_FOLD
\addbibresource{\jobname.bib}
\DeclareCiteCommand{\citeauthorfirstlast}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\DeclareNameAlias{labelname}{first-last}%
\usebibmacro{prenote}}
{\ifciteindex
{\indexnames{labelname}}
{}%
\printnames{labelname}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citeauthorlastfirst}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\DeclareNameAlias{labelname}{last-first}%
\usebibmacro{prenote}}
{\ifciteindex
{\indexnames{labelname}}
{}%
\printnames{labelname}}
{\multicitedelim}
{\usebibmacro{postnote}}
% END_FOLD
\begin{document}
\citeauthorfirstlast{Knu86}
\citeauthorlastfirst{Knu86}
\citeauthor{Knu86}
\cite{Knu86}
\printbibliography
\end{document}
但是,此解决方案不能满足以下要求
- 有时,我们可能希望将名称排版为
唐纳德·克努斯
(虽然我们使用了选项,但应该显示完整的名字giveninits=true
)
- 作者姓名必须与参考书目中的参考文献相链接