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 need to change the format in the .bst file that I am using. The format currently as:

Beth, T. and Gollmann, D. (1989). Algorithm Engineering for Public Key Algorithm. IEEE Journal on selected areas in communications 7 (4): 458–465.

I want them to be as:

Beth, T. and Gollmann, D. (1989). Algorithm Engineering for Public Key Algorithm. IEEE Journal on selected areas in communications, 7 (4), 458–465.

I need to add comma after the Journal's name and also changing the colon after the series number into comma.

What commands should I add and on which function should I make changes?

Is the following function the right one to add changes on?

FUNCTION {format.bvolume}
{ volume empty$
    { "" }
    { series empty$
       { "" }
       { series emphasize }
     if$
     swap$ bbl.volume volume tie.or.space.connect output
    }
  if$
}

I have also other functions in bst file where I think they might be related, such as:

FUNCTION {format.number.series}
FUNCTION {format.vol.num.pages}

I appreciate the help in advance.

share|improve this question
    
if you are using natbib you might consider using custom-bib to set up your own .bst file - basically you run latex makebst.tex and follow the instructions - much easier than messing around with a .bst file –  prettygully Apr 10 '12 at 6:30
    
Your profile shows "0% accept rate". I'm sure that you have got some good solutions to your questions and you should consider accepting the answers, giving the answerers the forum reputation. –  tohecz Apr 10 '12 at 8:44
    
Which style exactly you use? It is not that difficult to tweak the file once you tell us which one is it. –  tohecz Apr 10 '12 at 8:45
    
@prettygully: the advice to consider running the makebst program through LaTeX is sound. Just a quick note: It's not necessary to be using natbib in order to benefit from the capabilities of the makebst utility. –  Mico Apr 10 '12 at 13:02
    
Please, tell what bibliography style you're loading, so that we can experiment. –  egreg Apr 10 '12 at 13:33

1 Answer 1

up vote 3 down vote accepted

You don't mention which bibliography style file you're using, so I'll assume that it's either that's provided by the natbib package (such as plainnat, unsrtnat, etc) or was generated by the makebst utility (which was written by the author of the natbib package.

In your .bst file, you need to locate the function format.vol.num.pages; it looks like this in the file plainnat.bst file:

FUNCTION {format.vol.num.pages}
{ volume field.or.null
  number empty$
    'skip$
    { "\penalty0 (" number * ")" * *
      volume empty$
        { "there's a number but no volume in " cite$ * warning$ }
        'skip$
      if$
    }
  if$
  pages empty$
    'skip$
    { duplicate$ empty$
        { pop$ format.pages }
        { ":\penalty0 " * pages n.dashify * }
      if$
    }
  if$
}

Note the colon (:), which happens to be in the fifth line from the bottom in this version of the format.vol.num.pages function. (Depending on the .bst file you use, it may be in a different location within the format.vol.num.pages function.) Change the colon to a comma and save the file under a new name, e.g., plainnat-mara.bst. You could save the new file either to your current working directory or some other directory where your TeX distribution tends to look for BibTeX style files. Be sure to refer to the new style file from now on.

share|improve this answer
    
Thank you Mico for drawing my attention to the ratings thing, I never looked at that, I so involved with the answers which is the thing that made me not looking at anything else, I will keep that in mind in the future. As for my question, I am sorry I didn't mention that, yes, I am using natbib. What you said in they reply was a great help. Thank you. And, I will mark it as a useful answer! Now I will try to find where to add comma (,) after the journal's name. –  Mara Apr 10 '12 at 14:24
    
@Mara: You're welcome. A separate issue, related to inserting a comma after the journal name: Which bibliography style file (.bst) do you use? Is it a more or less standard .bst file that can be found on the CTAN (Comprehensive TeX Archive Network), such as plainnat.bst, or is it a custom-written .bst file? If it's the former, you may want to post a new question related to comma-after-journal-name issue. –  Mico Apr 10 '12 at 14:38
    
As for the bibliography I am using, I think, the original material was called chicago style, but this wasn't its name when I got it, because there were modifications had been already done on it. Regarding my question: That's good I didn't need to post a new question because I have just solved the problem. The comma now is after the journal's name. Again, great thanks to you Mico, you have inspired me! –  Mara Apr 14 '12 at 23:21

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.