我想生成带有完整作者姓名的链接引文。
例如,如果我使用
According to \citet{bob2000} apples are tasty.
运行后hyperref
,我得到了作者的姓氏和一个指向参考书目的超链接。但我想要作者的全名!
我怎样才能做到这一点?(BibLaTeX 也是一个选择,但在这一点上同样神秘。)
答案1
事实证明,在这个特定的例子中,它运行得很好,我只需修改 BibTeX 源本身即可:
@misc{bob2000,
title={An exposition on the tastiness of apples},
author={{Bob T. Smith}}
}
请注意条目中的双括号{{
和,它们会显示完整的作者字符串,而不是其中的一些格式。}}
答案2
定义您自己的命令labelname
,其中,由 打印的biblatex
变成\citeauthor
,given-family
即名字和姓氏。
\newrobustcmd*{\citefirstlastauthor}{\AtNextCite{\DeclareNameAlias{labelname}{given-family}}\citeauthor}
例子:
文件main.tex
\documentclass{article}
\usepackage[natbib=true,sortcites=no]{biblatex}
%\citeauthor prints only the last name. This command prints first and last name.
\newrobustcmd*{\citefirstlastauthor}{\AtNextCite{\DeclareNameAlias{labelname}{given-family}}\citeauthor}
\addbibresource{library.bib}
\begin{document}
This is a citation from \citefirstlastauthor{knuth2001things}:
``The assumption that the Bible is God's word is an unprovable axiom%
that I tend to find confirmed as I look at it.'' \citeauthor[p. 191]{knuth2001things}
\printbibliography
\end{document}
文件library.bib
@book{knuth2001things,
title={Things a computer scientist rarely talks about},
author={Knuth, Donald Ervin},
year={2001},
publisher={Csli Publications Stanford, CA}
}