Bug#526092: fop wrapper script doesn't easily support hyphenation jar
Paul Millar
paul.millar at desy.de
Wed Apr 29 08:51:46 UTC 2009
Hi Vincent,
On Wednesday 29 April 2009 10:28:22 Vincent Fourmond wrote:
> On Wed, Apr 29, 2009 at 9:51 AM, Paul Millar <paul.millar at desy.de> wrote:
> > Previous versions of fop deb package contained /usr/bin/fop as some
> > fop-specific script that allowed it's behaviour to be tailored through
> > parameters held in an external file: /etc/fop.conf [...]
>
> Thanks for your report. I'll add that back as soon as I can (say,
> tomorrow ?).
Sure, no problem.
I have a work-around; so, for me, this isn't urgent.
> Where could I find this hypenation jar ?
There's a separate project "OFFO" on SourceForge that packages the hyphenation
rules as a JAR file:
http://offo.sourceforge.net/
I've also copied below a section from a README I wrote (for a project I'm
working on). It describes, amongst other things, how to configure fop with
hyphenation support.
HTH,
Paul.
---
Where to get things:
Many distributions package the bare essentials. Some caveats: make
sure the version of FOP is fairly recent: 0.9x is a requirement.
For DocBook, make sure you get DocBookXML support (i.e., the
stylesheets). DocBook is (or "used to") come with SGML support, but
we're using pure XML so the SGML version of DocBook is of no use.
o SF download page for DocBook XSLT (you want "docbook-xsl" package)
http://sourceforge.net/project/showfiles.php?group_id=21935
o FOP download mirror selection (get latest version):
http://www.apache.org/dyn/closer.cgi/xmlgraphics/fop
o Download page for OFFO hyphenation rules. You will want the
offo-hyphenation-fop-stable.zip file:
http://sourceforge.net/project/showfiles.php?group_id=116740
o Download page for the w3m text-mode web browser:
http://sourceforge.net/project/showfiles.php?group_id=39518
Installing the hyphenation rules:
Here's a step-by-step method of installing the fop hyphenation rules
for all users (requires root access).
unzip offo-hyphenation-fop-stable.zip
sudo mkdir -p /usr/local/share/java
sudo cp offo-hyphenation-fop-stable/fop-hyph.jar /usr/local/share/java
cat > /etc/fop.conf << EOF
FOP_HYPHENATION_PATH=/usr/local/share/java/fop-hyph.jar
EOF
A guide to installing the hyphenation rules as a normal user:
unzip offo-hyphenation-fop-stable.zip
mkdir -p ~/local/share/java
cp offo-hyphenation-fop-stable/fop-hyph.jar ~/local/share/java
cat > ~/.foprc << EOF
FOP_HYPHENATION_PATH=$HOME/local/share/java/fop-hyph.jar
EOF
N.B. we assume that $HOME is expanded to your home directory by the
shell; if this doesn't happen, it should happen within the fop
wrapper shell. If it doesn't happen in either place, you're
very unlucky and must substitute the value in ~/.foprc yourself.
More information about the pkg-java-maintainers
mailing list