Is there a way to automatically capitalize words in a heading according to APA Style?
This post suggests the use of titlecaps package, however it seemingly add uppercase to all words. According to APA Style only the following words should be capitalized (in heading levels 1-3):
the first word of the title/heading
all major words (nouns, verbs, adjectives, adverbs, and pronouns), including the second part of hyphenated major words (e.g., Self-Report not Self-report)
Capitalize all words of four letters or more.
The following words (of less than four letters) would therefore not be capitalized:
articles (a, an, the),
coordinating conjunctions (and, but, for), and
prepositions (at, by, etc.)
I'm looking for an way that LaTeX can identify word length and classes, and automatically capitalize words based on this.
titlecapspackage will uppercase each word, but allows a list of words to be excluded. Unfortunately, you have to specify the exclusionary list. – Steven B. Segletes Mar 10 '20 at 14:04\titlecapwill capitalize the first word of the argument, even if that word is on the lower-cased word list. This default may be overridden with the command’s optional argument." See https://ctan.org/pkg/titlecaps for documentation. – Steven B. Segletes Mar 10 '20 at 14:23titlecapswith an exclusion list won't always provide correct results either, since for example "in" should be capitalized in "The Spy Who Came In From the Cold", since it's not a preposition here.