[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] .lf with single argument?
From: |
Werner LEMBERG |
Subject: |
Re: [Groff] .lf with single argument? |
Date: |
Sat, 15 Feb 2003 08:48:25 +0100 (CET) |
> Here's AIX 3.2.5. If it doesn't answer your question, let me know.
>
> $ cat j
> .nf
> \n(.c '\n(.F'
> .lf 42 mol
> \n(.c '\n(.F'
> .lf 314
> \n(.c '\n(.F'
> .lf \n(.c \n(.F
> \n(.c '\n(.F'
> \n(.c '\n(.F'
> $ nroff <j | sed -n /./p
> 1 '<standard input>'
> 41 'mol'
> 312 'mol'
> 312 'mol'
> 313 'mol'
> $
Thanks. It answers my question. Note that .lf and \n[.c] work
differently for groff; your example yields
2 '<standard input>'
42 'mol'
314 'mol'
315 'mol'
316 'mol'
which is IMHO better. The original explanation in CSTR 54 doesn't
help to clarify the issue since it is ambiguous:
The number register `.c' contains the number of input lines read
from the current file [...]
Personally, I think that groff does the right thing -- to process an
input line it has to be read first, so the `number of input lines read
from the current file' contains the current input line also.
Consequently, .lf sets the line number of the *next* input line.
What do other troff implementations return for Ralph's example?
Werner