Macro Language Reference > PIs > Text > <?tpkeep>
  
<?tpkeep>
Description
Activates/deactivates the 'keep with next' option for the current paragraph to ensure it always appears in the same column as the next paragraph. If the next paragraph moves to the top of the next column or page, the current paragraph will also move.
This keep PI is usually applied with a priority parameter - content can be designated to be kept together as long as this doesn't result in an empty column or partial column. When this exception does occur, PTC ALD will attempt to break the page at the lowest priority it can find irrespective of the amount of resulting content that is carried over. Priority value ranges are explained below: note that PTC ALD can only ignore keep instructions with a priority below 210 if a whole column overflows, and can only ignore those below 110 if a partial column overflows, i.e. a column that has been cropped to avoid other frames, such as those containing images at the top of a column.
Priority
Usage
0
No keep applied (default value)
1 and 255
Absolute - always apply keep regardless of effect
2 - 109
Low priority, keep only if something fits in the column or partial column
110 - 209
Medium priority, keep unless this leaves a whole column empty
210 - 254
Reserved for future enhancements
Syntax
<?tpkeep priority:n?>
<?tpkeep>
[no parameter]
Invoke the Keep whole paragraph with next dialog box.
priority
An arbitrary figure may be applied here based on the guidelines given above. Note though that the Keep whole paragraph with next dialog contains suggested values, which are explained here:
0
Off
100
On: But do not leave empty partial columns
200
On: But do not leave empty whole columns.
255 (or 1)
On: Always: the current paragraph is kept with the next paragraph at all times.
 
The priority values of 100 and 200 entered by the dialog correspond roughly to the 109 and 209 thresholds respectively: this is to allow some leeway in specifying slightly higher priorities manually, that still have the same effect.
Additional Information
A <?tpkeep> can also be entered part way through a paragraph to keep the rest of that paragraph's lines with the next paragraph.
Keep commands work to slightly different rules when included in a cell in a table, since each cell can be seen as a "mini column" which forms parts of a hierarchy where each cell is a column in itself, each row can contain multiple cells, etc. This <?tpkeep> command is superceded by the table's row keeps and hence will be ignored if it is placed at the end of a cell , i.e. the content of the cell will not keep with content in the next cell.