[comp.text] {n,pt}roff with mm on suns

scowles@lll-lcc.UUCP (Sid Cowles) (03/31/89)

i would like very much to use memorandum macros with nroff and
ptroff on a sun 4.  unfortunately, when i do, i get unusable page
numbers.  the page numbers come out with about 102 leading zero's
in spite of specifying .af P 1 before any page numbers are printed.
the versions of mm that i have been trying are 10.108 and 11.47.
i've noticed that the number register P has a size of 3 (using the
.pm call).

the files that i'm using work as expected with nroff and mm under
two other operating systems.  has anyone got any ideas on this one?
sid
=======================================================================
s cowles                         att:       +1 415 423 0929
lawrence livermore national lab  uucp:      {backbone}!lll-lcc!scowles
environmental sciences division  internet:  scowles@lll-lcc.llnl.gov
p. o. box 5507; L-524
livermore, california  94550
=======================================================================

jaap+@andrew.cmu.edu (Jaap Akkerhuis) (04/01/89)

> *Excerpts from ext.nn.comp.text: 30-Mar-89 {n,pt}roff with mm on suns Sid*
> *Cowles@lll-lcc.UUCP (940)*
> i would like very much to use memorandum macros with nroff and
> ptroff on a sun 4.  unfortunately, when i do, i get unusable page
> numbers.  the page numbers come out with about 102 leading zero's
> in spite of specifying .af P 1 before any page numbers are printed.
> the versions of mm that i have been trying are 10.108 and 11.47.
> i've noticed that the number register P has a size of 3 (using the
> .pm call).
This is a common problem. The -mm macros use the \gx (or \g(xx) escape sequence
to  return the format of register x (or xx). This request was introduced in the
PWB version of troff. Alas, it didn't make it in all versions of troff, so if
you use the mm macros with an old version of troff, you get this problem. If you
are using numerical format for the P register, you should wipe out the
occurrences of something on the line of

        .af P \\g<whatever>

from the macros. (My memory of this is somewhat fuzzy, but I think it happens
just once). If you still want to use roman numericals for page numbers, you
obviously have to do something else: Keep the format in a string, say Xy as in

        .ds Xy i

and do something on the line of

        .af P \\*(Xy

on  the appropriate places.

        jaap

bamford@ihlpf.ATT.COM (Harold E. Bamford) (04/01/89)

In article <2391@lll-lcc.UUCP> scowles@lll-lcc.llnl.gov (Sid Cowles) writes:
>i would like very much to use memorandum macros with nroff and
>ptroff on a sun 4.  unfortunately, when i do, i get unusable page
>numbers.  the page numbers come out with about 102 leading zero's
>in spite of specifying .af P 1 before any page numbers are printed.

The problem is that the nroff/troff available on the SUNs do not support
all of the commands available on AT&T nroff/troff.  The MM macros depend
upon this command (I forget which one it is) so the easiest solution is
to get an AT&T version of nroff/troff.

Sorry.

-- Harold Bamford

guy@auspex.auspex.com (Guy Harris) (04/02/89)

>The problem is that the nroff/troff available on the SUNs do not support
>all of the commands available on AT&T nroff/troff.

The "nroff"/"troff" available on the Suns (not all upper-case) *is* an
AT&T nroff/troff.  It's just an older one, of about V7 vintage....

>so the easiest solution is to get an AT&T version of nroff/troff.

Or, more correctly, "get a newer AT&T version of nroff/troff".  The
easiest way to do that is probably to pick up one of the binary versions
of Documenter's Workbench 2.0 (which, I think, contains the newest AT&T
versions of nroff/troff).  There are, I think, at least three of them
out there, namely Elan Computer Group's (EROFF), SoftQuad's (whose name
I don't remember), and some third company's ("Profficient"?).  I suspect
that some subset of the vendors of those products have already been
heard from, or are reading this group and may be heard from.... 

(Another fix is to whack on the macros, as Jaap Akkerhuis suggested.)

scowles@lll-lcc.UUCP (Sid Cowles) (04/05/89)

i would like to thank the people who responded to this query.
the answer was straightforward:  mm has a function that older
versions of {n,t}roff don't handle (the \g function).  thanks
very much for the assistance.
sid
=======================================================================
s cowles
uucp:      {backbone}!lll-lcc!scowles
internet:  scowles@lll-lcc.llnl.gov
=======================================================================