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 Matthias Müller <py...@yahoo.de> on 2007/07/19 11:07:41 UTC
Forced Word Wrap
Hi Everybody,
I have multiple table-cells with String like that "01,02,03,04,05 ...", they don't fit to the limited width of the cell. So there's no chance to hyphenate this like a normal word. Is there a way to force a word wrap? Do i need to write a hyphenate pattern instead?
BTW, i use FOP.093 with Cocoon
best regards, Matthias
__________________________________
Machen Sie Yahoo! zu Ihrer Startseite. Los geht's:
http://de.yahoo.com/set
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Forced Word Wrap
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jul 19, 2007, at 11:07, Matthias Müller wrote:
Hi
> I have multiple table-cells with String like that
> "01,02,03,04,05 ...", they don't fit to the limited width of the
> cell. So there's no chance to hyphenate this like a normal word. Is
> there a way to force a word wrap? Do i need to write a hyphenate
> pattern instead?
The strategy Abel described is currently the only one that works in
FOP 0.93. Hyphenation will not work unfortunately, since you're
dealing with numbers not words. If it were sequences like
'AAABBBJJJKKKLLLL', then hyphenation would work, but not with commas
and digits.
Strictly speaking, there is also the wrap="wrap" property which would
force line-wrapping, no matter what, but the last time I tried, this
was not functional in FOP Trunk.
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Forced Word Wrap
Posted by "Abel Braaksma (online)" <ab...@xs4all.nl>.
One thing to consider as a resolution might be to use XSLT to insert
soft hyphens on places where you would like the word to be broken.
In XSLT 2.0 this is easiest, like so:
<!-- replace all comma's with a comma and a SHY -->
<xsl:sequence select="replace(., ',', ',­')" />
In XSLT 1.0 you'll need a recursive template to do the replacements.
Whether you can use some feature of xsl-fo to achieve the same
effect, I don't know.
Cheers,
-- Abel Braaksma
PS: rereading your question reveals that you don't want a hyphen.
Use the same trick but then with a zero width space (U+200B). Check
that your font supports the ZWSP.
> Hi Everybody,
>
> I have multiple table-cells with String like that "01,02,03,04,05
> ...", they don't fit to the limited width of the cell. So there's no
> chance to hyphenate this like a normal word. Is there a way to force
> a word wrap? Do i need to write a hyphenate pattern instead?
>
> BTW, i use FOP.093 with Cocoon
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org