groff
[Top][All Lists]
Advanced

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

Re: [Groff] Re: groff and keep query


From: Ted Harding
Subject: Re: [Groff] Re: groff and keep query
Date: Sat, 29 Apr 2000 18:23:24 +0100 (BST)

On 28-Apr-00 Steve Izma wrote:
> 
> Why does tmac.ms use PN rather than %? I would think calling \\n%
> would be safer here.

I should think the main reason is to do with number-formatting
using the .af request. While \n%, which is not a read-only register,
can be formatted (e.g. to print as "i" instead of "1" using
".af % i"), this would break things which depend on the numerical
value of \n% in expressions (such as deciding whether the page
number is "1"), since:

   "Warning: the value of a number register in a non-arabic
    format is not numeric, and will not produce the expected
    result in expressions."

(Troff Reference Manual, section 8).

Therefore, when a register is needed from which the page-number
will be printed (as "1", "i", "I", "a" or "A" according to context),
a new register (\n[PN] in the case of the ms macros) is created into
which the value of \n% is placed (during the execution of the
top-of-page macro address@hidden in the case of the ms macros).

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Date: 29-Apr-00                                       Time: 18:23:23
------------------------------ XFMail ------------------------------


reply via email to

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