next up previous contents
Next: Configuring the font definition Up: Configuring the LaTeX format Previous: Hyphenation configuration

hyphen.cfg

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:

If the patterns you use require some definitions or assignments then a group should be used to keep such changes local to their file.

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:

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


next up previous contents
Next: Configuring the font definition Up: Configuring the LaTeX format Previous: Hyphenation configuration

Rainer Schoepf
Thu Jan 8 11:52:05 MET 1998