groff
[Top][All Lists]
Advanced

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

Re: [Groff] strings on successive lines bug?


From: Ted Harding
Subject: Re: [Groff] strings on successive lines bug?
Date: Mon, 30 Jun 2003 23:33:26 +0100 (BST)

On 30-Jun-03 Werner LEMBERG wrote:
> While macros, diversions, and strings are basically the same in groff,
> there actually *are* differences.  The last character of a macro (and
> a diversion) definition is always a newline, whereas a string doesn't
> contain a newline at all -- otherwise \*[...] wouldn't work as
> expected.
> 
>> Only the first string, .one, gets translated.  So
>> output looks like
>> 
>> 1.two
> 
> The newline character after `1' is used to terminate the string called
> as a macro.

By the same token:

.ds one \\$*
.ds two 2
.one this is a long one, isn't it ?? ...
.two

leads to:

this is a long one, isn't it ?? ....two

(i.e. this is one way to use strings which have arguments).

One the other hand,

.ds one \\$*
.ds two 2
\*[one] this is a long one, isn't it ?? ...
.two

gives

this is a long one, isn't it ?? ... 2

(which is another).

Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 30-Jun-03                                       Time: 23:33:26
------------------------------ XFMail ------------------------------

reply via email to

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