我想打印一份引用文献的简写列表。此列表将成为前言的一部分,列表中的所有参考文献均来自同一作者。由于参考文献的完整详细信息也将包含在文档末尾的参考书目中,因此我想在此简写列表中隐藏作者。
打印速记时是否可以隐藏某些字段,或者相反,是否可以指定应在此列表中打印哪些字段?我不想更改任何会影响文档末尾参考书目的设置。
以下是 MWE:
\begin{filecontents}{test.bib}
@book {gramsci1971,
author = {Gramsci, Antonio},
title = {Selections from the Prison Notebooks},
location = {London},
year = {1971},
translator = {Hoare, Quintin and Smith, Geoffrey Nowell},
editor = {Hoare, Quintin and Smith, Geoffrey Nowell},
publisher = {Lawrence \& Wishart},
shorthand = {SPN}
}
@book {gramsci1995,
author = {Gramsci, Antonio},
title = {Further Selections from the Prison Notebooks},
location = {London},
year = {1995},
translator = {Boothman, Derek},
editor = {Boothman, Derek},
publisher = {Lawrence \& Wishart},
shorthand = {FS}
}
\end{filecontents}
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[style=authoryear-icomp, bibstyle=authoryear, autocite=inline, backend=biber]{biblatex}
\addbibresource{test.bib}
\begin{document}
Some text with a citation \autocite[12]{gramsci1971}, and some further text with another citation \autocite[353]{gramsci1995}.
\printbiblist[title={Works cited by Antonio Gramsci}, sorting=ynt]{shorthand}
\printbibliography
\end{document}
答案1
您可以修改shorthand
驱动程序
\makeatletter
\DeclareBibliographyDriver{shorthand}{%
\usedriver
{\clearname{author}\def\do##1{\togglefalse{blx@use##1}}\abx@donames}
{\thefield{entrytype}}%
\finentry}
\makeatother
甚至使其更加紧凑
\DeclareBibliographyDriver{shorthand}{%
\usebibmacro{title}%
\newunit
\printdate
\finentry}
当然这可以完全定制。
或者,您可以修改自动创建的shorthand
bibenvironment 以忘记author
并且不打印编辑器
\makeatletter
\defbibenvironment{shorthand}
{\list{\thefield{shorthand}}{%
\labelwidth\csname shorthandwidth\endcsname
\labelsep\biblabelsep
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\itemsep\bibitemsep
\parsep\bibparsep
\def\makelabel##1{##1\hss}}}
{\endlist}
{\clearname{author}\def\do##1{\togglefalse{blx@use##1}}\abx@donames\item}
\makeatother