Hyphenation

Content Credits
| Design: Web Maestro Clay Leeds
## Installation of Compiled Hyphenation Patterns for FOP-stable Installation of Compiled Hyphenation Patterns for FOP Configuring FOP for hyphenation ### 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.xml if you specify language="ll" in your FO file. FOP searches for a pattern named ll_CC.xml if you specify language="ll" country="CC" in your FO file; if that does not exist, FOP searches for a pattern named ll.xml. You may want to use a different hyphenation pattern, e.g. de_1901.xml instead of de.xml, or en_GB.xml instead of en.xml (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.