9

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?

5
  • Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. May 3, 2012 at 19:01
  • 1
    Did you changed the bibliographystyle inside your tex file? May 3, 2012 at 19:01
  • I opened the unsrt.bst with notepad+ changed the above mentioned and saved the file as myunsrt.bst.
    – Sven
    May 3, 2012 at 19:36
  • You have to use \bibliographystyle{myunsrt}. May 3, 2012 at 19:36
  • That is what is written in my tex-file. But the changes i did i made with notepad+. How should i change the code of the unsrt.bst with "\bibliographystyle{myunsrt}"?
    – Sven
    May 3, 2012 at 19:40

2 Answers 2

4

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.

0
2

Looking at http://schneider.ncifcrf.gov/ftp/nature.bst

It looks like the fix (without needing to define a new function) is as follows:

inside:

FUNCTION {format.vol.num.pages}

Change the line:

{ volume field.or.null

To:

{ "{ \bf " volume "}" * * field.or.null

You must log in to answer this question.

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