setting and removing page traps
.wh N xxexecute macro xx at vertical page position N. A negative N counts from the bottom of the page upwards. Overrides any previously installed trap at that location. The default scale for N is v, the distance between two lines.
Traps and .ms macros interfere in some weird way; in particular, I don't know how to cause traps on the very first page, even if my document doesn't have a cover sheet or title.
.wh Npops a trap at N, if any.
changing a page trap position
.ch xx Nmoves the trap for macro xx to page position N. On our implementation, it moves the first-installed such trap (of any number of traps that invoke the same macro). As with .wh, the default scale for N is v. When two traps are moved to the same position with .ch, they stay distinct and are both executed.
.ch xxpops a trap for macro xx, if any.
distance to the next page trap
\\n(.tthe number register .t holds the distance to the next trap, or to the page bottom if there are no traps.
trap input line count
.it N xxcalls the macro xx after all N lines of text input have been read.
.em xxcalls the macro xx after all input has been read.
.dt N xxMakes macro xx execute a distance of vertical N (default scale: v) from the start of the current diversion.