Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!rutgers!ukma!psuvm.bitnet!...@psueclb.BITNET
From: d...@psueclb.BITNET
Newsgroups: comp.unix.questions
Subject: nroff problems
Message-ID: <774@PSUECLB>
Date: Tue, 28-Jul-87 16:54:00 EDT
Article-I.D.: PSUECLB.774
Posted: Tue Jul 28 16:54:00 1987
Date-Received: Fri, 31-Jul-87 02:31:14 EDT
Organization: Engineering Computer Lab, Pennsylvania State University
Lines: 21


        I'm a new UNIX user, as is everyone else here, so we are
having some troubles with our new Harris HCX-7 running UNIX.  My
question involves nroff.
        I'm trying to print a Spice user's manual, which happens to
be an nroff document.  The problem is that nroff doesn't put form
feed characters in.  I tried every terminal option (with the -T option),
but none of them worked.  I tried defining a macro which inserted FF
at the end of each page, but nroff appears to have filtered them out.
How do I do it?  Do I need to make a new terminal definition file?
If so, I don't know how, and can't find it in any of the documentation
we have.  We looked at the nroff source code, but no one here knows
C well enough to extract anything useful from it.
        Also, one of the appendicies is full of equations, and uses the
eqn program.  With eqn, I get zillions of "Floating Exception" errors,
and I can't figure out why.  I tried neqn, and it worked.  But, the
escape sequences it put in to do upward and downward cursor movements
don't work on our laser printer (DEC ln03), or line printer (DEC lg02).
I'm stumped.
        Help!!! Thanks in advance.

Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!husc6!cmcl2!brl-adm!brl-smoke!gwyn
From: g...@brl-smoke.ARPA (Doug Gwyn )
Newsgroups: comp.unix.questions
Subject: Re: nroff problems
Message-ID: <6197@brl-smoke.ARPA>
Date: Wed, 29-Jul-87 21:03:01 EDT
Article-I.D.: brl-smok.6197
Posted: Wed Jul 29 21:03:01 1987
Date-Received: Sat, 1-Aug-87 01:05:21 EDT
References: <774@PSUECLB>
Reply-To: g...@brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 34

In article <774@PSUECLB> d...@psueclb.BITNET writes:
>The problem is that nroff doesn't put form feed characters in.

Standard nroff never outputs form-feeds; it uses new-lines to advance to
the next page.  Normally this wouldn't much matter, but if you're using a
sheet feeder, usually the feeder needs about an inch of extra paper travel.
You can get around this problem by telling nroff (or perhaps a macro package)
that your paper length is an inch longer than it really is, and adjusting
the top and bottom margins (header/footer traps) appropriately.  Yes, it's a
pain.

>        Also, one of the appendicies is full of equations, and uses the
>eqn program.  With eqn, I get zillions of "Floating Exception" errors,
>and I can't figure out why.  I tried neqn, and it worked.

I don't know what is wrong with your eqn, but you should always use
neqn with nroff (eqn with troff).

>  But, the
>escape sequences it put in to do upward and downward cursor movements
>don't work on our laser printer (DEC ln03), or line printer (DEC lg02).

Nroff looks up control codes from a table for your terminal.  If you
don't specify it, nroff assumes your terminal type is "37" (Teletype model 37).
Specify the correct type with the -Tterminal-type option to nroff.  It may
happen that your LN03 or LG02 don't correspond to any entries provided with
your nroff, in which case you need to come up with them somehow.  The most
useful generic terminal type is -Tlp (-Tlpr on some systems), which assumes
output will be for a generic ASCII line printer.  Generic Diablo daisy-wheel
emulators (perhaps your laser printer?) work with -T450.

The final thing to be aware of is that some nroff output, especially
equations, uses half-line and reverse vertical motions, which not all
printers support.  In such a case, filter the output through "col".

Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!husc6!necntc!adelie!ora!tim
From: t...@ora.UUCP (Tim O'Reilly)
Newsgroups: comp.unix.questions
Subject: Re: nroff problems
Message-ID: <645@ora.UUCP>
Date: Thu, 30-Jul-87 09:06:28 EDT
Article-I.D.: ora.645
Posted: Thu Jul 30 09:06:28 1987
Date-Received: Sat, 1-Aug-87 11:52:34 EDT
References: <774@PSUECLB>
Organization: O'Reilly & Associates, Inc., Newton, MA
Lines: 27
Summary: use col for reverse line feeds

In article <774@PSUECLB>, d...@psueclb.BITNET writes:
>         I'm trying to print a Spice user's manual, which happens to
> be an nroff document.  The problem is that nroff doesn't put form
> feed characters in.... 

Nroff uses line feeds, not form feeds to advance.  The
problem is probably that your laser printer needs a certain
number of lines on the page before it thinks its time to
eject the page.  Try adjusting the page length or adding extra 
line feeds to trigger a page break in your laser printer.

> How do I do it?  Do I need to make a new terminal definition file?
> If so, I don't know how, and can't find it in any of the documentation
> we have.  
I don't think this is your problem.  However, if you're
using nroff a lot, it may be worthwhile to learn about
this.  I seem to recall a piece by Eric Allman on writing nroff
terminal definition files floating around the net about 6 or
7 months ago.  Does anyone have this?

>         Also, one of the appendicies is full of equations, and uses the
> eqn program.  With eqn, I get zillions of "Floating Exception" errors,
> and I can't figure out why.  I tried neqn, and it worked.  But, the
> escape sequences it put in to do upward and downward cursor movements
> don't work on our laser printer (DEC ln03), or line printer (DEC lg02).

You should always use neqn with nroff (eqn goes with troff).  Then
pipe the output through col before printing.  This filters out
the reverse line feeds and puts everything in the proper
order for printing on a line printer.

-- 
Tim O'Reilly (617) 527-4210
O'Reilly & Associates, Inc., Publishers of Nutshell Handbooks
981 Chestnut Street, Newton, MA 02164
UUCP:	seismo!uunet!ora!tim      ARPA:   t...@ora.uu.net

Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!husc6!cmcl2!phri!uccba!finegan
From: fine...@uccba.UUCP (Mike Finegan)
Newsgroups: comp.unix.questions
Subject: Re: nroff problems
Message-ID: <1210@uccba.UUCP>
Date: Thu, 13-Aug-87 12:04:58 EDT
Article-I.D.: uccba.1210
Posted: Thu Aug 13 12:04:58 1987
Date-Received: Sat, 15-Aug-87 10:49:35 EDT
References: <774@PSUECLB> <6197@brl-smoke.ARPA>
Organization: Univ of Cincinnati, College of Business Admin.
Lines: 26
Summary: nroff problems -> re:lno3 problems ...

> >        Also, one of the appendicies is full of equations, and uses the
> >eqn program.  With eqn, I get zillions of "Floating Exception" errors,
> >and I can't figure out why.  I tried neqn, and it worked.
> 
> I don't know what is wrong with your eqn, but you should always use
> neqn with nroff (eqn with troff).

  I had the same problem on an 11/750 running Ultrix 1.2, even using neqn.
  The problem was an incorrect ternminal driving file. When I simply
  modified one that worked for another printer (say default) using the sequences
  out of the ln03 manual, it worked (except square root, posted elsewhere ...).
  I didn't analyze the original file too much, but it was either incorrect 
  syntax (though it compiled) or (I think more likely) the people at DEC put
  some crazy numbers in for `resolution' values.
> 
> >  But, the
> >escape sequences it put in to do upward and downward cursor movements
> >don't work on our laser printer (DEC ln03), or line printer (DEC lg02).

  This stuff worked fine once I threw away the DEC supplied file. No col -f
  (or whatever) was needed, although it was passed directly to the laser 
  printer (no output filter ...).
				Also LOST,

					Mike Finegan
					...!uccba!ucece1!finegan