[tex-live] Czech support, ugly but efficient solution

Petr Olsak olsak@math.feld.cvut.cz
Tue, 15 Oct 2002 09:46:37 +0200 (CEST)


On Tue, 15 Oct 2002, Staszek Wawrykiewicz wrote:

> Petr Olsak <olsak@math.feld.cvut.cz> wrote on 12 Oct 2002:
>
> > The solution of this duplicity can be following: leave cz[sk]hyph.tex
> > files in babel system with only one line inside:
> > \input czhyphen    or   \input skhyphen .
> >
> > I don't see the better solution of this problem if you persists on the
> > short names in babel system. I persist on long names in csplain :-).
>
> OK, point taken. So to avoid a mess with changes in language.dat, etc.,
> I'd suggest puting in texmf/tex/generic/hyphen/czhyph.tex and
> skhyph.tex as just *copies* of texmf/tex/csplain/czhyphen.tex and

No, I have a better idea. Remove the files {cz|sk}hyph.tex and replace
them by files with the following contents:

texmf/tex/generic/hyphen/czhyph.tex:
--------------------------------------------------------------
%% czhyph.tex, Petr Olsak, Oct 2002
%  the main goal of this file is to \input czhyphen.tex (from CSTeX).
%  Suppose that the czhyph.tex file is used only by babelised formats
%  (babelised plain and babelised LaTeX).
%  WARNING: Don't use the czhyph.tex file from csplain or cslatex
%  (these formats use the czhyphen.tex file from CSTeX directly).

\ifx\addlanguage\undefined
  \errmessage{This file can be used only in babelised formats!}
\fi

%  We can do some local settings (from file t1code.tex) because we are
%  in \begingroup ... \endgroup generated by Babel

%  The following trick makes possibility to \input t1codes without errors:

\let\czech=\hsize \let\slovak=\hsize
\let\toneczech=\hsize \let\toneslovak=\hsize

%  The following trick removes the message "Loading CZ hyphen..."
%  from \everyjob:

\let\global=\relax

%  Now, the main work:

\input t1code.tex \csaccents \input czhyphen.tex \relax

-----------------------------------------------------------------

texmf/tex/generic/hyphen/czhyph.tex:
-----------------------------------------------------------------
%% skhyph.tex, Petr Olsak, Oct 2002
%  the main goal of this file is to \input skhyphen.tex (from CSTeX).
%  Suppose that the skhyph.tex file is used only by babelised formats
%  (babelised plain and babelised LaTeX).
%  WARNING: Don't use the skhyph.tex file from csplain or cslatex
%  (these formats use the skhyphen.tex file from CSTeX directly).

\ifx\addlanguage\undefined
  \errmessage{This file can be used only in babelised formats!}
\fi

%  We can do some local settings (from file t1code.tex) because we are
%  in \begingroup ... \endgroup generated by Babel

%  The following trick makes possibility to \input t1codes without errors:

\let\czech=\hsize \let\slovak=\hsize
\let\toneczech=\hsize \let\toneslovak=\hsize

%  The following trick removes the message "Loading CZ hyphen..."
%  from \everyjob:

\let\global=\relax

%  Now, the main work:

\input t1code.tex \csaccents \input skhyphen.tex \relax

----------------------------------------------------------------

I need not do any changes in the current CSTeX. That is very important for
me. You can use these files immediatelly and you cannot wait to the new
release of the CSTeX.

To Johannes L. Braams: please, adpot these files into Babel package.
I don't know the procedure to install these files in all common TeX
distributions. Moreower this is not my bussiness because this is
a Babel problem.

These files requires the csplain version Feb 2000 or newer, because the
t1code.tex file is inputted and this file occurs in csplain Feb 2000.
The teTeX and TeXlive includes this version of csplain from September
2002.

Best regards

Petr Olsak