[Tex/LaTex] Transforming the .bst file to get lower cases

bibtex

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

Best Answer

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.