Toggle capitalisation

Jürgen Spitzmüller jspitzm at gmail.com
Tue Oct 15 08:13:16 UTC 2024


Am Dienstag, dem 15.10.2024 um 10:18 +1300 schrieb Andrew Parsloe:
> LaTeX3 has two functions for titlecase, \text_titlecase_all:n and
> \text_titlecase_first:n. The 'all' option uppercases the first letter
> of all words including (in English) 'a', 'the', 'and' and so on.

The reason for this being that they first got it wrong, and
\text_titlecase:n actually was sentence-casing, see
https://github.com/latex3/latex3/issues/1232
https://github.com/latex3/latex3/pull/1247

They decided not to rename the function to \text_sentencecase:n but add
\text_titlecase_all:n for real title-casing, while
\text_titlecase_first:n still actually is sentence-casing.

LaTeX2e \MakeTitlecase (which also has the locale optional argument
Andrew has been poiting out) still does (only) sentence-casing, see the
example in usrguide:

\MakeTitlecase{hello WORLD ßüé} Hello world ßüé

So, alas, it's all a bit of a mess.
-- 
Jürgen


More information about the lyx-devel mailing list