1

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?

0

2 Answers 2

3

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
}
1
  • Thanks! great help! I found SageH.bst has a function FUNCTION {add.blank} { " " * before.all 'output.state := } making it easier. I could just write (in my case) format.url output \ add.blank \ format.urldate output
    – JHBonarius
    Commented Mar 2, 2018 at 8:58
1

I would suggest to use custom-bib package.

It starts to work with a generic .bst file and produces a customized one. Command latex makebst.tex will ask you a big amount of questions to define every parameter of your bibliography style.

May be you will need to run it twice or more before you get the desired result but, at least for me, this solution was easier then learning how are .bst files coded.

You must log in to answer this question.

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