[comp.unix.questions] nroff page length

jbw@bucsb.UUCP (Joe Wells) (03/30/89)

Dear Wise and Knowlegeable People (with Source Access),

It would be very useful to be able to tell nroff that its page length
is infinite (or just very very large).  This would probably involve
modifying one of the files in /usr/lib/term that come with nroff.
However, I haven't been able to find documentation on the format of
these files.  Does anyone know enough about this to help?

I would consider editing the binary an adequate solution.

--
Joe Wells
INTERNET: jbw%bucsf.bu.edu@bu-it.bu.edu    IP: [128.197.10.201]
UUCP: ...!harvard!bu-cs!bucsf!jbw

karl@syssup.tds.PHILIPS.nl (Karl Lovink) (09/03/90)

I have ported some programs to our Unix System V machine and 
now I am trying to print out the manual pages. 
I have installed the AT&T Documenters Work Bench.
Attached to my system there is a HP Laserjet II printer, and when
I print out the manual pages, the every page is 2 lines too long.
Now I can edit all the files and strip two lines on every page,
but I think there should be a better way to handle this.
By the way I tried already .pl, this makes no difference.
Could somebody give me a clue how to do this, I'am not
really familiar with nroff and others.



-- 
    ( )     Karl Lovink  Philips Information Systems, Netherlands
  } @ @ {   Department: Systems Support Optical Filing
-- |___| -- UUCP: uunet!mcsun!philapd!idcapd!ofssrv!karl 
  _/   \_   NET : karl@ofssrv.syssup.tds.philips.nl

wnp@iiasa.AT (wolf paul) (09/04/90)

In article <807@ofssrv.syssup.tds.philips.nl> karl@syssup.tds.PHILIPS.nl (Karl Lovink) writes:
>Attached to my system there is a HP Laserjet II printer, and when
>I print out the manual pages, the every page is 2 lines too long.
>    ( )     Karl Lovink  Philips Information Systems, Netherlands

Since you are in the Netherlands, this has probably to do with
European vs. US page sizes.

U.S. letter size is exactly 11 inches, or 66 normal 6 lpi lines long.

The corresponding European size is A4, which is 11.69 inches long.

However, before the advent of Laser Printers, most of Europe used endless
fan-fold paper where each sheet was 12 inches (72 lines) long.

What is probably happening is that your tmac.an macro file has been 
set up with the idea that A4 is 12 inches long, which is not true.

Look through /usr/lib/tmac/tmac.an (or possibly /usr/lib/macros/an)
and find the page length specs, which should be 12", and change it
to 11.69".

NOTE: You should do this on a COPY of the file so if something goes
wrong (I don't guarantee my advice!) you still have the original.
-- 
Wolf N. Paul, IIASA, A - 2361 Laxenburg, Austria, Europe
PHONE: +43-2236-71521-465     FAX: +43-2236-71313      UUCP: uunet!iiasa.at!wnp
INTERNET: wnp%iiasa.at@uunet.uu.net      BITNET: tuvie!iiasa!wnp@awiuni01.BITNET
       * * * * Kurt Waldheim for President (of Mars, of course!) * * * *

det@cimcor.mn.org (Derek Terveer) (09/05/90)

In article <807@ofssrv.syssup.tds.philips.nl> karl@syssup.tds.PHILIPS.nl (Karl Lovink) writes:
> Attached to my system there is a HP Laserjet II printer, and when
> I print out the manual pages, the every page is 2 lines too long.

The man pages are formatted for 66 lines per page.  It sounds like your
printer is set to automatically eject after 64 lines per page.  This is
quite common in the messy-dos world.  Try changing the form length on
the printer and save that length as the default, or prefix the print
job with the appropriate control codes to change the form length for
that job.

(If this is a common printer accessed by many, you should probably be
initializing everything in the world for each print job anyway, since
you have no guarantees about its state at start-of-job)

derek
-- 
temporarily:  			derek@cimcor.MN.ORG
as soon as i get my pc back:	det@hawkmoon.MN.ORG

mercer@npdiss1.StPaul.NCR.COM (Dan Mercer) (09/10/90)

In article <807@ofssrv.syssup.tds.philips.nl> karl@syssup.tds.PHILIPS.nl (Karl Lovink) writes:
:I have ported some programs to our Unix System V machine and 
:now I am trying to print out the manual pages. 
:I have installed the AT&T Documenters Work Bench.
:Attached to my system there is a HP Laserjet II printer, and when
:I print out the manual pages, the every page is 2 lines too long.
:Now I can edit all the files and strip two lines on every page,
:but I think there should be a better way to handle this.
:By the way I tried already .pl, this makes no difference.

Our LaserPrinter prints 60 lines per page.  I created my own tmac and
macro files (our tmac files .so macro files,  where real nroff source
resides.)  the file /usr/lib/tmac.c10 has one line:

.so /usr/lib/macros/c10

the /usr/lib/macros/c10 file is a duplicate of /usr/lib/macros/an with
one additional line:

.pl 60v

The v tells nroff to use lines,  not linear measurement.

I invoke the command:

nroff -mc10 files | lpr -b

I'm no nroff wizard,  and I had to experiment to find the right
place to put the line.  I hope this helps.

:Could somebody give me a clue how to do this, I'am not
:really familiar with nroff and others.
:
:
:
:-- 
:    ( )     Karl Lovink  Philips Information Systems, Netherlands
:  } @ @ {   Department: Systems Support Optical Filing
:-- |___| -- UUCP: uunet!mcsun!philapd!idcapd!ofssrv!karl 
:  _/   \_   NET : karl@ofssrv.syssup.tds.philips.nl


-- 

Dan Mercer
Reply-To: mercer@npdiss1.StPaul.NCR.COM (Dan Mercer)
"MAN - the only one word oxymoron in the English Language"

friedl@mtndew.Tustin.CA.US (Steve Friedl) (09/19/90)

This thread has focussed on how to get nroff to deal with printers like
the HP LaserJet that do not have 66-line pages, and in general trying to
format your work for (say) 60 line pages is A Big Mistake.  The main reason
is that it probably makes your nroff source nonportable and means that
things won't look like everybody else's man pages who count on 66 lines.
It will also give you top and bottom margins that are too large.

A muchmuch better way is to fool nroff into thinking that the printer does
in fact support 66 lines, and you can do this with clever term driver hacking
or a postprocessor.  Remember, most documents don't use the absolute full
printable area of the page -- they have top and bottom margins -- and these
are usually larger margins than the physical ones imposed by the printer.

The way to do this is to tell the LaserJet to move its "cursor" to the very
very top of the page with a cursor-motion command  ESC&a-360V  and then to
use relative-motion commands for each linefeed.  Now your LaserJet is
a 66-line top-to-bottom page, with the first and last few lines printed
with white toner.

I have implemented solutions like this for a number of customers, and word
processor drivers (WordPerfect, for instance) use it as well.  I would try
it on my printer now, but it has the miserable Adobe ljet emulation that
is worthless for this kind of compatibility testing :-(

     Steve

-- 
Stephen J. Friedl, KA8CMY / I speak for me only / Tustin, CA / 3B2-kind-of-guy
+1 714 544 6561  / friedl@mtndew.Tustin.CA.US  / {uunet,attmail}!mtndew!friedl

Jesse Helms for U.S. Supreme Court Justice