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
format.title "title" output.check
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
note output

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

1 Answer 1


Finally I found the solution! I had to add the new "citations" field into the "ENTRY" list at the top of the bst file.

Then, after the line "note output" I added the following line:

"citations: $" citations tie.or.space.connect "$" tie.or.space.connect output

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.