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 have a related question to Transforming the .bib file to get upper cases.

I have a bst I would like to hack in order to get the reverse effect, namely to get rid of capitalized article title, eg

"This is a paper on economics"

instead of

"This is a Paper on Economics"

even if the entry in the bib file is the latter.

I have located this in the bst file

FUNCTION {format.title}
{ title
  "title" bibinfo.check
  duplicate$ empty$ 'skip$ 
    {
      "\enquote{" swap$ *
      "}, " *
    }
  if$
}

I have tried several places to insert change.case$ (to be honest, I do not really understand the language, so it's all trial and error), but all resulted in the titles missing in the bibliography.

Is that the way to do it, or would I have to search somewhere else to get the desired effect?

Christoph

share|improve this question
    
Welcome to TeX.SE! A quick hint: by indenting lines containing (latex or bibtex) code by four spaces, you can get them to be pretty-printed. Separately, please indicate which bibliography style you're using at the moment. –  Mico Oct 12 '12 at 10:41
    
thanks. It is a bst I once made myself, and I wanted to avoid having to do through makebst all over again (dbj is lost, unfortunately). –  Christoph Oct 12 '12 at 11:08
    
See dropbox.com/s/24ygngq2ze8c6rt/obes.bst –  Christoph Oct 12 '12 at 11:08

1 Answer 1

You can change the function in the .bst file (and remember to rename the style) with

FUNCTION {format.title}
{ title "t" change.case$
  "title" bibinfo.check
  duplicate$ empty$ 'skip$ 
    {
      "\enquote{" swap$ *
      "}, " *
    }
  if$
}

However, you have to keep in mind that it will not change the text enclose in {} in the .bib file.

The instruction in a .bst file are written in reverse polish notation. The instruction change.case$ takes two arguments: the first is the text (on the current stack) and the second is either "u" to change to uppercase, "t" to change to lowercase apart the first character and character in {}, and "l" to change to lowercases.

Thus the instruction

title "t" change.case$ 

means: put title on the stack, then "t" change.case$ changes the case of the text on the stack and puts the result on the stack.

share|improve this answer
    
great, thanks a lot! –  Christoph Oct 12 '12 at 11:26

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.