manpagez: man pages & more
info groff
Home | html | info | man

File: groff.info,  Node: Invoking Requests,  Next: Calling Macros,  Prev: Control Characters,  Up: Formatter Instructions

5.6.2 Invoking Requests
-----------------------

A control character is optionally followed by tabs and/or spaces and
then an identifier naming a request or macro.  The invocation of an
unrecognized request is interpreted as a macro call.  Defining a macro
with the same name as a request replaces the request.  Deleting a
request name with the 'rm' request makes it unavailable.  The 'als'
request can alias requests, permitting them to be wrapped or
non-destructively replaced.  *Note Strings::.

   There is no inherent limit on argument length or quantity.  Most
requests take one or more arguments, and ignore any they do not expect.
A request may be separated from its arguments by tabs or spaces, but
only spaces can separate an argument from its successor.  Only one
between arguments is necessary; any excess is ignored.  GNU 'troff' does
not allow tabs for argument separation.(1)  (*note Invoking
Requests-Footnote-1::)

   Generally, a space _within_ a request argument is not relevant, not
meaningful, or is supported by bespoke provisions, as with the 'tl'
request's delimiters (*note Page Layout::).  Some requests, like 'ds',
interpret the remainder of the control line as a single argument.  *Note
Strings::.

   Spaces and tabs immediately after a control character are ignored.
Commonly, authors structure the source of documents or macro files with
them.

     .de center
     .  if \\n[.br] \
     .    br
     .  ce \\$1
     ..
     .
     .
     .de right-align
     .->if \\n[.br] \
     .->->br
     .->rj \\$1
     ..

   If you assign an empty blank line trap, you can separate macro
definitions (or any input lines) with blank lines.

     .de do-nothing
     ..
     .blm do-nothing  \" activate blank line trap

     .de center
     .  if \\n[.br] \
     .    br
     .  ce \\$1
     ..


     .de right-align
     .->if \\n[.br] \
     .->->br
     .->rj \\$1
     ..

     .blm             \" deactivate blank line trap

   *Note Blank Line Traps::.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.