6

I changed the following function in a given .bst file

FUNCTION {format.title}
{ title empty$
    { "" }
    { title "t" change.case$ }
  if$
}

to

FUNCTION {format.title}
{ title empty$
    { "" }
    { title }
  if$
}

in order to avoid acronyms in my BibTex to become small case in the final .pdf. This seems to work (only keeping title "t" fails compiling).

I don't know how to program in the BibTeX language, but change.case is, I assume, a function call to change the string on top of the stack (&) to lower cases. Since I don't want to encounter possible strange side effects in the future, I am curious what the "t" part means?

9

The function change.case$ picks up the top two items in the stack and returns a string. With title "t" change.case$ the two top items are the title and "t".

The second argument to change.case$ should be one of "t", "u" or "l"; in the "t" case everything except the first letter is turned into lower case, with "u" everything is turned uppercase and with "l" everything is turned lowercase. But items at positive brace depth are kept untouched in any case.

With your change you're passing just title as the false branch for if$.

For more information, see Nicolas Markey's “Tame the BeaST”, available on CTAN (and in most TeX distributions as texdoc tamethebeast). The change.case$ function is described on page 33.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.