You can specify the wrap-option attribute in your fo:block
like so:
<fo:block wrap-option="wrap"> ... stuff </fo:block>
Here's the XSL-FO specification for this attribute:
XSL Definition:
Value: no-wrap | wrap | inherit
Initial: wrap
Applies to: fo:block, fo:inline, fo:page-number,
fo:page-number-citation
Inherited: yes
Percentages: N/A
Media: visual
Values have the following meanings:
no-wrap
No line-wrapping will be performed.
In the case when lines are longer than
the available width of the
content-rectangle, the overflow will
be treated in accordance with the
"overflow" property specified on the
reference-area.
wrap
Line-breaking will occur if the
line overflows the available block
width. No special markers or other
treatment will occur.
Specifies how line-wrapping
(line-breaking) of the content of the
formatting object is to be handled.
Implementations must support the
"no-wrap" value, as defined in this
Recommendation, when the value of
"linefeed-treatment" is "preserve".
You can also define the wrap-option
attribute in an fo:table-cell
<fo:table-cell wrap-option="wrap"> ... </fo:table-cell>
and the fo:block
s within will inherit the property.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…