Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

An nroff clone

48 views
Skip to first unread message

m...@ccsitn.att.com

unread,
Sep 11, 1989, 8:57:57 AM9/11/89
to
A related note. There is a nroff like clone available from M&T publishers
consisting of code that was originally printed in Dr. Dobbs. I have a copy
of it and it's pretty good. It includes a macro package that is essentially
the same as the MS macros from unix, no man or mm.

I am not sure whether this can be posted or not, or even if I should because
of the amount of stuff in the package. It should be easy to port though
because the package was originally done in a way that emphasizes portability.

The program is called NR.

Mike Dickson arpa!ccsitn!mcd
att!ccsitn!mcd
m...@ccsitn.att.com

marty

unread,
Sep 11, 1989, 12:56:59 PM9/11/89
to
A port of NR has been done by Peter Housel, the diffs were posted last
year.

I"ve used NR on Ms/Dos -- I felt it worked pretty good. For $29, you get
the disk + a 100 page manual which is intelligently written.

I've meant to recompile it to run under Unix, Ms/Dos and Minix. I just
haven't gotten around to it.

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

Greg Hinton

unread,
Sep 11, 1989, 1:14:30 PM9/11/89
to
In article <23...@louie.udel.EDU> m...@ccsitn.att.com writes:
>A related note. There is a nroff like clone available from M&T publishers
>consisting of code that was originally printed in Dr. Dobbs. I have a copy
>of it and it's pretty good. It includes a macro package that is essentially
>the same as the MS macros from unix, no man or mm.
>
>I am not sure whether this can be posted or not, or even if I should because
>of the amount of stuff in the package. It should be easy to port though
>because the package was originally done in a way that emphasizes portability.
>
>The program is called NR.

NR is copyrighted by Allen Holub & the manual contains the statement,
"This document and the accompanying software may not be copied or
distributed ... except for purposes of backup."

It's not a complete nroff, although from what I've seen it's much better
than NRO. It can be had for $29.95 from M&T:
M & T Publishing, Inc.
501 Galveston Drive
Redwood City, CA 94063
--
Greg Hinton
DOMAIN: hin...@netcom.uucp
UUCP: uunet!apple!netcom!hinton

Andy Tanenbaum

unread,
Sep 11, 1989, 1:16:47 PM9/11/89
to
>A related note. There is a nroff like clone available from M&T publishers
>I am not sure whether this can be posted or not, or even if I should because
>of the amount of stuff in the package.

Could you please check it out. I took a closer look at nroff, and decided to
rename it nro again (subsequent to the last posting). It isn't even close
to nroff and it barely works, to boot. If somebody is publishing the nroff
you have, it is probably copyright and we can't use it, but one never knows.
Various companies sell TEX, even though it is in the public domain.

Andy Tanenbaum (a...@cs.vu.nl)

Bill Rosenkranz

unread,
Sep 12, 1989, 2:15:57 PM9/12/89
to
=A related note. There is a nroff like clone available from M&T publishers
=consisting of code that was originally printed in Dr. Dobbs. I have a copy
=...
=I am not sure whether this can be posted or not, or even if I should because
=...
=The program is called NR.

i doubt this can be posted. it is copyrighted and sold for profit.

i have been playing around with the nro posted. i have added .fl, .ec, .ft,
.ll, .pn, .lt, .c2, .tl, .af, .ad, .na and several of the internal registers.
i also fixed macro definition to include handling \\, \n, etc correctly.

i am working on .ds, .if, .wh and .di (strings, conditionals, traps, and
diversions). all this is being done under TOS on the ST but it should port
(except probably \fB, .ft) to minix. i added all the \(xx and \(*xx special
characters, too, that the ST normally has.

if i ever get the diversions and traps done, i'll post it.


-bill
rose...@boston.cray.com
rose...@hall.cray.com

Andy Tanenbaum

unread,
Sep 13, 1989, 5:48:51 PM9/13/89
to
In article <46...@hall.cray.com> rose...@hall.UUCP (Bill Rosenkranz) writes:
>In article <23...@louie.udel.EDU> m...@ccsitn.att.com writes:
>i have been playing around with the nro posted. i have added .fl, .ec, .ft,
>.ll, .pn, .lt, .c2, .tl, .af, .ad, .na and several of the internal registers.
>i also fixed macro definition to include handling \\, \n, etc correctly.

WONDERFUL! I think that text processing is one area where MINIX is very
deficient. An improved nro would be a big plus.

One personal request. I use \fR \fB and \fI all over the place. It would
be nice if nro could handle them as regular, overstriking, and underlining,
respectively. Another very useful feature would be .if . I have macro
packages that are actually for troff, but I could easily test
.if n
to see if it is nroff, and proceed differently.

If you make enough progress, I might even rename nro back to nroff (again).

Andy Tanenbaum (a...@cs.vu.nl)

Systems Staff

unread,
Sep 14, 1989, 4:45:33 PM9/14/89
to
While we're on the subject of nroff style formatters let's not overlook
the public domain _proff_ (portable roff) which was posted to net.sources
nearly four years ago.

There are two attachments to this posting. The first is the author's
message stating the public domain status and a little history of the
program. The second is the appendix to the manual (yes, there is a
manual -- formatted by proff) which lists the implemented commands.

There are also implementations of subsets of the mm and ms macro
packages available.

Available means I have copies of all this in my current directory.


Thos Sumner Internet: th...@cca.ucsf.edu
(The I.G.) UUCP: ...ucbvax!ucsfcgl!cca.ucsf!thos
BITNET: thos@ucsfcca

U.S. Mail: Thos Sumner, Computer Center, Rm U-76, UCSF
San Francisco, CA 94143-0704 USA

I hear nothing in life is certain but death and taxes -- and they're
working on death.

#include <disclaimer.std>
====================================================================

Newsgroups: net.sources
Subject: Status of PROFF (in case it is confusing)
Date: 19 Jan 86 01:07:52 GMT
Reply-To: o...@yetti.UUCP (Ozan Yigit)
Organization: York University Computer Science

I received several messages about the status of PROFF. Perhaps
my initial note was somewhat confusing:

o PROFF is written by myself, year-and-a-half ago, by first
translating Software TOols FORMAT from RATFOR to C. It was
written specifically to supplement the microcomputer environment
established in the Faculty of Administrative Studies, York U.

o Upon some discussion with the Admin. Studies, we decided to
release it to the world, without a copyright notice. This would
make PROFF Public Domain.

o At the same time, sources were handed over to them, for their
own maintenance. They are likely to make some changes, improve
it, and hack it to suit their needs.

o Future revisions of PROFF, as generated by The Faculty of
Administrative Studies may contain York University COPYRIGHT.
[that is a big MAYBE]. I do not think that would mean much,
since we would distribute it in source level anyway.

o If you want to make money out of PROFF, go right ahead.
[I think, by the time you are finished, you would have
done a major re-write anyway. So you perhaps deserve to
make some money out of it :-)].

I hope that this note clerifies PROFF's status, in case
you are not sure.

Oz

--
Usenet: [decvax|allegra|linus|ihnp4]!utzoo!yetti!oz
Bitnet: oz@[yusol|yuyetti]
In the beginning, there was Word all right, except
it wasn't fixed number of bits.

===================================================================

Here is the appendix listing the implemented commands (formatted 60
lines per page for our printers which have built-in page break space):


1.0 Appendix A 30


Appendix A
Summary of Commands

----------------------------------------------------------
.fi | .f | .fill
default: initial: yes break: yes
begin filling output lines
----------------------------------------------------------
.nf | .nofill
default: initial: no break: yes
stop filling
----------------------------------------------------------
.ju | .j | .justify
default: initial: yes break: yes
begin justifying filled lines
----------------------------------------------------------
.nj | .nojustify
default: initial: no break: yes
stop justifying
----------------------------------------------------------
.br | .break
default: initial: break: yes
cause a break and output current line
----------------------------------------------------------
.in | .lm | .leftmargin [+|-][n]
default: 0 inital: 0 break: yes
set left margin to column n+1
----------------------------------------------------------
.ti | .i | .left [+|-][n]
default: 0 initial: break: yes
temporarily indent next output n spaces
----------------------------------------------------------
.st | .spaceto [-][n]
default: 0 initial: break: yes
space to line +n from top
space to line -n from bottom
----------------------------------------------------------
.sp | .s | .skip [n]
default: 1 initial: break: yes
space n lines except at top of page
----------------------------------------------------------
.ce | .center [n | on | off]
default: 1 initial break: yes
center next n lines
center until turned off
----------------------------------------------------------
.ul | .underline [n | on | off]
default: 1 initial break: no
underline next n lines
underline until turned off
----------------------------------------------------------


1.0 Appendix A 31


----------------------------------------------------------
.ul | .underline [all | words]
default: words initial: words break: no
set mode for underline - words or all
----------------------------------------------------------
.bd | .bold [n | on | off]
default: 1 initial: break: no
boldface (overstrike) next n lines
boldface until turned off
----------------------------------------------------------
.db | .dbo | .disablebolding
default: initial: no break: no
disable bolding
----------------------------------------------------------
.eb | .ebo | .enablebolding
default: initial: yes break: no
enable bolding
----------------------------------------------------------
.ls | .spc | .spacing [n]
default: 1 initial: 1 break: no
set line spacing to n
----------------------------------------------------------
.bp | .pg | .page [n]
default: +1 initial: 1 break: yes
begin a new page and number it n
----------------------------------------------------------
.pn | .pagenumber {roman} | {arabic}
default: initial: arabic break: no
set page numbering to arabic or roman
----------------------------------------------------------
.np | .nopaging
default: initial: no break: yes
disable paging
----------------------------------------------------------
.pa | .paging
default: initial: yes break: yes
enable paging
----------------------------------------------------------
.ne | .need | .tp | .testpage [n]
default: 0 initial: break: yes/no
need n lines. Break and generate a new page
if not available
----------------------------------------------------------
.he | .header <text>
default: null initial: null break: no
set header to text (/left/center/right/)
----------------------------------------------------------
.fo | .footer <text>
default: null initial: null break: no
set footer to text (/lef/center/right/)
----------------------------------------------------------


1.0 Appendix A 32


----------------------------------------------------------
.oh <text>
default: null initial: null break: no
set header on odd pages to text
----------------------------------------------------------
.eh <text>
default: null initial: null break: no
set header on even pages to text
----------------------------------------------------------
.of <text>
default: null initial: null break: no
set footer on odd pages to text
----------------------------------------------------------
.ef <text>
default: null initial: null break: no
set footer on odd pages to text
----------------------------------------------------------
.po | .offset [+|-][n]
default: 0 initial: 0 break: yes
set page offset to n spaces
----------------------------------------------------------
.rm | .rightmargin [+|-][n]
default: 65 initial: 65 break: no
set right margin to column n
----------------------------------------------------------
.pl | .ps | .pagesize [n]
default: 66 initial: 66 break: no
set page length to n lines
----------------------------------------------------------
.m1 [n]
default: 3 initial: 3 break: no
lines between top of page and header
----------------------------------------------------------
.m2 [n]
default: 2 initial: 2 break: no
lines between header and text
----------------------------------------------------------
.m3 [n]
default: 2 initial: 2 break: no
lines between text and footer
----------------------------------------------------------
.m4 [n]
default: 3 initial: 3 break: no
lines between footer and bottom
----------------------------------------------------------
.cl | .contline [<n> <text>]
default: initial: break: yes
enter text into table of contents at level
n
----------------------------------------------------------

1.0 Appendix A 33


----------------------------------------------------------
.pc | .printcont [n]
default: 3 initial: 3 break: yes
print table of contents, indent each level
n spaces
----------------------------------------------------------
.vs | .set <variable> [definition]
default: initial: break: no
set variable to text
----------------------------------------------------------
.vg | .get <variable> <prompt>
default: initial: break: no
set variable interactively, using text
as prompt
----------------------------------------------------------
.nr <a-z> [+|-][n]
default: 0 initial: 0 break: no
set number register (a-z) to n
----------------------------------------------------------
.cc | .cchar [char]
default: "." initial: "." break: no
set command control character to char
----------------------------------------------------------
.ec | .echar [char]
default: "_" initial: "_" break: no
set universal escape character to char
----------------------------------------------------------
.so | .source | .include | .require [filename]
default: initial: input break: no
switch input to file
----------------------------------------------------------
.sv | .save
default: initial: break: yes
save the current formatter context on
context stack
----------------------------------------------------------
.rs | .restore
default: initial: break: yes
restore the formatter context from context
stack
----------------------------------------------------------
.lx | .lex <command> [equate]
default: initial: break: no
rename a command
----------------------------------------------------------
.ap | .autoparagraph
default: initial: no break: no
enable auto-paragraphing
----------------------------------------------------------


1.0 Appendix A 34


----------------------------------------------------------
.na | nap | .noautoparagraph
default: initial: yes break: no
disable auto-paragraphing
----------------------------------------------------------
.wr | .write <string>
default: initial: break: no
write a special string to output. line
counter does not change
----------------------------------------------------------
.de | .define <macro name>
default: initial: break: no
define a macro command - ends at ".en"
----------------------------------------------------------
.en
default: initial: break: no
end the macro definition
----------------------------------------------------------

0 new messages