Biber 从引文中删除某些字段

Biber 从引文中删除某些字段

如何从 Biber 中的引文中删除某些字段?

我的示例文档:

\documentclass[11pt]{article}
\usepackage[backend=biber,firstinits=true,citestyle=ieee]{biblatex} 
\addbibresource{example_library.bib}

\begin{document}

Dummy text \cite{Zaharia2012}.

\printbibliography
\end{document}

使用以下示例库example_library.bib

@article{Zaharia2012,
abstract = {We present Resilient Distributed Datasets (RDDs), a distributed memory abstraction that lets programmers perform in-memory computations on large clusters in a fault-tolerant manner. RDDs are motivated by two types of applications that current computing frameworks handle inefficiently: iterative algorithms and interactive data mining tools. In both cases, keeping data in memory can improve performance by an order of magnitude. To achieve fault tolerance efficiently, RDDs provide a restricted form of shared memory, based on coarse-grained transformations rather than fine-grained updates to shared state. However, we show that RDDs are expressive enough to capture a wide class of computations, including recent specialized programming models for iterative jobs, such as Pregel, and new applications that these models do not capture. We have implemented RDDs in a system called Spark, which we evaluate through a variety of user applications and benchmarks.},
archivePrefix = {arXiv},
arxivId = {EECS-2011-82},
author = {Zaharia, Matei and Chowdhury, Mosharaf and Das, Tathagata and Dave, Ankur},
doi = {10.1111/j.1095-8649.2005.00662.x},
eprint = {EECS-2011-82},
isbn = {978-931971-92-8},
issn = {00221112},
journal = {NSDI'12 Proceedings of the 9th USENIX conference on Networked Systems Design and Implementation},
pmid = {2011},
title = {{Resilient distributed datasets: A fault-tolerant abstraction for in-memory cluster computing}},
year = {2012}
}

呈现为: 在此处输入图片描述

我怎样才能减少字段并仅获得类似于以下内容的输出:

[1] M. Zaharia, M. Chowdhury, T. Das, et al. "Resilient distributed datasets: A fault-tolerant abstraction for in-memory cluster computing". In: NSDI'12 Proceedings of the 9th USENIX conference on Networked Systems Design and Implementation (2012).

即使添加:

\DeclareSourcemap{
  \maps{
    \map{
      \step[fieldsource=entrykey, match=\regexp{\Actan\Z}, final]
      \step[fieldset=url, null]
      \step[fieldset=arxivId, null]
      \step[fieldset=archivePrefix, null]
    }
  }
}
\AtEveryCitekey{\clearfield{archivePrefix}\clearlist{issn}}
\AtEveryBibitem{\clearlist{archivePrefix, arxivId, issn}} 
\AtEveryBibitem{\clearlist{url}} 
\AtEveryBibitem{\clearlist{issn}}

这些附加字段未被清除。

答案1

由于第一个原因,\step问题中显示的源映射仅适用于具有条目键的条目ctan。由于示例条目的键是Zaharia2012,因此映射不适用。

由于各种原因,所示的\clearlist和语句无法工作。是适当字段的便利/遗留别名,因此只有会起作用。和是\clearfieldarchivePrefixeprinttype\clearfield{eprinttype}issnurl字段不是列表,因此需要用 来清除它们\clearfield\clearlist{archivePrefix, arxivId, issn}不起作用,因为\clearlist只接受一个列表名称,而不是整个列表。

由于您已经在使用源映射,我建议您使用源映射清除所有字段。

尝试

\documentclass{article}
\usepackage[backend=biber, giveninits=true, citestyle=ieee]{biblatex}

\DeclareSourcemap{
  \maps{
    \map{
      \step[fieldset=doi, null]
      \step[fieldset=url, null]
      \step[fieldset=eprint, null]
      \step[fieldset=eprinttype, null]
      \step[fieldset=arxivId, null]
      \step[fieldset=archivePrefix, null]
      \step[fieldset=issn, null]
      \step[fieldset=isbn, null]
    }
  }
}

\begin{filecontents}{\jobname.bib}
@article{Zaharia2012,
  archivePrefix = {arXiv},
  arxivId       = {EECS-2011-82},
  author        = {Zaharia, Matei and Chowdhury, Mosharaf
                   and Das, Tathagata and Dave, Ankur},
  doi           = {10.1111/j.1095-8649.2005.00662.x},
  eprint        = {EECS-2011-82},
  isbn          = {978-931971-92-8},
  issn          = {00221112},
  journal       = {NSDI'12 Proceedings of the 9th USENIX conference
                   on Networked Systems Design and Implementation},
  pmid          = {2011},
  title         = {Resilient distributed datasets},
  subtitle      = {A fault-tolerant abstraction for in-memory cluster computing},
  year          = {2012}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Dummy text \cite{Zaharia2012}.

\printbibliography
\end{document}

我没有在示例中改变这一点,但从我所看到的情况来看,该条目应该是@inproceedings而不是@article


在这种特殊情况下,如果您想要删除 URL、DOI、电子版和 ISSN/ISBN,也可以使用样式选项url=false, doi=false, eprint=false, isbn=false,。因此,只需加载biblatex

\usepackage[backend=biber, citestyle=ieee, giveninits=true, 
  url=false, doi=false, eprint=false, isbn=false,]{biblatex}

但这些选项仅适用于少数几个领域,不适用于其他领域。

相关内容