Next: , Previous: , Up: Formatter Instructions   [Contents][Index]


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. See 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.43

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 (see Page Layout). Some requests, like ds, interpret the remainder of the control line as a single argument. See 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

See Blank Line Traps.


Next: , Previous: , Up: Formatter Instructions   [Contents][Index]