groff
[Top][All Lists]
Advanced

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

Re: [Groff] Is setting the PO register a page trap?


From: Dorai Sitaram
Subject: Re: [Groff] Is setting the PO register a page trap?
Date: Sun, 3 May 2015 13:59:43 +0000 (UTC)

Thanks Ralph.  I guess +x would have the same "accumulating" behavior as -x. 
Curious there seems to be no way to represent a negative literal number the way 
one can specify a nonnegative one, i.e., a negative number just for itself, not 
as a decrement.
I was able to solve my particular problem with
.am @init.nr PO -.25i..
PO is defined by the time is @init is called, so this works.
Thanks again,--dorai 


     On Sunday, May 3, 2015 6:01 AM, Ralph Corderoy <address@hidden> wrote:
   
 

 Hi Dorai,

> I did a relative set of the PO (page-offset) register at the head of
> an ms document
> .nr PO -.25i
> (I.e., I wanted it to be a quarter-inch less than its default value.)

That decrements PO by ¼".  See
http://www.gnu.org/software/groff/manual/html_node/Setting-Registers.html#Setting-Registers
I expect PO isn't defined when you do this, so is treated like zero and
you get -0.25".

> Surprisingly to me, even though this statement was placed only once,
> at the beginning of the document, its effect seems to be repeated at
> every page turn, giving smaller and smaller PO's for every successive
> page. This doesn't seem intuitive at all. What gives?

ms does `.po \\n[PO]u', and PO is negative, you've set it to -0.25", so
the current value is decremented by that much, see
http://www.gnu.org/software/groff/manual/html_node/Line-Layout.html#Line-Layout

ms does not set the page offset to its default value and then apply PO
as an offset once.  Instead, it sets the page offset to PO, it just
happens that if PO is negative then .po adjusts the existing offset.

If you look at s.tmac, you'll see \n(.o is used if \n(PO isn't set.  You
could use that to come up with a positive `default less ¼"' for PO?

Cheers, Ralph.


 


reply via email to

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