Next: Diversions, Previous: Deferring Output, Up: GNU troff Reference [Contents][Index]
Traps are locations in the output or conditions on the input that, when reached or fulfilled, call a specified macro. These traps can occur at a given location on the page, at a given location in the current diversion (together, these are known as vertical position traps), at a blank line, at a line with leading space characters, after a quantity of input lines, or at the end of input. Macros called by traps are passed no arguments. Setting a trap is also called planting one. It is said that a trap is sprung if its condition is fulfilled.
| • Vertical Position Traps | ||
| • Diversion Traps | ||
| • Input Line Traps | ||
| • Blank Line Traps | ||
| • Leading Space Traps | ||
| • End-of-input Traps |