From 627d51418f363b0d9dba61e391d768d9d254b466 Mon Sep 17 00:00:00 2001 From: "Andreas L. Delmelle" Date: Mon, 21 Mar 2005 20:19:06 +0000 Subject: [PATCH] PR: Obtained from: Submitted by: Reviewed by: Updated xdocs to reflect the relocation of the hyphenation patterns to OFFO git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198533 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/xdocs/faq.xml | 2 +- .../content/xdocs/hyphenation.xml | 124 ++++++------------ 2 files changed, 43 insertions(+), 83 deletions(-) diff --git a/src/documentation/content/xdocs/faq.xml b/src/documentation/content/xdocs/faq.xml index b39103788..1904e3b86 100644 --- a/src/documentation/content/xdocs/faq.xml +++ b/src/documentation/content/xdocs/faq.xml @@ -555,7 +555,7 @@ Any easy way to check this is to cut&paste the source URL from the fo:extern

Make sure you have set the language and/or country attributes for an appropriate XSL-FO element (fo:page-sequence, fo:block or fo:character):

]]> -

See Standard Hyphenation Support for a list of supported language and country codes, and Custom Hyphenation Support for instructions on adding support for other languages and countries.

+

See Hyphenation Support for details and instructions on using hyphenation with FOP.

Explicitly enable hyphenation for an appropriate XSL-FO element (fo:block, fo:character):

]]>
diff --git a/src/documentation/content/xdocs/hyphenation.xml b/src/documentation/content/xdocs/hyphenation.xml index 03d74d1f3..9114bcfb8 100644 --- a/src/documentation/content/xdocs/hyphenation.xml +++ b/src/documentation/content/xdocs/hyphenation.xml @@ -23,77 +23,23 @@ $Revision$ -
- Standard Hyphenation Support -

The following table summarizes FOP's standard hyphenation support. -Please note that the "view" links reflect current CVS, and may be different than the contents of released code. See Hyphenation Patterns for a brief explanation of the contents of these files.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
language_COUNTRY codeDescriptionView Patterns (maintenance branch CVS)
enEnglishview
esSpanishview
fiFinnishview
huHungarianview
itItalianview
plPolishview
ptPortugueseview
ruRussianview
-
-
- Custom Hyphenation Support -
+
+ Hyphenation Support +
Introduction

FOP uses Liang's hyphenation algorithm, well known from TeX. It needs language specific pattern and other data for operation.

-

Because of licensing issues, - there are currently some significant holes in FOP's hyphenation support. - The information in this section 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 +

Because of licensing issues (and for + convenience), all hyphenation patterns for FOP are made available through + the Objects For + Formatting Objects project.

+ If you have made improvements to an existing FOP hyphenation pattern, + or if you have created one from scratch, please consider contributing these + to OFFO 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 @@ -110,19 +56,19 @@ Please note that the "view" links reflect current CVS, and may be different than The user is responsible to settle license issues for hyphenation pattern files that are obtained from non-Apache sources.

-
+
Sources of Custom 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. 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.
  2. + {fop-dir}/hyph/hyphenation.dtd.
  3. Name this new file following this schema: languageCode_countryCode.xml. The country code is optional, and should be used only if needed. For example: @@ -142,18 +88,33 @@ Please note that the "view" links reflect current CVS, and may be different than on it being two letter strings in a few places. So you can make up your own codes for custom hyphenation patterns, but they should be two letter strings too (patches for proper handling extensions are welcome)
  4. -
  5. There are two ways to make the FOP-compatible hyphenation pattern file - accessible to FOP: +
  6. There are basically three ways to make the FOP-compatible hyphenation pattern + file(s) accessible to FOP:
      -
    • 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.
    • +
    • Download the precompiled JAR from OFFO + and place it either in the {fop-dir}/lib directory, or + in a directory of your choice (and append the full path to the JAR to + the environment variable FOP_HYPHENATION_PATH).
    • +
    • Download the desired FOP-compatible hyphenation pattern file(s) from + OFFO, place + them in the directory {fop-dir}/hyph, and run Ant with build target + hyphenation-jar. This will create a JAR containing the + compiled patterns in {fop-dir}/build that will be added to the + classpath on the next run. + (When FOP is built from scratch, and there are pattern source file(s) + present in {fop-dir}/hyph, this JAR will automatically + be created from the supplied pattern(s)).
    • +
    • Put the pattern source file(s) into a directory of your choice and + configure FOP to look for custom patterns in this directory, by setting the + <hyphenation-dir> + configuration option.
  7. + Either of these three options will ensure hyphenation is working when using + FOP from the command-line. If FOP is being embedded, remember to add the location(s) + of the hyphenation JAR(s) to the CLASSPATH (option 1 and 2) or to set the + <hyphenation-dir> + configuration option programmatically (option 3).
@@ -162,10 +123,9 @@ Please note that the "view" links reflect current CVS, and may be different than

If you would like to build your own hyphenation pattern files, or modify existing ones, this section will help you understand how to do so. Even when creating a pattern file from scratch, it may be beneficial to start - with an existing file and modify it. See Standard - Hyphenation Support or the source distribution (src/hyph) for - examples. Here is a brief explanation of the contents of FOP's hyphenation - patterns:

+ with an existing file and modify it. See + OFFO's Hyphenation page for examples. + Here is a brief explanation of the contents of FOP's hyphenation patterns:

The remaining content of this section should be considered "draft" quality. It was drafted from theoretical literature, and has not been tested against actual FOP behavior. It may contain errors or omissions. -- 2.39.5