5

I'm lost in some bst hell. Basically I'm trying to get Springer's spbasic.bst file to work. I'm almost there, but there are few annoying issues. First, instead of getting Address: Publisher, I get Publisher, Address. which is incorrect.

I saw the functions format.publisher.address, and the book section:

FUNCTION {book}
{ output.bibitem
  author empty$
    { format.editors "author and editor" output.check
      editor format.key output
      add.blank
    }
    { format.authors output.nonnull
      crossref missing$
        { "author and editor" editor either.or.check }
        'skip$
      if$
    }
  if$
  format.date "year" output.check  
  new.sentence
  format.btitle "title" output.check
  crossref missing$
    { format.bvolume output
      format.edition output
  new.sentence
      format.number.series output
      format.publisher.address output
    }
    {
  new.sentence
      format.book.crossref output.nonnull
    }
  if$
  format.doi output
  format.url output
  format.note output
  format.eprint output
  fin.entry
}

How do I fix it? The bst syntax must be one of the least comprehensible languages I've ever seen.

1 Answer 1

2

publisher and address are formatted and printed by the function format.publisher.address

FUNCTION {format.publisher.address}
{ publisher "publisher" bibinfo.warn format.org.or.pub
}

As you can see this function calls another function function.org.or.pub

FUNCTION {format.org.or.pub}
    { 't :=
      ""
      address empty$ t empty$ and
        'skip$
        {
          t empty$
            { address "address" bibinfo.check *
            }
            { t *
              address empty$
                'skip$
                { ", " * address "address" bibinfo.check * }
              if$
            }
          if$
        }
      if$
    }

As you can see, there is one instruction ", " (at line 1044 of the file spbasic.bst). This is what you have to modify, specifically, youcan replace it with ": ".

2
  • Thanks! My biggest problem is on the position of address and publisher, which need to be swapped. What do I need to change for that?
    – Mulone
    Nov 24, 2012 at 10:21
  • 1
    change publisher to address and address to publisher in the body of the two functions.
    – Guido
    Nov 24, 2012 at 10:35

You must log in to answer this question.

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