groff
[Top][All Lists]
Advanced

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

Re: [Groff] surprise, surprise


From: Ted Harding
Subject: Re: [Groff] surprise, surprise
Date: Sun, 26 Aug 2001 16:42:11 +0100 (BST)

On 26-Aug-01 Andrew Koenig wrote:
>> Consider the following example:
> 
>>   .de test
>>   Hallo!
>>   ..
>>   \fB.test\fP
> 
>> Surprisingly, this yields
> 
>>   Hallo!
> 
>> Even more surprising is the fact that it isn't bold...
> 
>> Is this documented?  How does UNIX troff behave?
> 
> Unix troff produces no output for this example.
> 
> The relevant behavior is documented in the very first paragraph of
> the troff manual, which says:
> 
>    Input consists of `text lines', which are destined to be printed,
>    interspersed with `control lines', which set parameters or
>    otherwise control subsequent processing.  Control lines begin with
>    a `control character'--normally .  (period) or ' (single quote)--
>    followed by a one or two character name that specifies a basic
>    `request' or the substitution of a user-defined `macro' in place of
>    the control line.

I'm aware of this paragraph! However, the above reported behaviour
(rather non-behaviour") slightly puzzles me (I don't have a "UNIX
troff" to hand at the moment).

_Either_ one takes the above paragraph literally, in which case
the line "\fB.test\fP" does _not_ begin with a "." and so is _not_
a control line; or else "\fB..." is transparent at the start of a line
and so the line should be interpreted as ".test" (in a Bold context)
(as is the case with groff).

One possibility is that because ".test" is a four-character name,
the definition ".de test ..." and/or the invocation ".test" are
not being recognised as macros. Could someone with "UNIX troff"
re-try with a two-character name, e.g.

  .de jK
  Hallo!
  ..
  \fB.jK\fP

?

Thanks,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 26-Aug-01                                       Time: 16:42:11
------------------------------ XFMail ------------------------------

reply via email to

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