From: William Victor Mote Date: Thu, 10 Jul 2003 19:57:20 +0000 (+0000) Subject: 1. rearrange content X-Git-Tag: Root_Temp_KnuthStylePageBreaking~1300 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=994cf4593613e4ef75cc33abb77480bbea782c9e;p=xmlgraphics-fop.git 1. rearrange content 2. add cross-ref to configuration file git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196681 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/documentation/content/xdocs/hyphenation.xml b/src/documentation/content/xdocs/hyphenation.xml index ed69282da..92f77904e 100644 --- a/src/documentation/content/xdocs/hyphenation.xml +++ b/src/documentation/content/xdocs/hyphenation.xml @@ -6,39 +6,46 @@ FOP: Hyphenation -
- Setting up hyphenation -

FOP comes already with some hyphenation patterns. -If you need a hyphenation pattern which isn't included in the distribution, do the following:

+
+ Introduction +

FOP uses an XML-based TeX-like hyphenation pattern scheme. +Hyphenation pattern files for many languages are included in the standard FOP distribution. +However, because of licensing issues, there are currently some significant holes in FOP's hyphenation support. +The information on this page is intended to help you work around these limitations, if possible, add support for other languages, or enhance FOP's support of current languages.

+ If you have access to hyphenation patterns that are licensed in an Apache-compatible way, or if you have made improvements to an existing FOP hyphenation pattern, or if you have created one from scratch, please consider contributing these to FOP so that they can benefit other FOP users as well. Please inquire on the FOP User mailing list. +
+
+ License Issues +

Many of the hyphenation files distributed with TeX and its offspring are licenced under the LaTeX Project Public License (LPPL), which prevents them from being distributed with Apache software. +Although Apache FOP cannot redistribute hyphenation pattern files that do not conform with its license scheme, that does not necessarily prevent users from using such hyphenation patterns with FOP. +However, it does place on the user the responsibility for determining whether the user can rightly use such hyphenation patterns under the hyphenation pattern license.

+ The user is responsible to settle license issues for hyphenation pattern files that are obtained from non-Apache sources. +
+
+ Sources of Hyphenation Pattern Files +

The most important source of hyphenation pattern files is the CTAN TeX Archive.

+
+
+ Installing Custom Hyphenation Patterns +

To install custom a custom hyphenation pattern for use with FOP:

    -
  1. Get the TeX hyphenation pattern file and turn it into an xml file which -conforms to the hyphenation.dtd in the subdirectory {fop-dir}/src/hyph.
  2. +
  3. Convert the TeX hyphenation pattern file to the FOP format. The FOP format is an xml file conforming to the DTD found at {fop-dir}/src/hyph/hyphenation.dtd.
  4. Name this new file following this schema: languageCode_countryCode.xml. -If you don't need a country code, leave it out, e.g. the file name for an American -english hyphenation pattern would look like this: en_US.xml. -For an Italian file: it.xml. -Language and country codes must be the same as in XSL-FO, that is follow ISO 639 and -ISO 3166 -respectively. -NOTE: The ISO 639/ISO 3166 convention is that language names are -written in lower case, while country codes are written in upper case.
  5. -
  6. If you have built your new hyphenation pattern file successfully there are -two ways to make it accessible to FOP. +The country code is optional, and should be used only if needed. For example: +
      +
    • en_US.xml would be the file name for an American English hyphenation pattern.
    • +
    • it.xml would be the file name for an Italian hyphenation pattern.
    • +
    +The language and country codes must match the XSL-FO input, which follows ISO 639 (languages) and +ISO 3166 (countries). +NOTE: The ISO 639/ISO 3166 convention is that language names are written in lower case, while country codes are written in upper case.
  7. +
  8. There are two ways to make the FOP-compatible hyphenation pattern file accessible to FOP:
      -
    • Put this new file into the directory {fop-dir}/src/hyph and rebuild FOP. The file will be picked up and added to fop.jar.
    • -
    • Put the file into a directory of your choice and specify this directory -in the userconfig.xml in the entry <hyphenation-dir>.
    • +
    • Place the FOP-compatible hyphenation pattern file into the directory {fop-dir}/src/hyph and rebuild FOP. The file will be picked up and added to fop.jar.
    • +
    • Put the file into a directory of your choice and configure FOP to look for custom patterns in this directory, by setting the <hyphenation-dir> configuration option.
-
- Places to find TeX hyphenation pattern files -

The most important place to find hyphenation pattern file is the CTAN TeX Archive.

-
- You have to carefully check license issues when using hyphenation pattern files from other places. -The licenses of the files found on the Internet are not always clear. - Most of the files published in the CTAN Archive are licenced under the LaTeX Project Public License (LPPL). -The Apache Foundation can't redistribute files under this license. If you want to use such a file you have to decide for yourself if you can use (and possibly distribute) the file under these conditions.