[kadingira] Selecting languages
Javier B
jbezosl at gmail.com
Tue Feb 27 11:32:11 CET 2018
>
>
> One of the things I'd like to do is decoupling the language
> in the babel sense from the language in the TeX sense. To
> make clear this distinction, babel will introduce the
> concept of locale, which is universally used elsewhere.
>
I’ll develop this point:
3 ways to select a language:
– \textlocale{<lang>}{<text>}. Ensures text mode. Bidi - only text dir.
– \begin{locale}{<lang>} ... \end{locale}. Just selects the language
(also \locale{<lang>}, as command).
– \setlocale{<lang>} (or \selectlocale, I don’t mind). Only vmode.
Bidi - par and text dir.
– There must be at least a further level: document (margins and
the like) set directly by babel.
Dialects and variants are considered separate locales.
Well, this is the “public” interface, but what exactly do they do? Besides
a default (maybe configurable) behaviour, we should be able the decide
which features/elements should be selected/switched. This can be
accomplished with an optional argument:
– \textlocale[<options>]{<lang>}{<text>}
– \begin{locale}[<options>]{<lang>}
– \setlocale[<options>]{<lang>}
I wouldn’t define language-specific macros like \textenglish, mainly
because there isn't a single schema. Some people may prefer, say,
\texten, \textengl, \textenUS, etc. However, babel could provide (as
option) a few predefined schemas.
It’s worth noting no language info is written to the index file. This is
clearly an open problem.
These macros won’t be defined in monolingual documents (or will
be dummy).
Javier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/kadingira/attachments/20180227/160e1e6b/attachment.html>
More information about the kadingira
mailing list