[tex-live] [tex-hyphen] CZ/SK in babel for TL 08

Zdenek Wagner zdenek.wagner at gmail.com
Wed Jul 16 16:16:37 CEST 2008

2008/7/16 Mojca Miklavec <mojca.miklavec.lists at gmail.com>:
> On Wed, Jul 16, 2008 at 3:32 PM, Vladimir Volovich wrote:
>> Hi!
>>  MM> The whole logic is hidden in the code below (one can easily load
>>  MM> conv-utf8-il2.tex instead of conv-utf8-ec.tex), but you would need
>>  MM> to tell me what and how to change. I thought that you would load
>>  MM> both patterns at once, but if you want to load them depending on
>>  MM> current encoding, I don't have the knowledge how to do that.
>> a brief look at recent babel changes shows that it is now possible to
>> specify the encoding in the language.dat file, e.g.:
>> slovak loadhyph-sk.tex
>> slovak:IL2 loadhyph-sk-il2.tex
>> then babel will load the patterns which were loaded by loadhyph-sk-il2.tex
>> if one switches to slovak language, and current font encoding will be IL2.
> Forgetting the fact that Karl (and me included) would probably be
> against even more major changes just before the release and that these
> changes should concern after-tl-2008 timeframe ...
> I would vote for going one steep deeper.
> language.dat could contain:
>    slovak  ec,il2 loadhyph-sk.tex
> and then encoding name could be stored to some variable, visible to
> loadhyph, so that it would load the proper encoding without having to
> generate dozens of loadhyph-xx-yy files.
You have to specify the encoding as part of the language name, ie
slovak:T1 and slovak:IL2. Babel can already handle it. Afterwards you
load a file which enables conversion from UTF8 to the selected
encoding and load patterns in UTF8. Finally you define =slovak as an
alias. In the document you write


Patterns for slovak in IL2 will then be used. You can also switch
between IL2 and T1 within the document and the patterns will be
switched but such usage is not recommended. \iflanguage{slovak} works
for both encodings. It is only a bit tricky to make it work also with
xelatex with the same language.dat.

A lot of czech/slovak FAQ's on the web are written with cslatex in
mind but do not mention that they are intended for cslatex. Beginners
tried to run such documents through babel and got an error message
that they did not understand. We now have modified czech.sty and
slovak.sty so that user can write


and babel will enter cslatex compatibility mode with IL2 as default.
If all what has already been developed is included in TL, cslatex
could be removed, only a few files (CS fonts, il2enc.def and il2*.fd)
need to be kept. A lot of problems will then disappear.

> Also keep in mind that:
> - for some languages several encodings (t1, texnansi) are equivalent

You can still use the "old" way and load the patterns only once if the
encoding does not matter. this is important compatibility, the whole
world would complain if this behaviour would not be preserved.

> - Germans and probably others want to have access to multiple versions
> of patterns
> - Russians and Ukrainians want that as well
> - we don't want to load Russian patterns in XeTeX seven times
> - it would be nice to take care for plain at the same time
> Those who know how to fiddle with languge.dat and have some nice ideas
> to improve it (after TL08) - can you please join the
> tex-hyphen at tug.org mailing list?
> Mojca
> PS: again - we can do the change for CS/SK, but not for every single
> language at this moment.

Zdeněk Wagner

More information about the tex-live mailing list