Wrap at hyphens?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Wrap at hyphens?

Daniel Noll-4
I've just discovered that when I have a table cell with long hyphenated
words in it, that FOP doesn't break at the hyphens, whereas it does
break if I use spaces instead.

Is there a particular setting I can turn on which will make FOP wrap at
hyphens as well as spaces?

Daniel

--
Daniel Noll

NUIX Pty Ltd
Level 8, 143 York Street, Sydney 2000
Phone: (02) 9283 9010
Fax:   (02) 9283 9020

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Wrap at hyphens?

Sajeesh N Kakkat

Can you give the fo block properties which you are using in the cell ?
Usually if you give hyphenate=true and specify language=en ( assuming the
text in the cell is English )

Thanks and regards,

Sajeesh
______________________
SATURN TOWER, IBM Bereich,
1. Stock, Leonhard Bernstein Strasse 10, 1220 Wien
Tel. (+43 1) 21145-2264


                                                                           
             Daniel Noll                                                  
             <[hidden email].                                            
             au>                                                        To
                                       [hidden email]    
             06/06/2005 06:19                                           cc
             AM                                                            
                                                                   Subject
                                       Wrap at hyphens?                    
             Please respond to                                            
                 fop-users                                                
                                                                           
                                                                           
                                                                           
                                                                           




I've just discovered that when I have a table cell with long hyphenated
words in it, that FOP doesn't break at the hyphens, whereas it does
break if I use spaces instead.

Is there a particular setting I can turn on which will make FOP wrap at
hyphens as well as spaces?

Daniel

--
Daniel Noll

NUIX Pty Ltd
Level 8, 143 York Street, Sydney 2000
Phone: (02) 9283 9010
Fax:   (02) 9283 9020

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]





---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Wrap at hyphens?

J.Pietschmann
In reply to this post by Daniel Noll-4
Daniel Noll wrote:
> I've just discovered that when I have a table cell with long hyphenated
> words in it, that FOP doesn't break at the hyphens, whereas it does
> break if I use spaces instead.

FOP ends lines *only* at spaces (and a few other special characters).
Hyphens (dashes) aren't special.
>
> Is there a particular setting I can turn on which will make FOP wrap at
> hyphens as well as spaces?

No. Insert zero width spaces after the dashes, if you need.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Wrap at hyphens?

Daniel Noll-4
J.Pietschmann wrote:

> FOP ends lines *only* at spaces (and a few other special characters).
> Hyphens (dashes) aren't special.
> <snip>
> No. Insert zero width spaces after the dashes, if you need.

Thanks for that advice, it worked perfectly since we do have the ability
to tweak the values which are going into these columns. :-)

The interesting thing is that hyphenation itself provides an extremely
undesirable result in this situation.

Using this FO:
    <fo:block text-align="left" font-size="10" hyphenate="true">
        ...
    </fo:block>

with English, FOP renders it like this:

X-
Stupidly-
Large-
Header-
To-See-If-It-Wraps

Using the zero-width space approach, FOP renders it like this:

X-Stupidly-Large-
Header-To-See-If-
It-Wraps

The second saves a couple of lines of output, and thus is definitely the
right way to go.

Daniel

--
Daniel Noll

NUIX Pty Ltd
Level 8, 143 York Street, Sydney 2000
Phone: (02) 9283 9010
Fax:   (02) 9283 9020

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]