Toggle capitalisation
Andrew Parsloe
ajparsloe at gmail.com
Mon Oct 14 21:18:21 UTC 2024
On 15/10/2024 6:06 am, José Matos wrote:
> On Mon, 2024-10-14 at 18:20 +0200, Jean-Marc Lasgouttes wrote:
>> Looking at that, I discover that we do not change case correctly,
>> anyway. We should do that relative to the current language.
>>
>> The main example I know about that is i in Turkish.
>>
>> JMarc
> IIRC j is the same, right?
Being at least partly responsible for setting this particular ball
rolling, let me add fuel to the fire. 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. For the complicated case changing stuff in
different languages they use functions with two arguments, like
\text_titlecase_first:nn {nl} { ijblahblah } ==> IJblahblah (Dutch: ij
==> IJ )
\text_uppercase:nn { la-x-medieval } { ublahu } ==> VBLAHV (Medieval
latin: u ==> V )
Similarly entering tr (Turkish) in the first argument will swap
I/i-dotless and I-dot/i, and there's the de-x-eszett option for German.
Case changing has been a significant issue for LaTeX3 for a long time.
They have withdrawn (obsoleted) commands and introduced new ones over
the years as L3 has become more responsive to the needs of other languages.
Andrew
More information about the lyx-devel
mailing list