NROFF Question

Jaap Akkerhuis jaap at mcvax.UUCP
Tue Jul 30 15:31:43 AEST 1985


In article <707 at rlgvax.UUCP> jrc at rlgvax.UUCP (Jim Chapell) writes:
 > 
 > Re: nroff, how come
 > .sp 4/2+1
 > 
 > spaces 1 line whereas
 > .nr s 4/2+1
 > .sp \ns
 > 
 > spaces 3 lines?
 > 

The answer is of course in the Nroff/Troff reference manual (Page 9,
alinea 1.4 \fINumerical expressions\fP).
"In the present of default scaling, ..." etc.

The commands
	.nr s 4/2+1
	.sp \ns
should be read as:
	.sp (4u/2u+1u)*1v
giving a spacing of 3 lines (default scaling is `v'),
while
	.sp 4/2+1
specifies a spacing of 42 units, rounded to 40 units (==\n(.v)
as shown by
	.nr a 4v/2v+1v
	.nr b \na/\n(.v
	.ie \nb>1 .tm \na  units rounded to \nb lines of spacing
	.el .tm \na units rounded to a single line of spacing
	.ab "End of demonstration"



More information about the Comp.unix.wizards mailing list