[tex-eplain] hyphenation patterns in plain TeX

Dan Luecking luecking at uark.edu
Mon Aug 17 20:23:48 CEST 2009

At 05:25 AM 8/17/2009, John Was wrote:

>Sorry if this seems a silly question, but does anyone know how to 
>access the hyphenation patterns for different languages within a 
>plain TeX set up (I am increasingly using (plain) XeTeX, and the 
>usual  \input eplain works well with that)?  I normally get on well 
>with standard out-of-the-box TeX hyphenation, building up an 
>exception dictionary for different jobs depending on the 
>foreign-language content, but I sometimes need to typeset extended 
>Latin, Portuguese, etc., where the exception list can get pretty unwieldy.

On my system (TeX Live 2008/9), eplain.ini contains
% Thomas Esser, 1998. public domain.
% hyphenation is set up in language.dat
\input bplain
\input eplain

The use of bplain instead of plain means that all the
languages in language.dat have had hyphenation patterns
loaded (using code from the babel system). In addition,
a method of switching hyphenation rules for different
languages has been defined. To make sure format
generation knows that eplain uses babel, the file fmtutil.cnf
should contain a line something like

eplain pdftex language.dat -translate-file=cp227.tcx *eplain.ini

where the important information for hyphenation is the
third field: language.dat

>I've never attempted to use initex to set up a language-specific 
>version of TeX (or XeTeX) but I'd prefer just to be able to say 
>\input XXXXX at the start of a file and then select the hyphenation 
>rules for a given language - even in a job predominantly in (say) 
>Latin I'd want to switch back to English rules at any time.  Ideal 
>would be something analogous to \input eplain - which, as you all 
>know, immediately gives access to the different functions without 
>the need for any further adjustment or setting up.

Currently, hyphenation patterns must be loaded at format
generation (initex). Luatex will change that eventually, but it is
the requirement for now. As mentioned above, you may already
have patterns loaded for many languages. To add languages,
you can run texconfig (on some systems), tlmgr (on TeX Live 2008
and later) or MiKTeX Options (MiKTeX, of course). This _should_
regenerate all formats that have been properly set up to use
the babel system.

>None of this is covered by the eplain manual, of course, but I'm 
>hoping that a fellow plain TeX user will be able to point me in the 
>right direction at least.

What goes in your file is hard to find out. It is claimed that
\selectlanguage is defined (as a consequence of inputting
bplain in eplain .ini), and so one would expect
\selectlanguage{portuges} to work if portuges is set up in
language.dat, but I can't make that happen without error.
The following does work to switch to portuguese rules:
   \language=\csname l at portuges\endcsname
   \language=\csname l at portuguese\endcsname


Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas
"Dubito ergo cogito, cogito ergo sum" --Descartes

More information about the tex-eplain mailing list