[TUHS] roff(7)

Douglas McIlroy douglas.mcilroy at dartmouth.edu
Sat Jan 1 01:47:42 AEST 2022


> Did roff do all of what troff and nroff did?

No way. Ossanna deserves all the praise you give him. Roff extended
runoff in various ways:
     relative numeric operators, e.g. .in +8
     tabbing (left, right and centered)
     underlining
     tripartite headers and footers
     arabic and roman page numbering
     adjustable head and foot margins
     automatic hyphenation, thanks to Molly Wagner
     footnotes
     merge patterns for change marks, column separators, etc.
     various special requests: .ne, .ti, .tr, .po, .op (odd page)

But roff did NOT have conditionals, traps, special characters,
environments, or arbitrary motion control. Crucially (and ironically,
because I was Mr. Macro), it did not have anything like macros,
strings and diversions until after Joe pioneered them in nroff.

So there was a gaping disparity: nroff was Turing complete, roff
wasn't. Roff merely added features to runoff; nroff leapt into a
different universe.

-----------------------

The features listed above are in the January 1971 manual for BCPL
roff, which is probably the anonymous reference cited in the November
1971 v1 manual. The v1 manual lists Osanna, Ken and Dennis as authors
of the Unix implementation. I believe Ossanna is named because he
added line-numbering--and maybe more--to entice the patent department
to switch to roff.

BCPL roff allowed all four arithmetic operators in contexts like .ls
*3. Only + and - were allowed in nroff. Eventually both BCPL roff and
nroff got number registers (defined by different commands); I don't
recall which came first. BCPL roff also got a weak macro facility,
definitely after nroff.

Doug


More information about the TUHS mailing list