Installation of Compiled Hyphenation Patterns for FOP
Installation of Compiled Hyphenation Patterns for FOP
The jar file fop-hyph.jar contains the XML hyphenation patterns compiled for FOP. To use these hyphenation patterns with FOP, do one of the following:
- If you invoke FOP using the shell script fop,
the batch file fop.bat, the command file
fop.cmd, or the JScript file fop.js,
distributed with FOP, do one of the following:
- Copy the jar file fop-hyph.jar into the lib directory of the your FOP installation, or
- copy the jar file fop-hyph.jar into the build directory of the your FOP installation, or
- copy the jar file fop-hyph.jar into a directory of your choice and set the environment variable FOP_HYPHENATION_PATH equal to the path of the chosen directory. In Unix shells, export the variable. On Unix you can also set this variable in your fop rc file $HOME/.foprc.
- If you invoke FOP in your own way, include fop-hyph.jar into your classpath.
See also the hyphenation page of FOP's web site.
Configuring FOP for hyphenation
In most cases no configuration is required. You need to add special configuration if you want FOP to use a different pattern than its default.
By default, FOP searches for a pattern named ll if you specify language="ll" in your FO file. FOP searches for a pattern named ll_CC if you specify language="ll" country="CC" in your FO file; if that does not exist, FOP searches for a pattern named ll.
You may want to use a different hyphenation pattern, e.g. de_1901 instead of de, or en_GB instead of en (which is the US version) for Indian English. You configure this by adding a hyphenation-pattern element to your configuration file. It has an attribute lang and an optional attribute country. Its content is the base name of the hyphenation pattern file to use for that language and country. See also the configuration page for FOP of FOP's web site. Example:
- <hyphenation-pattern lang="de">de_1901</hyphenation-pattern>
- <hyphenation-pattern lang="en" country="IN">en_GB</hyphenation-pattern>
Note that configuration can be used as of version 1.1 of FOP.