Often you will want to make sure that certain content is kept together. For example, a paragraph following a heading should stay with that heading. This type of thing is handled with the keep attributes described below.
The keep-with-previous attribute instructs the processor to try to keep an FO on the same page, column and line as the previous FO. Similarly, the keep-with-next attribute instructs the processor to try to keep an FO on the same page, column and line as the following FO. You can be more specific by appending .within-line, .within-column, or .within-page to the attribute (e.g, keep-with-next.within-page). Possible values for these attributes are shown below:
The keep-together attribute is used to keep chunks of content together.
Note that breaks take precedence over keeps.