In order to hyphenate text, TEX must have hyphenation patterns and, since these patterns can be loaded only by iniTEX, the choice of which patterns to load must be made when the format is created.
The hyphenation patterns for American English are stored in the file
named hyphen.tex
; LATEX 2.09 always loaded this file when its
format was made.
With LATEX2e it is possible to configure which hyphenation patterns
are to be loaded into the format. When iniTEX is processing
latex.ltx
, it looks for a file called hyphen.cfg
; this file can
be used to control which hyphenation patterns are loaded. If a file
hyphen.cfg
cannot be found then iniTEX will load the file
hyphen.ltx
.
The file hyphen.ltx
loads the file hyphen.tex
if it can find it;
otherwise it stops with an error since a format with no hyphenation
patterns is not very useful. It then sets \language=0
and it sets
the values \lefthyphenmin=2
and \righthyphenmin=3
, which are
needed for American English.
Thus, if you want any other patterns to be loaded then you should
create a file hyphen.cfg
. For each language for which you wish to
load hyphenation patterns this file should:
\language=
<number>;
Note. The hyphenation files that are read in should only
set the hyphenation tables for the language, using the commands
\hyphenation
and \patterns
. In particular they should make no
assignments to the lowercase/uppercase tables (\lccode
and
\uccode
) and should not make any global command definitions to be
used after the file has been read. Unfortunately some older
hyphenation files do contain such settings; thus they are
incompatible with the mechanisms LATEX uses to ensure
independence of input and output encodings.
After this the file hyphen.cfg
should:
\language
to its default value;
\lefthyphenmin
and \righthyphenmin
to the correct values
for this default language.
There are packages available, such as `french', that can help you with
this configuration. The `babel' collection contains many examples of
setting up a multi-lingual LATEX format. The documentation in
lthyphen.dtx
(the source file for hyphen.ltx
) also contains some
useful examples.
[We intend in a future release of LATEX to provide a set of standard commands for use in configuring hyphenation.]