1

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

1 Answer 1

2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .