[tex-live] [tex-hyphen] CZ/SK in babel for TL 08
Mojca Miklavec
mojca.miklavec.lists at gmail.com
Wed Jul 16 16:41:01 CEST 2008
2008/7/16 Zdenek Wagner <zdenek.wagner at gmail.com>:
> 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
>
> \usepackage[slovak]{babel}
> \usepackage[IL2]{fontenc}
>
> 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
>
> \usepackage{slovak}
>
> 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.
So you only need these two lines (and same for Czech):
slovak:T1 loadhyph-sk.tex
=slovak
slovak:IL2 loadhyph-sk-il2.tex
in language.dat? Or should IL2 be the default? (In TL 2007 that has been T1.)
This means loading 4 additional patterns for plain TeX (so one needs
to check that there is enough space reserved for patterns) and this
means that someone needs to update tlpsrc files (while Norbert is
away).
So - should I upload loadhyph-sk(cs)-il2.tex to CTAN? Karl?
(But then please consider loadhyph-sk-il2.tex a temporary solution. I
would prefer some better solution in future.)
Mojca
More information about the tex-live
mailing list