From 63b8aa6b822ad4901302c9bc95a4a6045b456417 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 28 May 2003 08:49:02 +0000 Subject: [PATCH] Improved documentation of hyphenation git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196471 13f79535-47bb-0310-9956-ffa450edef68 --- .../content/xdocs/configuration.xml | 46 ++++++++++++++----- src/documentation/content/xdocs/faq.xml | 19 ++++++-- 2 files changed, 49 insertions(+), 16 deletions(-) diff --git a/src/documentation/content/xdocs/configuration.xml b/src/documentation/content/xdocs/configuration.xml index c73d24321..c7160ab4d 100644 --- a/src/documentation/content/xdocs/configuration.xml +++ b/src/documentation/content/xdocs/configuration.xml @@ -10,7 +10,7 @@
How to configure FOP -

In the directory xml-fop/conf you will find two configuration files. One of them, +

In the directory {fop-dir}/conf you will find two configuration files. One of them, config.xml, is only intended for FOP developers, who want to add new default values to some FOP feature. Don't change this file. For user configuration there is a file called userconfig.xml. It contains templates for all settings a user can change. Most of them are @@ -25,19 +25,20 @@

Setting up hyphenation -

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

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

  1. Get the TeX hyphenation pattern file and turn it into an xml file which -conforms to the hyphenation.dtd in the subdirectory /src/hyph. +conforms to the hyphenation.dtd in the subdirectory {fop-dir}/src/hyph.
  2. -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 +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 @@ -46,20 +47,41 @@ 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.
  3. -If you have build your new hyphenation pattern file successfully there are +If you have built your new hyphenation pattern file successfully there are two ways to make it accessible to FOP.
    • -Put this new file into the directory /src/hyph and rebuild FOP. The file will -be picked up and added to the fop.jar. +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>. +in the userconfig.xml in the entry <hyphenation-dir>.
+
+ Places to find TeX hyphenation pattern files +

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

+
    +
  • 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. +
diff --git a/src/documentation/content/xdocs/faq.xml b/src/documentation/content/xdocs/faq.xml index bc10c39af..16ce66d12 100644 --- a/src/documentation/content/xdocs/faq.xml +++ b/src/documentation/content/xdocs/faq.xml @@ -543,14 +543,25 @@ Any easy way to check this is to cut&paste the source URL from the fo:extern

- + Hyphenation does not work.

- Set the language attribute somewhere. Check whether you use a language - for which hyphenation is supported. Supported languages can be deduced - from the files in the hyph directory of the FOP source distribution. + Set the language attribute somewhere and explicitly enable hyphenation. + Check whether you use a language for which hyphenation is supported. + Supported languages can be deduced from the files in the {fop-dir}/src/hyph + directory of the FOP source distribution. If you want to use a language + FOP currently doesn't hyphenate, please see the + Configuration page.

+

+ Set the language (on fo:page-sequence, fo:block or fo:character): +

+ ]]> +

+ Enable hyphenation on a block: +

+ ]]>
-- 2.39.5