groff: Input Line Traps

 
 5.24.3 Input Line Traps
 -----------------------
 
  -- Request: .it n macro
  -- Request: .itc n macro
      Set an input line trap.  N is the number of lines of input that may
      be read before springing the trap, MACRO is the macro to be
      invoked.  Request lines are not counted as input lines.
 
      For example, one possible use is to have a macro that prints the
      next N lines in a bold font.
 
           .de B
           .  it \\$1 B-end
           .  ft B
           ..
           .
           .de B-end
           .  ft R
           ..
 
      The 'itc' request is identical except that an interrupted text line
      (ending with '\c') is not counted as a separate line.
 
      Environments::); switching to another environment disables the
      current input trap, and going back reactivates it, restoring the
      number of already processed lines.