nroff
{{Short description|Typesetting language}}
{{refimprove|date=February 2015}}
{{lowercase|title=nroff}}
{{Infobox Software
| name = nroff
| logo =
| screenshot =
| screenshot size =
| caption =
| author = Joe Ossanna
| developer = AT&T Bell Laboratories
| released = {{Start date and age|1972|6|12}}
| latest release version =
| latest release date =
| operating system = Unix and Unix-like
| genre = Command
| license =
| website =
}}
nroff (short for "new roff") is a text-formatting program on Unix and Unix-like operating systems. It produces output suitable for simple fixed-width printers and terminal windows. It is an integral part of the Unix help system, being used to format man pages for display.{{cite web |url=https://man7.org/linux/man-pages/man7/roff.7.html |title=roff(7) |website=Linux manual pages}}
nroff and the related troff were both developed from the original roff. While nroff was intended to produce output on terminals and line printers, troff was intended to produce output on typesetting systems. Both used the same underlying markup and a single source file could normally be used by nroff or troff without change.
History
nroff was written by Joe Ossanna for Version 2 Unix,{{cite tech report |first1=M. D. |last1=McIlroy |authorlink1=Doug McIlroy |year=1987 |url=http://www.cs.dartmouth.edu/~doug/reader.pdf |title=A Research Unix reader: annotated excerpts from the Programmer's Manual, 1971–1986 |series=CSTR |number=139 |institution=Bell Labs}} in Assembly language and then ported to C.
It was a descendant of the RUNOFF program from CTSS, the first computerized text-formatting program, and is a predecessor of the Unix troff document processing system.
Variants
There is also a free software version of nroff in the groff package emulating the AT&T version,{{cite web |url=https://man7.org/linux/man-pages/man1/nroff.1.html |title=nroff(1) |website=Linux manual pages}} widely used by Unix-like operating systems.{{cite web |url=https://man7.org/linux/man-pages/man7/roff.7.html |title=roff(7) |website=Linux manual pages |quote=Unix-like operating systems often distribute a roff system... The GNU roff—groff is arguably the most widespread roff implementation.}}
The Minix operating system, among others, uses a clone of nroff called cawf by Vic Abell, based on awf, the Amazingly Workable Formatter designed in awk by Henry Spencer. These are not full replacements for the nroff/troff suite of tools, but are sufficient for display and printing of basic documents and manual pages.
In addition, a simplified version of nroff is available in Ratfor source code form as an example in the book Software Tools by Brian Kernighan and P. J. Plauger.{{Cite web|url=https://9p.io/cm/cs/who/bwk/toolsbook/|title = Software Tools Code}}
See also
References
{{Reflist}}
External links
- [http://doc.cat-v.org/henry_spencer/awf/ source code for Henry Spencer's AWF]
- [http://www.quut.com/berlin/ms/troff.html troff/nroff quick reference]
- [https://github.com/joyent/illumos-joyent/tree/master/usr/src/cmd/troff/nroff.d nroff source code] in Illumos. [https://www.youtube.com/watch?v=l6XQUciI-Sc&t=1h28m35s Explanation] by Bryan Cantrill
Category:Assembly language software
Category:Unix text processing utilities
{{unix-stub}}