4

I am trying to submit to the Oxford Bioinformatics journal. However, I can't get the referencing style to remove the comma after the year.

Basically, it's producing:

Hucka,M. et al. (2003), The systems biology markup language (SBML): a medium for representation and exchange of biochemical network models. Bioinformatics, 19, 524–531.

I want:

Hucka,M. et al. (2003) The systems biology markup language (SBML): a medium for representation and exchange of biochemical network models. Bioinformatics, 19, 524–531.

I've been trying to changing the .bst file to achieve this. This is what I have right now. I'm including all the parts I know of are relevant, but if I'm missing anything vital information please let me know and I'll add it.

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$
}

Example bib file entry:

@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}
}

Apologies for asking another similar question, but I have read the following already and it hasn't solved my problem. So please don't mark this as a duplicate.

remove the dot after the year with natbib - This did not work for me.

remove comma between address/publisher and year and after parentheses - This is the inverse of my problem and I couldn't modify the solution for my needs.

Remove punctuation (comma) after year - The suggested solution throws an error ! LaTeX Error: \labelnamepunct undefined.

I have also tried this style sheet and it doesn't produce the required format: https://schneider.ncifcrf.gov/ftp/bioinformatics.bst

Thanks!

2
  • 1
    Please tells us which .bst file you are trying to modify and provide an example of the .bib file entry. Aug 12, 2016 at 7:14
  • @AndrewSwann I'm using a .bst file that I custom made using custom-bib. Here is the generated output on pastebin. Aug 12, 2016 at 15:35

1 Answer 1

4

There is a function add.blank that may be inserted to suppress punctuation. You just need to place it on the line after the call to the formatting of the year:

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

I discovered this by running latex makebst. In that process there is an option to just have a blank after the date specification:

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:

So may be it would be easiest for you to regenerate you custom bst file again, choosing the x option here. Otherwise you will also need to modify the printing functions for the other types such as book etc. by hand.

Incidentally, you have removed the space after the comma before the author initials. Was that intentional? It looks very cramped. You might try a \, instead if you want something smaller than a standard space.

5
  • This worked beautifully, thanks! Yes the lack of space after the author initials is intentional. I personally don't like it either but the journal style specified that references be given like that. Aug 15, 2016 at 10:20
  • Are these punctuations available in function like add.comma etc. ?
    – null
    Mar 8 at 9:31
  • @null There is add.period, but I have not seen add.comma Mar 8 at 15:48
  • I'm trying to place a comma after the journal name, as I modified FUNCTION {output.nonnull} (with { ". " * write$ }) in a copy of ieeetr.bst. After reading this, I added the definition of add.blank`` as taken from https://tex.stackexchange.com/q/636126/36389 , plus the add.blank` line after { journal emphasize "journal" output.check in FUNCTION {article}, but BibTeX provides a list of errors. How should I proceed? Maybe it is easier to revert the output.nonnull modification and find a way to just place dots after authors list and after article name?
    – Andrestand
    Jun 28 at 19:33
  • 1
    @Andrestand It is probably best to ask a new question where you can post the code and the detailed error message. Jun 28 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.