I have to add citation counts to the articles in my bibliography.
I started by editing the bib file and adding a field "citations" to each entry.
Then, I opened the bst file (a variant of plainyrrev.bst) and searched for a place to refer to the new field.
The closest place that I found was this function:
FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
new.block
format.title "title" output.check
new.block
crossref missing$
{ journal emphasize "journal" output.check
format.vol.num.pages output
format.date "year" output.check
}
{ format.article.crossref output.nonnull
format.pages output
}
if$
new.block
note output
fin.entry
}
How to edit this function to relate to the citations field? Here is what I tried so far:
- Added "citations output" after "note output"; got an error message: "You can't pop an empty literal stack". Similarly when I added "new.block citations output".
Added the following function; got an error: "citations is an unknown function".
FUNCTION {format.citations} { citations empty$ { "" } { citations format.names } if$ }