删除参考书目中年份后的逗号

删除参考书目中年份后的逗号

我正在尝试向牛津生物信息学期刊投稿。但是,我无法使用引用样式来删除年份后的逗号。

基本上,它产生:

Hucka,M. 等(2003),系统生物学标记语言(SBML):表示和交换生化网络模型的媒介。生物信息学,19,524–531。

我想:

Hucka,M. 等。(2003)系统生物学标记语言(SBML):表示和交换生化网络模型的媒介。生物信息学,19,524–531。

我一直在尝试更改 .bst 文件来实现这一点。这就是我现在所拥有的。我包括了我知道的所有相关部分,但如果我遗漏了任何重要信息,请告诉我,我会添加它。

FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  format.title "title" output.check
  new.block
  crossref missing$
    {
      journal
      "journal" bibinfo.check
      emphasize
      "journal" output.check
      format.vol.num.pages output
    }
    { format.article.crossref output.nonnull
      format.pages output
    }
  if$
  new.block
  format.note output
  fin.entry
}

FUNCTION {format.date}
{ year "year" bibinfo.check duplicate$ empty$
    {
      "empty year in " cite$ * "; set to ????" * warning$
       pop$ "????"
    }
    'skip$
  if$
  extra.label *
  before.all 'output.state :=
  " (" swap$ * ")" *
}

FUNCTION {output.check}
{ 't :=
  duplicate$ empty$
    { pop$ "empty " t * " in " * cite$ * warning$ }
    'output.nonnull
  if$
}

bib 文件条目示例:

@article{Hucka2003,
author = {Hucka, M. and Finney, a. and Sauro, H. M. and Bolouri, H. and Doyle, J. C. and Kitano, H. and Arkin, a. P. and Bornstein, B. J. and Bray, D. and Cornish-Bowden, a. and Cuellar, a. a. and Dronov, S. and Gilles, E. D. and Ginkel, M. and Gor, V. and Goryanin, I. I. and Hedley, W. J. and Hodgman, T. C. and Hofmeyr, J.-H. and Hunter, P. J. and Juty, N. S. and Kasberger, J. L. and Kremling, a. and Kummer, U. and {Le Novere}, N. and Loew, L. M. and Lucio, D. and Mendes, P. and Minch, E. and Mjolsness, E. D. and Nakayama, Y. and Nelson, M. R. and Nielsen, P. F. and Sakurada, T. and Schaff, J. C. and Shapiro, B. E. and Shimizu, T. S. and Spence, H. D. and Stelling, J. and Takahashi, K. and Tomita, M. and Wagner, J. and Wang, J.},
doi = {10.1093/bioinformatics/btg015},
issn = {1367-4803},
journal = {Bioinformatics},
month = {mar},
number = {4},
pages = {524--531},
title = {{The systems biology markup language (SBML): a medium for representation and exchange of biochemical network models}},
url = {http://bioinformatics.oxfordjournals.org/cgi/doi/10.1093/bioinformatics/btg015}    ,
volume = {19},
year = {2003}
}

抱歉又问了类似的问题,但我已经阅读了以下内容,但并没有解决我的问题。所以请不要将此标记为重复。

使用 natbib 删除年份后的点- 这对我不起作用。

删除地址/出版商和年份之间以及括号后的逗号- 这是我的问题的反面,我无法根据自己的需要修改解决方案。

删除年份后的标点符号(逗号)- 建议的解决方案引发错误! LaTeX Error: \labelnamepunct undefined.

我也尝试过这个样式表但它没有产生所需的格式:https://schneider.ncifcrf.gov/ftp/bioinformatics.bst

谢谢!

答案1

有一个函数add.blank可以插入以抑制标点符号。您只需将其放在调用年份格式后的一行中:

FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  add.blank
  format.title "title" output.check
  new.block
  crossref missing$
    {
      journal
      "journal" bibinfo.check
      emphasize
      "journal" output.check
      format.vol.num.pages output
    }
    { format.article.crossref output.nonnull
      format.pages output
    }
  if$
  new.block
  format.note output
  fin.entry
}

Sample output

我通过运行发现了这一点latex makebst。在此过程中,有一个选项可以在日期指定后留空:

DATE PUNCTUATION (if date not at end)
(*) Date with standard block punctuation (comma or period)
(c) Colon after date as 1994:
(s) Semi-colon after date as 1994;
(p) Period after date even when blocks use commas
(x) No punct. after date 
  Select:

因此,对您来说,最简单的方法可能是重新生成自定义 bst 文件,选择x此处的选项。否则,您还需要book手动修改其他类型(如等)的打印功能。

顺便说一句,您删除了作者姓名首字母前逗号后面的空格。这是故意的吗?它看起来很拥挤。\,如果您想要比标准空格更小的空格,您可以尝试使用 a。

相关内容