17.3.1.14 keepLines

This element specifies that all lines of this paragraph should be maintained on a single page whenever possible.

[Note: This means that if the contents of the current paragraph would normally span across two pages due to the placement of the paragraph’s text, all lines in this paragraph should be moved onto the next page to ensure they are displayed together. If this is not possible because all lines in the paragraph would exceed a single page in any case, then lines in this paragraph should start on a new page, with page breaks as needed afterwards.

If this element is omitted on a given paragraph, its value is determined by the setting previously set at any level of the style hierarchy (i.e., that previous setting remains unchanged). If this setting is never specified in the style hierarchy, then this property shall not be applied. end note]

[Example: Consider a WordprocessingML document in which a code fragment (such as the schema fragments in this document) are defined such that they should never be broken across a page boundary in order to improve readability. This constraint would be specified using the following paragraph properties in WordprocessingML:

<w:pPr>
  <w:keepLines />
</w:pPr>

This setting ensures that the schema fragment is displayed on one page if possible. end example]

This element’s content model is defined by the common boolean property definition in 17.17.4.

Last updated on