Re: Keeping together a text line with the first row in a table

At 2011-04-13 14:18 +0200, Lars Bjørndal wrote:
>The structure is one line of text, and then a table with several
>rows, then one line of text, and a new table and so on. The single lines
>of text is actually a heading, and should not go to the bottom line of a
>page. Instead, it should go to a new page.

To force it to a new page, use break-before="page" on the heading.

>...
>How can I keep together the heading with the first row in the table?

To keep the heading together with the table, but 
not force a new page unless necessary, use 
keep-with-next="always" on the heading.  If both 
the heading and the start of the table fit on the 
page, they will go on the page without a page 
break.  If the two do not fit on the page, then 
the formatter should introduce a page-break.

There are some subtleties you might need.  For 
example, if you have multi-column pages and you 
only want to introduce a column-break instead of 
a page-break, then use keep-with-next.within-column="always".

The value "always" can be replaced with a number 
when you are nesting keeps, but I doubt that FOP 
supports the numeric values and associated 
complexity.  I don't use FOP but I'm assuming it 
at the least supports "always".

I hope this helps.

. . . . . . . . . . . Ken

--
Contact us for world-wide XML consulting & instructor-led training
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Received on Wednesday, 13 April 2011 14:41:52 UTC