[tex-live] pattern problems

Petr Olsak petr at olsak.net
Thu Oct 2 11:28:13 CEST 2003


On Mon, 29 Sep 2003, Hans Hagen wrote:

> Hi,
>
> In the early times of context i distributed the patterns in separate files.
> Then i was strongly advised to use the existing one. This went ok till now.
> When I generate a  the czech/slovak format (for the czech interface) i get:
>
> ! This file can be used only in babelised formats!.
> l.9 ...ile can be used only in babelised formats!}
>
> for the cz and sk pattern files. Now, context is pretty multi lingual but
> not babelised at all.

The czhyphen/skhyphen.tex pattern files are something special:
all accented letters are wtitten by \v <base_letter> etc convetion
in these files.

The result: these pattern files can be loaded more than once, if more than
one TeX internal encoding for these languages are supported in format
package (specially, this is a feature of cslatex and csplain formats).

Second result: you have to define \v etc as macro which expands to one
internal letter at expand processor level before czhyphen/skhyphen.tex
are read. The default values of these macros from plain (the \accent
primitive is used) does not work. It means, the czhyphen/skhyphen.tex
cannot be loaded from babelised latex, babelised plain etc. because the
\v etc macros are unchanged during iniTeX state in these formats. In other
words: czhyphen/skhyphen.tex are not package independent.

The last version of czhyph.tex and skhyph.tex are the wrapper files only.
There is the test if babelised format (means latex or babelised plain) is
used. It this is true then (roughly speaking) the following is done:

\bgroup
   \input t1code.tex   % the \v etc are defined here for T1 encoding
                       % independent on plain or latex is generated
   \input czhyphen.tex % or \input skhyphen.tex
\egroup.

If the wrapper files czhyph.tex or skhyph.tex have to be
used when context is generated and context defines \v macros
as one internal character (with non-zero \lccode) itself, then
new \ifx can be included into czhyph.tex/skhyph.tex at real begin
of these files:

\ifx\contextversion\udefined \else
  \input czhyphen.tex % or \input skhyphen.tex
  \endinput \fi

The second solution is to use the czhyphen/skhyphen.tex directly from
context and don't use the czhyph.tex/skhyph.tex wrapper files.

> I really think that we should look into patterns:
>
> - proper filename convention
> - consistent internals
> - no package dependent internals

The majority of pattern files in babel/generic are package dependent:
they are encoded in T1 encoding---it means they can be used only in
packages where T1 encoding is used as TeX internal encoding!!!

Best regards

Petr Olsak



More information about the tex-live mailing list