2

I want to put a colon between my address and institution for techreport objects in bibtex. So it would be

Urban Mobility Report. College Station, TX: Texas Transportation Institute.

I'm working from the elsarticle-harv.bst file. The I've edited the techreport output code to be:

FUNCTION {techreport}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.btitle "title" output.check
  new.sentence
    address output.nonnull 
  institution "institution" output.check
  format.note output
  fin.entry
  write.url
}

This produces

Urban Mobility Report. College Station, TX, Texas A&M University Transportation Institute.

which is fine but not ideal. I've tried to fix this by writing the following code

FUNCTION {output.address.check}
{ address empty$
    { "empty address in " cite$ * warning$ }
    { write$
        address * "\addcolonandeatcomma" *
      mid.sentence 'output.state :=
    }
  if$
}

and adding the relevant code to my preamble (see this answer for details) and changing the techreport line to read address output.address.check Confusingly, this gives

College Station, TX Urban Mobility Report. College Station, TX: Texas A&M University Transportation Institute.

What's up with this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.