groff
[Top][All Lists]
Advanced

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

RE: [Groff] Macro params getting split, leading "=".


From: Ted Harding
Subject: RE: [Groff] Macro params getting split, leading "=".
Date: Wed, 26 Jan 2000 11:00:19 -0000 (GMT)

On 26-Jan-00 Eddie Maddox wrote:
> Macro params getting split, leading "=".
> 
> This time when I pass href="#web site"
> in a macro the "site" gets split off into the next \\$x.
> 
> Please see the tst4.* files at my Groff Garage:
> 
>> > at http://209.32.157.181/groff-em.html.
>> >    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (you may need to enter this
>> > whole
>> > string, or your wonderful pet browser may not find it)

The special meaning of the double-quote character in macro arguments
is to group space-separated elements into a single argument. However,
in that context the opening " should be preceded by a space and the
closing " should be followed by a space.

I haven't had a chance to look at the Garage this time, so I'm not aware
of the full context of the above macro argument. But it looks as though
the first " , in  href="#web , is not seen as the special meaning
being neither preceded nor followed by a space; therefore the second
would have to be preceded by a space to be seen as an opening " ,
so probably it too is not seen as special. The net effect is that
the space in the middle of   href="#web site"   is seen as an argument
separator, with the result you observed.

In any case, you want to make sure that the " characters themselves
are passed into the macro argument.

I hope the following helps, however.

The official line is:

  The argument separator is the space character (not tab), and
  arguments may be surrounded by double quotes to permit embedded
  space characters. Pairs of double quotes may be embedded in
  double-quoted arguments to represent a single double-quote character.
  The argument "" is explicitly null.

So I suggest you try something on the lines of

  "href=""#web site"""

preceded and followed by a space, assuming that the entire argument you
want to pass is

   href="#web site"

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Date: 26-Jan-00                                       Time: 11:00:19
------------------------------ XFMail ------------------------------


reply via email to

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