[comp.sys.att] nroff page offset

vern@zebra.UUCP (Vernon C. Hoxie) (10/04/89)

Can someone give me a clue how I can offset the output of a manual page
to the right about a half inch.  Under the default settings, the page
has a margin of about 3/4 inch on the left and 2 inches on the right. 
When I punch holes to insert the page in a notebook, the printing gets
punched away and all that right margin is wasted.

I have tried numerous variations on:

	nroff -Tfx-12 -rO14 -man compress.1 | lp

where compress.1 is a 'roffed document.  According to the manuals,
the '-rO14' option is supposed to set the 'O' ( note capital letter Oh,
not numeral '0' zero ) register to 14 ens for nroff.  I have
tried '1.5i', '0.75i' and 20 but the left margin remains at 0.75 inches.

Crawling through the /usr/lib/macros/an file doesn't do me much good
because of the confounding notation used.  I have an AT&T MM Manual and
their NROFF/TROFF User's Manual but the notation used in the macro file
isn't defined in either of these Manuals.

HELP ME!
-- 
Vernon C. Hoxie		       {ncar,nbires,boulder,isis}!scicom!zebra!vern
3975 W. 29th Ave.					voice: 303-477-1780
Denver, Colo., 80212				  TB+	 uucp: 303-455-2670

clewis@ecicrl.UUCP (10/05/89)

In article <189@zebra.UUCP> vern@zebra.UUCP (Vernon C. Hoxie) writes:
|
|Can someone give me a clue how I can offset the output of a manual page
|to the right about a half inch.  Under the default settings, the page
|has a margin of about 3/4 inch on the left and 2 inches on the right. 
|When I punch holes to insert the page in a notebook, the printing gets
|punched away and all that right margin is wasted.
|
|I have tried numerous variations on:
|
|	nroff -Tfx-12 -rO14 -man compress.1 | lp
|
|where compress.1 is a 'roffed document.  According to the manuals,
|the '-rO14' option is supposed to set the 'O' ( note capital letter Oh,
|not numeral '0' zero ) register to 14 ens for nroff.  I have
|tried '1.5i', '0.75i' and 20 but the left margin remains at 0.75 inches.

The "man" macros don't use the "O" register, the "O" register is only
recognized by the "mm" macros.

Solutions:
	a) edit /usr/lib/tmac/tmac.an and insert this near the end:
		.po 14
	b) nroff -man compress.1 | sed -e 's/^/           /'
-- 
Chris Lewis, R.H. Lathwell & Associates: Elegant Communications Inc.
UUCP: {uunet!mnetor, utcsri!utzoo}!lsuc!ecicrl!clewis
Moderator of the Ferret Mailing List (ferret-request@eci386)
Phone: (416)-294-9253

bamford@cbnewsd.ATT.COM (harold.e.bamford) (10/05/89)

In article <189@zebra.UUCP> vern@zebra.UUCP (Vernon C. Hoxie) writes:
>Can someone give me a clue how I can offset the output of a manual page
>to the right about a half inch. ... I have tried numerous variations on:
>	nroff -Tfx-12 -rO14 -man compress.1 | lp

Try:
    (echo ".po 1.4i"; cat compress.1) | nroff -Tfx-12 -man - | lp

The -rO14 stuff is for -mm and probably will not apply to -man

Works for me!

-- Harold

linefiller
linefiller
linefiller
linefiller

psfales@cbnewsc.ATT.COM (Peter Fales) (10/06/89)

In article <189@zebra.UUCP>, vern@zebra.UUCP (Vernon C. Hoxie) writes:
> 
> Can someone give me a clue how I can offset the output of a manual page
> to the right about a half inch.  Under the default settings, the page
> has a margin of about 3/4 inch on the left and 2 inches on the right. 
> When I punch holes to insert the page in a notebook, the printing gets
> punched away and all that right margin is wasted.
> 
> I have tried numerous variations on:
> 
> 	nroff -Tfx-12 -rO14 -man compress.1 | lp

I have run into the same problem.  Apparently, the man macros do not
pay attention to the O register.  It is kind of messy, but the shell
script I use to format man pages with troff looks something like this:

( echo ".po 1i" ; cat $1 ) | troff -man ....

For nroff, the .po would be something like 15 if you wanted an offset
of 15 characters (1.5 inches on many printers).

-- 
Peter Fales			AT&T, Room 5B-420
				2000 N. Naperville Rd.
UUCP:	...att!peter.fales	Naperville, IL 60566
Domain: peter.fales@att.com	work:	(312) 979-8031

vern@zebra.UUCP (Vernon C. Hoxie) (10/06/89)

In article <189@zebra.UUCP>, vern@zebra.UUCP (Vernon C. Hoxie) writes:
> 
> Can someone give me a clue how I can offset the output of a manual page
> to the right about a half inch.

In response to this query, Michael King suggested that I put '.po xx' at
the top of the document while Michael Chin suggested making a new file
with the appropriate indentation.  Using both suggestions, I came up with
the following shell script.

------------------------------- cut here --------------------------------

until [ $# = 0 ]
do
	if [ -f $1 ]
	then
		echo 'Queuing '$1
		echo '.po 1.0i' > /tmp/doroff
		cat $1 >> /tmp/doroff
		nroff -Tfx-12 -man /tmp/doroff | lp
	fi
	shift
done

----------------------------- end of script -------------------------------

This lets me sit in a directory full of 'roffed manual pages use the
command:

vern 266 > doroff *

or:

vern 266 > doroff compress.1

and I don't have to edit the docs by hand.  Easy when you know how.

Thanks again to Mike and Mike and also to the good neighbor who called
on the phone.  I want to apologize for sounding flaky, I was up all night
like many computer idiots and I was asleep when the phone rang.

In this effort, I did learn by myself of how to get my 9 pin Epson from
stuttering over the multi-strikes which nroff issues instead of italics.
I added:

iton        "\0334"
itoff       "\0335"

to '/usr/lib/nterm/tab.fx-12'.  See 'nterm(5)' in the back of User's
Manual, Volume 1, for the 3.51 version of Unix on the 3b1.

vern -
-- 
Vernon C. Hoxie		       {ncar,nbires,boulder,isis}!scicom!zebra!vern
3975 W. 29th Ave.					voice: 303-477-1780
Denver, Colo., 80212				  TB+	 uucp: 303-455-2670

sac@conrad.UUCP (Steven A. Conrad) (10/08/89)

In article <189@zebra.UUCP> vern@zebra.UUCP (Vernon C. Hoxie) writes:
>
>	nroff -Tfx-12 -rO14 -man compress.1 | lp
>
>where compress.1 is a 'roffed document.  According to the manuals,

If compress.1 is already 'roffed, then all you have to do is send it
through a filter such as sed '/^/   /',  pr -t -o5 or other program
to add whitespace to the front.  If not, then any of the recs by
others will work.

Another thing to consider is making a local macro package such as
/usr/lib/tmac/tmac.local containing (for your needs) the line:

.po 1.5i

and using  nroff -Tfx-12 -man -mlocal file ...
assuming that man or other preceeding macro does not dynamically
reset the page offset.
-- 
Steven A. Conrad,  Department of Medicine (Critical Care)
Louisiana State University Medical Center, Shreveport, LA
UUCP: sac@conrad.UUCP,   Internet: conrad@manta.pha.pa.us
"I think there is a world market for about five computers" TJ Watson Jr, 1943