[comp.unix.questions] changing line length in nroff

Leisner.Henr@xerox.com (Marty) (03/02/89)

I texi2troff'd some gnu documentation and I want to print it out off a PC.

I want to increase the effective line length to pack more information on a page.

I used a number of variations of the 
.ll +n command 
and nothing seems to have an impact after a 
.PP command.

If I want to increase the line size about 30 characters (3 inches?) I've done things like:
.ll +3i

and it doesn't make a difference.

I'm puzzled (I'm just a casual nroff user).


marty
ARPA:	leisner.henr@xerox.com
GV:  leisner.henr
NS:  martin leisner:wbst139:xerox
UUCP:	hplabs!arisia!leisner
 

lapoint@BRL.MIL (SECAD) (03/02/89)

.PP is not a "native" or "primitive" nroff command, but rather one belonging
to any of a number of packages (most likely ms) of macros, or auxiliary,
higher level commands.

The use of any but a very small subset of the native nroff commands
with the ms macro commands is fraught with hazard for a variety of reasons.

You have stumbled upon one of the more benign and easy to diagnose problems
associated with mixing the 2 sets of commands:

	Upon startup, the ms package makes its own copy of many of the
	values which control the appearance of your output, and frequently
	(eg: every time there is a new page) refreshes the "working" copy
	of those values from that originally made copy.

	With respect to this particular problem, and several similar
	ones, the trick is to change BOTH copies of the values.

	".ll whatever" changes nroff's working copy of the line length,
	               and the change takes effect immediately

	".nr LL whatever" changes ms's reference copy of the line length,
	                  and the effect is observed when ms next refreshes
	                  the working copy

	Note that the default unit for .ll is "m" (width of character "m"),
	so that ".ll 8" yields the same thing as ".ll 8m", 8 characters,
	whereas ".ll 8i" yields 8 inches and ".ll 8u", 8 units. In nroff,
	1 unit is 1/240th of an inch, so ".ll 8u" yields 1/30th of an inch.
	On the other hand, the default unit for .nr is "u", so ".nr LL 8"
	yields the same thing as ".nr LL 8u", 1/30th of an inch.
	".nr LL 8m" yields 8 characters and ".nr LL 8i", 8 inches.

	Obtaining a relative change with .nr is done similarly to .ll usage:
	"nr LL +8m" increases the reference value by 8 characters.

john@chinet.chi.il.us (John Mundt) (03/02/89)

In article <18493@adm.BRL.MIL> Leisner.Henr@xerox.com (Marty) writes:
>I want to increase the effective line length to pack more information on a page
>I used a number of variations of the 
>.ll +n command 
>and nothing seems to have an impact after a 
>.PP command.
>
The PP macro resets line length to a default value unless named register LL is 
set.  You need to set it permanently.  Since you are using ms or mm , try 
put this up at the top of your file:

.nr LL 120n 

or whatever line length you want.  This sets the register so that PP or other
macros won't reset to the default, which is what happens if you put in the
.ll +n command.  Of course, you could hack the macros in the macro package
as well.

-- 
---------------------
John Mundt   Teachers' Aide, Inc.  P.O. Box 1666  Highland Park, IL
john@chinet.chi.il.us
(312) 998-5007 (Day voice) || -432-8860 (Answer Mach) && -432-5386 Modem  

harrison@utfyzx.uucp (David Harrison) (03/03/89)

I tried mailing this response but it bounced.  So --

If the .PP indicates you are using the ms macros, your problem
is that those macros use a number register named "LL" for the
line length, which resets the line length to its values whenever 
you invoke the ".PP" command among others.  The following will 
increase the line length by 1 inch:

Here is a sentence with the default line length.
.nr LL +1i
.PP
Here is the second sentence with the new line length.

PS. The rate of bounced mail seems to be increasing logarithmically.
    Lately if its important I've resorted to the Post Office carrying 
    around ink stained dead trees, ie: paper.
-- 
David Harrison, Dept. of Physics, Univ. of Toronto |  "Space and time are
UUCP: {utgpu,sq,oscvax}!utfyzx!harrison            |   adverbs"
BITNET: HARRISON@UTORPHYS                          |   - Aleister Crowley