[Tex/LaTex] Bibliography style unsrt.bst – volume bold

bibtexbold

I am using the unsrt.bst bibliography style. The only thing I need to change is the volume into bold.

I found this post Harvard agsm bibliography style no comma and bold volume and I changed

{ volume field.or.null

to

{ volume embolden field.or.null

in function

FUNCTION {format.vol.num.pages}

I saved the file under myunsrt.bst, refreshed the FNDB but the volume of the articles is still not bold.

What is wrong with this?

Best Answer

What you're encountering is that whereas the file agsm.bst provides the function embolden, the file unsrt.bst -- and hence your copy of this file, myunsrt.bst -- does not. (If you look closely at the .blg file, you'll probably find some non-fatal complaints about an unknown function named "embolden"...)

Not to worry: Just add the following function to your file myunsrt.bst -- somewhere near the top, say near the function "output" -- and you should be in business:

FUNCTION {embolden}
{ duplicate$ empty$
    { pop$ "" }
    { "{\bf " swap$ * "}" * }
  if$
}

Addendum: The file unsrt.bst is one of the original bibtex style files, i.e., it's been around for more than 20 years. If there's any chance that some of the entries in your .bib file(s) will contain fields such as url, isbn, issn, doi, and eid, you should really contemplate using the file unsrtnat.bst -- distributed with the natbib package -- instead of unsrt.bst. Its formatting is pretty much identical to that of unsrt, but it knows what to do with these additional types of fields. Of course, if you still want those journal volume numbers printed in bold, you'll again have to add the function embolden, change the line of code in the function format.vol.num.pages, and save the file under a new name, say, myunsrtnat.bst.