> I want to pass multiple arguments to a macro and each argument may be 
> composed of multiple words/characters
> I figured out this works but is there a way without defining individual 
> strings
>
> [snip]

Put the arguments in double quotes, like this:

  .de P
    1 = \\$1
    2 = \\$2
    3 = \\$3
  ..
  .P "a b c" "d e f" "x y z t"

The quotes are stripped (i.e., they are not part of the
arguments), but the arguments retain the embedded spaces.


By the way, take a look at the Troff User's Manual,
http://plan9.bell-labs.com/sys/doc/troff.pdf

This document gives a comprehensive overview of troff,
but it is comparatively short for a piece of software of
this complexity, so you can read it in a single sitting,
and even if you don't understand everything at first you will
at least know what's in there and can go back later when you
understand more of troff's capabilities (and limitations).

(And then you can read groff(7) to find out how groff
differs from the original troff.)




Reply via email to