0

I am using a custom .bst file and title "t" change.case$ does not seem to work. It changes the cast to lower or upper when used with parameters "u" or "l".

My format.title function:

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

and the output: pdflatex output

Another example: In .bib file the title is title = {Grandmaster level in StarCraft II using multi-agent reinforcement learning}

and the output produced: example 2 It looks like it is changing it to a sentence case and not title case.

Another example title = {the title of the work} and the output is: example 3

But when I change a line in format.title to title "u" change.case$ I get: example4

This is very strange behaviour. Do you know how to fix it?

EDIT: The expected output is "The Title of the Work" (see). I want to achieve the title case.

3
  • 4
    Welcome to TeX.SX! "t" change.case$ does “title casing”: all letters are made lower-case, except for the first one. The output seems correct. – Phelype Oleinik Jul 5 '20 at 15:27
  • @PhelypeOleinik the term "title case" is also used for A mixed-case style with all words capitalised, except for certain subsets (particularly articles and short prepositions and conjunctions) (en.wikipedia.org/wiki/Letter_case#Case_styles). – Marijn Jul 5 '20 at 15:51
  • 2
    "t" change.case$ does what I would call 'sentence case'. It transforms everything but the first letter (and the first letter after a colon plus a space) to lowercase. The standard solution is to input the fields in Title Case in the .bib file and let BibTeX convert it to sentence case if required. (cf. tex.stackexchange.com/q/166616/35864, tex.stackexchange.com/q/439440/35864) – moewe Jul 5 '20 at 16:10
1

"t" change.case$ applies what I (and Wikipedia) would call 'sentence case'. It converts all but the first letter (and the first letter after a colon followed by at least one space), which is left unchanged, to lowercase.

There is no built-in BibTeX function to apply Title Case in the sense of the Wikipedia definition and I'm not aware of a comprehensive contributed BibTeX (or indeed biblatex) solution for Title Casing. See also Implementation of "Title Case" in Bibtex.

The way Sentence case and Title Case are normally handled in .bib files is as follows

  • Titles are given in the .bib file in Title Case with words that always need to be uppercase (proper nouns, acronyms, ...) protected in curly braces.
  • If desired a bibliography style can convert the title into Sentence case, otherwise it is shown as input (i.e. in Title Case).

See also the discussion in What is the proper casing to use when storing titles in the bibliography database?.


In your case you would write

title = {The Title of the Work},
title = {Grandmaster Level in {StarCraft II} Using Multi-agent Reinforcement Learning},

in the .bib file and just write

title

without any change.case$ call in the .bst file.

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.