I am using an apparently heavily-edited apalike
bst style, which I have to use for some reason.
This style unfortunately outputs a comma between the journal name and the volume number, which is something I need to avoid.
Here are the supposedly relevant code snippets:
FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
author format.key output % special for
output.year.check % apalike
new.block
format.title "title" output.check
new.block
crossref missing$
{ journal emphasize "journal" output.check
format.vol.num.pages output
}
{ format.article.crossref output.nonnull
format.pages output
}
if$
new.block
note output
fin.entry
}
FUNCTION {format.vol.num.pages}
{ volume field.or.null
number empty$
'skip$
{ " (" number * ")" * *
volume empty$
{ "there's a number but no volume in " cite$ *
warning$ }
'skip$
if$
}
if$
pages empty$
'skip$
{ duplicate$ empty$
% { pop$ format.pages }
{ ": " * pages n.dashify * }
% { ", " * pages n.dashify * } % changed from ":" for vol,pgs -- BJR 10/5/89
{ ": " * pages n.dashify * } % changed from ":" for vol,pgs -- BJR 10/5/89
if$
}
if$
}
How can I remove this comma with the least amount of changes to this code? To summarize again, I would like to have
Author names (year) Title of article. Journal Name Volume (Number): pages
instead of
Author names (year) Title of article. Journal Name, Volume (Number): pages
EDIT: The full file can be found here: https://pastebin.com/RZmmiqyh
EDIT2: I am particularly in search of a solution that can also handle entries that are "in press", i.e. neither volume, nor number, nor pages have been assigned yet. Instead, after the journal name a colon should appear, and after the colon a comment such as "in press" should be printed.
Example:
Author names (year) Title of article. Journal Name: in press
Exemplary Bibtex entry:
@Article{Author2018,
Title = {How to make Bibtex do what I want},
Author = {Adrian A. Author},
Journal = {Journal of Bibtexing},
Year = {2018},
Note = {in press},
}
.bst
file to a text-sharing website like pastebin (please don't use a file sharing website where one has to download a.zip
or the like)? That would make it much easier to actually test a solution and it helps with the definitions of unseen macros likefield.or.null
.