0

I am using a .bst bibliography style file that apparently is a derivative of the apalike.bst style. As I have learned, it is supposed to typeset the titles of all references in a lowercase manner (except for those parts put in curly brackets, of course).

Funny thing is: This is not happening, i.e. the titles appear as put into the .bib file.

This seems to be the responsible code snippet:

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

Of course, I have already tried to uncomment the line with the change.case command. This, however, only gave me plenty of error messages following this style:

while executing---line 1376 of file apalike-derivative.bst
`'62' is a function literal, not an integer, for entry Zhu2017
while executing---line 1376 of file apalike-derivative.bst
0 is an integer literal, not a string or missing field, for entry Zhu2017

With the respective line commented, no error messages occur, but, as mentioned, the titles are not set in lowercase letters.

How can I make this right, i.e. keep this style file, but apply the proper adaptions to get the titles set in a lowercase manner?

2
  • 1
    You do not only have to uncomment the { title "t" change.case$ } line you also have to comment out the following { title } line. You can only have two { ... } groups in an if$ after the condition (title empty$).
    – moewe
    Aug 24 '18 at 17:58
  • Would you care to post this as an answer? Because this was exactly the solution. Thank you so much!
    – Michael
    Aug 24 '18 at 18:00
1

You need to uncomment the { title "t" change.case$ }, but you also need to comment out the { title } so that the code reads

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

or simplified without comments

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

The syntax of a conditional in the BibTeX language is

<condition>
  { <true branch> }
  { <false branch> }
if$

If you have three braced groups between the condition and the if$, BibTeX gets confused.

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.