Previous: Blank Line Traps, Up: Traps


5.24.5 End-of-input Traps

— Request: .em macro

Set a trap at the end of input. macro is executed after the last line of the input file has been processed.

For example, if the document had to have a section at the bottom of the last page for someone to approve it, the em request could be used.

          
          .de approval
          .  ne 5v
          .  sp |(\\n[.t] - 6v)
          .  in +4i
          .  lc _
          .  br
          Approved:\t\a
          .  sp
          Date:\t\t\a
          ..
          .
          .em approval