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

Heiko Oberdiek oberdiek at uni-freiburg.de
Wed Jul 16 16:48:31 CEST 2008


On Wed, Jul 16, 2008 at 04:16:37PM +0200, Zdenek Wagner wrote:

> 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. 

As far as I could see, patterns switches aren't triggered
by font encoding switches, only by language switches or
environment `hyphenrules'. However such a feature could
perhaps be implemented using package `everysel'.

> \iflanguage{slovak} works for both encodings.

I don't think:

\def\iflanguage#1{%
  \expandafter\ifx\csname l@#1\endcsname\relax
    \@nolanerr{#1}%
  \else
    \bbl at afterfi{\ifnum\csname l@#1\endcsname=\language
      \expandafter\@firstoftwo
    \else
      \expandafter\@secondoftwo
    \fi}%
  \fi}

\iflanguage only compares the current patterns with the patterns
for language "slovak", e.g.:

% language.dat:
slovak:T1 ...
=slovak
slovak:IL2

% document.tex:
\usepackage[slovak]{babel}
\usepackage[IL2]{fontenc}

Then \iflanguage{slovak} reports false.

But package `iflang' exists that provides \iflanguagename.
The comparison is based on \languagename, but not on the patterns.

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>


More information about the tex-live mailing list