[Tex/LaTex] How to remove the comma between volume and number in the IEEEtr.bst file

bibtexieeetran

I just started modifying my ieeetr.bst file.

I was able to switch first and last name for my (journal article) authors in the bibliography. I also wanted to display the Volume and Issue number as 1(1) and not vol. 1, no. 1. So far I only got to 1, (1).

Any ideas how I can get rid off the space and comma?

Best Answer

In your copy of ieeetr.bst you probably modified the function format.volume into

FUNCTION {format.volume}
{ volume empty$
    { "" }
    %{ "vol.~" volume * } %% original
    { volume }
  if$
}

and the function format.number into

FUNCTION {format.number}
{ number empty$
    { "" }
    %{ "no.~" number * }   %% original
    { "(" number * ")" * } %% new
  if$
}

To get rid of the comma and the space between volume and number we have to tell BibTeX that we are not in the middle of a "sentence" by specifying a different output state:

FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  format.title "title" output.check
  blank.sep
  crossref missing$
    { journal emphasize "journal" output.check
      format.volume output
      month empty$
    { before.all 'output.state := %% added
    format.number output }
    'skip$
      if$
      format.pages output
      format.date "year" output.check
    }
    { format.article.crossref output.nonnull
      format.pages output
    }
  if$
  new.block
  note output
  fin.entry
}