Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. –  Marco Daniel May 3 '12 at 19:01
1  
Did you changed the bibliographystyle inside your tex file? –  Marco Daniel May 3 '12 at 19:01
    
I opened the unsrt.bst with notepad+ changed the above mentioned and saved the file as myunsrt.bst. –  Sven May 3 '12 at 19:36
    
You have to use \bibliographystyle{myunsrt}. –  Marco Daniel May 3 '12 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 '12 at 19:40

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
Thanks a lot. It is working. –  Sven May 3 '12 at 19:55

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.