groff
[Top][All Lists]
Advanced

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

Re: [Groff] surprise, surprise


From: Werner LEMBERG
Subject: Re: [Groff] surprise, surprise
Date: Thu, 30 Aug 2001 00:18:44 +0200 (CEST)

> > .de tx
> > Hello world!
> > ..
> > abc
> > \fB.tx\fP
> > cde
> > \fBordinary text line\fP
> > more ordinary text
> > and still more.
> > 
> 
> Output from nroff prints the first line of regular text ("abc")
> using the ordinary default font.  The remainder is in bold.
> 
> Therefore nroff is interpreting \fB.tx\fP as a request to
> print the contents of macro .tx, and it is discarding \fP,
> either because *roff only allows two-letter macro names with
> a space following required to delimit arguments, or it is
> discarding the \fP because macro .tx has no \\$1 argument in
> the macro definition (which of the two is not important).

At least with groff in compatibility mode, it is the latter.
And troff doesn't need a space after a two-letter macro name to
delimit its first argument.

> To print a ".tx" in text, you have a few choices:
> 
> .B .tx (requires macro package or a macro definition early in the
>        file)
> 
> \fB\&.tx\fP (using none-printing space to force termination of
>             beginning- of-line condition)
> 
> \&\fB.tx\fP (terminate bol before \fB)
> 
> or force \fB.tx\fP into some other sequence that keeps it away from
> start of line.

It's not documented that `\&' is needed in your second and third
solution.  groff now make solution 4 work even at the beginning of the
line.


    Werner

reply via email to

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