Next: , Previous: , Up: Traps   [Contents][Index]


5.28.1 Vertical Position Traps

A vertical position trap calls a macro when the formatter’s vertical drawing position reaches or passes, in the downward direction, a certain location on the output page or in a diversion. Its applications include setting page headers and footers, body text in multiple columns, and footnotes.

Request: .vpt [b]
Register: \n[.vpt]

Enable or disable vertical position traps per Boolean expression b. They are enabled by default, and if b is omitted. Vertical position traps are those set by the wh request or by dt within a diversion. Vertical position trap enablement is global. Its status is stored in the .vpt read-only register.

A page can’t be ejected if vpt is set to zero; see The Implicit Page Trap.