You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by robert frapples <oy...@gmail.com> on 2004/12/13 22:17:08 UTC

hyphenation

I call fop with fop.bat -c "C:\fop\cfg.xml" . . .
C:\fop\cfg.xml has
<entry><key>hyphenation-dir</key><value>C:\fop\hyph</value></entry>
C:\fop\hyph\en.xml has:
. . .
<patterns>
5(
,5
)5
. . .

Shouldn't this make it tend to break before and after parenthesis, and
after commas? Am I missing something?

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: hyphenation

Posted by "J.Pietschmann" <j3...@yahoo.de>.
robert frapples wrote:
> This leads me to believe that I should be using 7.  With 7 or with 1
> (and no other 1's), it still breaks:
> Frap-
> ples,Robert(Age-
> ncy)
> 
> I also tried setting this in my {src-dir}/src/hyph/en.xml and
> recompiling fop.jar.  Still no luck.

Try running
  java -classpath ...fop.jar \
    org.apache.fop.layout.hyphenation.HyphenationTree
This class has a main function, which can be used for debugging
(check the source for details). You can use this to check whether
the problem is with the hyphenation librabry code and/or your
pattern definitions or whether it is in the code invoking the
hyphenator in the line layout.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: hyphenation

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: robert frapples [mailto:oyenstikker@gmail.com]
> 

Hi,

> "Odd numbers represent an acceptable location for a hyphen, with
> higher values overriding lower inhibiting values. 

Sorry. Indeed! Don't know where my head was... Upside-down it seems :-)

> 
> This leads me to believe that I should be using 7.  With 7 or with 1
> (and no other 1's), it still breaks:
> Frap-
> ples,Robert(Age-
> ncy)
> 

Beats me... Anyone who can shed some light on this?

TIA!

Greetz,

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: hyphenation

Posted by robert frapples <oy...@gmail.com>.
"Odd numbers represent an acceptable location for a hyphen, with
higher values overriding lower inhibiting values. . .Due to a bug
currently patterns with values of 8 and greater don't have an effect,
so don't wonder." (from http://xml.apache.org/fop/hyphenation.html)

This leads me to believe that I should be using 7.  With 7 or with 1
(and no other 1's), it still breaks:
Frap-
ples,Robert(Age-
ncy)

I also tried setting this in my {src-dir}/src/hyph/en.xml and
recompiling fop.jar.  Still no luck.  Later on (probably tomorrow)
I'll attach an example xml,xsl,en.xml snippet.

On Tue, 14 Dec 2004 18:54:46 +0100, Andreas L. Delmelle
<a_...@pandora.be> wrote:
> > Just to make sure, if i added to <classes>:
> > )
> > (
> > ,
> >
> > and to <patterns>:
> > 7(
> > )7
> > ,7
> >
> > And the text: "Frapples,Robert(Agency)" is split at 15
> > characters, I should get:
> > "Frapples,-
> > Robert(Agency)"
> >
> > Right?
> 
> Not necessarily... '7' indicates an acceptable possibility for hyphenating,
> but as long as there's a possibility of breaking it at a '3', the latter
> will be chosen.
> 
> Besides that:
> F-R-A-P-P-L-E-S-,-R-O-B-E-R-T
> 
> is 15 characters, so I'd expect it to break between 'Robert' and '('.
> 
> What result do you get?

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: hyphenation

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: robert frapples [mailto:oyenstikker@gmail.com]
>

Hi,

> Just to make sure, if i added to <classes>:
> )
> (
> ,
>
> and to <patterns>:
> 7(
> )7
> ,7
>
> And the text: "Frapples,Robert(Agency)" is split at 15
> characters, I should get:
> "Frapples,-
> Robert(Agency)"
>
> Right?

Not necessarily... '7' indicates an acceptable possibility for hyphenating,
but as long as there's a possibility of breaking it at a '3', the latter
will be chosen.

Besides that:
F-R-A-P-P-L-E-S-,-R-O-B-E-R-T

is 15 characters, so I'd expect it to break between 'Robert' and '('.

What result do you get?

Greetz,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: hyphenation

Posted by robert frapples <oy...@gmail.com>.
I tried recompiling my fop.jar with the changes in
{source-dir}/hyph/en.xml, still no luck.

Just to make sure, if i added to <classes>:
)
(
,

and to <patterns>:
7(
)7
,7

And the text: "Frapples,Robert(Agency)" is split at 15 characters, I should get:
"Frapples,-
Robert(Agency)"

Right?


On Tue, 14 Dec 2004 07:24:39 -0500, robert frapples
<oy...@gmail.com> wrote:
> On Mon, 13 Dec 2004 23:17:01 +0100, J.Pietschmann <j3...@yahoo.de> wrote:
> > robert frapples wrote:
> > > C:\fop\hyph\en.xml has:
> > > . . .
> > > <patterns>
> > > 5(
> > > ,5
> > > )5
> > > . . .
> > >
> > > Shouldn't this make it tend to break before and after parenthesis, and
> > > after commas? Am I missing something?
> >
> > You have to add parenthesis and comma to the "classes" entry. And
> > you'll get a hyphen unless you redefined the hyphen character to
> > be something like a ZWS.
> > 
> I added, to <classes>
> (
> )
> ,
> 
> Still no luck.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: hyphenation

Posted by robert frapples <oy...@gmail.com>.
On Mon, 13 Dec 2004 23:17:01 +0100, J.Pietschmann <j3...@yahoo.de> wrote:
> robert frapples wrote:
> > C:\fop\hyph\en.xml has:
> > . . .
> > <patterns>
> > 5(
> > ,5
> > )5
> > . . .
> >
> > Shouldn't this make it tend to break before and after parenthesis, and
> > after commas? Am I missing something?
> 
> You have to add parenthesis and comma to the "classes" entry. And
> you'll get a hyphen unless you redefined the hyphen character to
> be something like a ZWS.
> 
I added, to <classes>
(
)
,

Still no luck.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: hyphenation

Posted by "J.Pietschmann" <j3...@yahoo.de>.
robert frapples wrote:
> C:\fop\hyph\en.xml has:
> . . .
> <patterns>
> 5(
> ,5
> )5
> . . .
> 
> Shouldn't this make it tend to break before and after parenthesis, and
> after commas? Am I missing something?

You have to add parenthesis and comma to the "classes" entry. And
you'll get a hyphen unless you redefined the hyphen character to
be something like a ZWS.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org