省略参考书目中的字段

省略参考书目中的字段

当我使用

 \bibliographystyle{plainnat} 

输出如下

[88] GR Ruetsch 和 MR Maxey。均匀各向同性湍流中涡度和被动标量场的小尺度特征。流体物理学 A:流体动力学,3(6):1587, 1991。ISSN 08998213。doi: 10.1063/1.857938。URL http://link.aip.org/link/PFADEB/v3/i6/p1587/s1&Agg=doi

我想省略一些字段,例如 URL 和 ISSN。可以吗?如果可以,我需要做什么?

(注:我的 BibTex 是使用 Mendley 制作的)

答案1

其中一种方法是创建文件的修改版本,其中格式化和打印字段(如和)plainnat.bst的函数被简化为不执行任何操作的存根:doiisbn

  • 在你的 TeX 发行版中找到该文件plainnat.bst。复制此文件并将其命名为 。myplainnat.bst(不要直接编辑 TeX 发行版的原始文件。)

  • 在您最喜欢的文本编辑器中打开myplainnat.bst,然后搜索名为的函数format.doi。(在我的文件副本中,它从第 292 行开始。)

  • 在此函数中,将行替换为

    { new.block "\doi{" doi * "}" * }
    

    { "" }
    

    简而言之,告诉 BibTeX 即使字段doi非空也不执行任何操作。(您可以更进一步,用 替换函数的整个主体{ " " }。但是,如果您选择撤消其中一些编辑,如果您留下的绝对最小代码片段更多,可能会更容易。)

  • 根据需要,对函数 、 和 重复format.urlformat.issn过程format.isbn

  • 将文件保存myplainnat.bst在主文件所在的目录中.tex,或保存在 BibTeX 搜索的目录中。如果选择后者,您可能还需要更新 TeX 发行版的文件名数据库。

  • 通过以下方式开始使用新的书目样式

    \bibliographystyle{myplainnat}
    

答案2

您应该在序言中使用 biblatex (删除\bibliographystyle{plainnat})

\usepackage[style=authoryear-comp,firstinits=true,citestyle=authoryear,natbib=true,backend=bibtex]{biblatex}
\renewcommand\nameyeardelim{, }
\DeclareNameAlias{sortname}{last-first}
\renewcommand*{\multinamedelim}{\addcomma\space}
\renewcommand*{\finalnamedelim}{\addcomma\space}
\setlength{\bibitemsep}{\baselineskip}
\renewbibmacro{in:}{}

这将为您带来预期的删除效果。

\AtEveryBibitem{%
  \clearfield{issn} % Remove issn
  \clearfield{doi} % Remove doi

  \ifentrytype{online}{}{% Remove url except for @online
    \clearfield{url}
  }
}

这是基于http://codydunne.blogspot.se/2012/01/suppressing-bibtex-fields-for-specific.html

答案3

我有一个设置,其中 OverLeaf 作为我的 LaTeX 发行版,并且它与 Zotero 同步。由于某种原因,Zotero 还导出了我的 .bib 文件中的字段“note”:

@article{osokin_real-time_2018,
title = {Real-time 2D Multi-Person Pose Estimation on {CPU}: Lightweight {OpenPose}},
rights = {Creative Commons Attribution 4.0 International},
url = {https://arxiv.org/abs/1811.12004},
doi = {10.48550/ARXIV.1811.12004},
shorttitle = {Real-time 2D Multi-Person Pose Estimation on {CPU}},
abstract = {In this work we adapt multi-person pose estimation architecture to use it on edge devices. We follow the bottom-up approach from {OpenPose}, the winner of {COCO} 2016 Keypoints Challenge, because of its decent quality and robustness to number of people inside the frame. With proposed network design and optimized post-processing code the full solution runs at 28 frames per second (fps) on Intel\${\textbackslash}unicode\{{xAE}\}\$ {NUC} 6i7KYB mini {PC} and 26 fps on Core\${\textasciicircum}\{{TM}\}\$ i7-6850K {CPU}. The network model has 4.1M parameters and 9 billions floating-point operations ({GFLOPs}) complexity, which is just {\textasciitilde}15\% of the baseline 2-stage {OpenPose} with almost the same quality. The code and model are available as a part of Intel\${\textbackslash}unicode\{{xAE}\}\$ {OpenVINO}\${\textasciicircum}\{{TM}\}\$ Toolkit.},
author = {Osokin, Daniil},
urldate = {2023-02-16},
date = {2018},
note = {Publisher: {arXiv} Version Number: 1 Read\_Status: To Read Read\_Status\_Date: 2023-02-16T14:04:41.638Z},
keywords = {Computer Vision and Pattern Recognition (cs.{CV}), {FOS}: Computer and information sciences}}

这使得引用中充斥着关于论文阅读状态的不必要信息(由 Zotero 插件生成https://github.com/Dominic-DallOsto/zotero-reading-list)。

我设法通过在以下位置添加以下内容来删除该注释preamble.tex

\AtEveryBibitem{%
    \clearfield{note}
}

谢谢@fredrik-erlandsson 你的方法有效。

相关内容