[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] howto pass args to macro

From: Clarke Echols
Subject: Re: [Groff] howto pass args to macro
Date: Tue, 06 Apr 2010 17:25:57 -0600
User-agent: Thunderbird (X11/20090817)

I don't know if I'm missing something obvious in the question...

If your source file defines macro P as stated, why not:

.de P
\\$1 \\$2 \\$3

then in the text file:

.P "a b c" "d e" "f g h i"

Whitespace is inserted by the macro between \\$1, \\$2, and \\$3.

This is similar to how it's done by .I, .B, .BI, .BR, etc. macros
in the man macros I used back in the 1990s.


Richard Ray wrote:
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

.de P
.ds x a b c
.ds y d e
.ds z f g h i
.P x y z


reply via email to

[Prev in Thread] Current Thread [Next in Thread]