w:keepLines (Keep Lines Together)

Prevents all lines of the paragraph from being split across a page break.

Parent elements

Description

w:keepLines prevents all lines of the paragraph from being split across a page break, keeping the entire paragraph on one page. It is an on/off toggle property defined in ECMA-376 Part 1 §17.3.1.14.

If the paragraph is too tall to fit on a single page, the constraint is relaxed and the paragraph splits normally.

Attributes

Attribute Type Possible Values Description
w:val ST_OnOff true, 1, on (enabled) / false, 0, off (disabled). Omitting the attribute is equivalent to true. Toggles keep-lines-together on or off.

Examples

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