我需要使用 biblatex 的 citestyle 功能verbose
,但我不希望它在同一作者的多个引用中重复作者的名字(如选项authortitle-comp
)。
目前,使用该citestyle=verbose
选项,如果我引用“一位作者”的三部作品如下:
\autocites{ANAuthor:1}{ANAuthor:2}{ANAuthor:3}
输出为:"A. N. Author. 'First work' etc [full entry]; A. N. Author. 'Second work' etc [full entry]; A. N. Author. 'Third work' etc [full entry]."
但我需要有输出:"A. N. Author. 'First work' etc [full entry]; 'Second work' etc [full entry]; 'Third work' etc [full entry]."
有没有办法在verbose
样式中做到这一点?也就是说,在同一作者的后续作品的多个引用中隐藏作者字段?
感谢任何帮助!
更新说明
我认为,实现此目的的唯一方法是自定义biblatex
citestyle
。查看verbose.cbx
相关命令是打印bibhypertarget
,如完整和简短引用的命令中所述:
\newbibmacro*{cite:full}{% printtext[bibhypertarget]{% \usedriver {\DeclareNameAlias{sortname}{default}} {\thefield{entrytype}}}% \usebibmacro{shorthandintro}} \newbibmacro*{cite:short}{% \printnames{labelname}% \setunit*{\addcomma\space}% \printtext[bibhyperlink]{% \printfield[citetitle]{labeltitle}}}
是否有人知道如何修改,当同一个作者先前出现在同一个多引用命令中时,将作者字段打印为空白?
答案1
正如@henrique 所说(在评论中),authortitle-comp
和的组合verbose
应该有效:
\documentclass[english]{scrartcl}
\listfiles
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{article,
author = {Arnold Author},
title = {A journal article},
journaltitle = {Some Journal},
date = {2006},
volume = {6},
pages = {19-75}
}
@book{book,
author = {Arnold Author},
title = {Some Book},
editor = {Edmund Editor},
location = {London},
date = {2000},
options = {useeditor=false}
}
@collection{coll,
editor = {Arnold Author},
title = {An edited volume},
location = {London},
date = {2002}
}
\end{filecontents}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel,csquotes}
\usepackage[
style=verbose,
]{biblatex}
\addbibresource{\jobname.bib}
\makeatletter
\newbibmacro*{cite:init}{%
\ifnumless{\value{multicitecount}}{2}
{\global\undef\cbx@lasthash}
{\iffieldundef{prenote}
{}
{\global\undef\cbx@lasthash}}}
\newbibmacro*{cite:reinit}{%
\global\undef\cbx@lasthash}
\renewbibmacro*{cite}{%
\usebibmacro{cite:init}%
\usebibmacro{cite:citepages}%
\ifciteseen
{\iffieldundef{shorthand}
{\usebibmacro{cite:short}}
{\usebibmacro{cite:shorthand}%
\usebibmacro{cite:reinit}}}
{\usebibmacro{cite:full}}}
\renewbibmacro*{cite:full}{%
\usebibmacro{cite:full:citepages}%
\printtext[bibhypertarget]{%
\usedriver
{\iffieldequals{namehash}{\cbx@lasthash}
{\ifboolexpr{
test {\ifuseauthor}
and not
test {\ifnameundef{author}}}
{\clearname{author}}
{\ifboolexpr{
test {\ifuseeditor}
and not
test {\ifnameundef{editor}}}
{\clearname{editor}}
{\ifboolexpr{
test {\ifusetranslator}
and not
test {\ifnameundef{translator}}}
{\clearname{translator}}
{}}}}
{}%
\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}%
\usebibmacro{shorthandintro}%
\savefield{namehash}{\cbx@lasthash}}
\renewbibmacro*{cite:short}{%
\iffieldequals{namehash}{\cbx@lasthash}
{}
{\ifnameundef{labelname}
{}
{\printnames{labelname}%
\setunit{\addcomma\space}}%
\savefield{namehash}{\cbx@lasthash}}%
\printtext[bibhyperlink]{%
\printfield[citetitle]{labeltitle}}}
\makeatother
\begin{document}
\autocites{article}{book}{coll}
\autocites{article}{book}{coll}
\printbibliography
\end{document}
请注意,当作者和编辑者出现在一部作品中时可能会出现问题(编辑者将打印在标题之前),但您可以通过添加options = {useeditor=false}
到相应的条目来解决这个问题。