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 Daniel Noll <da...@nuix.com.au> on 2005/06/06 06:19:46 UTC

Wrap at hyphens?

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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Wrap at hyphens?

Posted by Daniel Noll <da...@nuix.com.au>.
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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Wrap at hyphens?

Posted by "J.Pietschmann" <j3...@yahoo.de>.
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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Wrap at hyphens?

Posted by Sajeesh N Kakkat <ks...@in.ibm.com>.
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                                                   
             <daniel@nuix.com.                                             
             au>                                                        To 
                                       fop-users@xmlgraphics.apache.org    
             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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org





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