Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: vallor Newsgroups: comp.os.linux.advocacy,comp.os.linux.misc,alt.folklore.computers Subject: More on {t,n,g}roff (was: Re: GNOME bans Manjaro Core Team Member for uttering "Lunduke") Date: 29 Jul 2024 01:38:44 GMT Lines: 135 Message-ID: References: <20240728114445.5d023a52811d79fd6fe517c6@eircom.net> <878qxl4c36.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net RV9JIhHjskDsJXq+AwkXnwrYOmBhneLZgLeLlMMVRkAWA+uZf0 Cancel-Lock: sha1:3T4kxisQX5KrjfZAignCEMKB79Q= sha256:SrJ2qucCsWymEC9k5CTTFAuv5SIW34BkNNqh++nwRcQ= X-Face: +McU)#<-H?9lTb(Th!zR`EpVrp<0)1p5CmPu.kOscy8LRp_\u`:tW;dxPo./(fCl CaKku`)]}.V/"6rISCIDP` User-Agent: Pan/0.159 (Vovchansk; c649823; Linux-6.10.2) Xref: csiph.com comp.os.linux.advocacy:661323 comp.os.linux.misc:57437 alt.folklore.computers:226162 On Sun, 28 Jul 2024 08:15:41 -1000, Lynn Wheeler wrote in <878qxl4c36.fsf@localhost>: [snip, a very informative article, thank you. :) ] Thank you, Lynn, read your article with interest. The groff info document contains a section, "History", that I couldn't find on its web page. (More on that below.) I've included it here, and can be read with "info groff", which on my system is version 1.22.4. 1.2 History =========== 'troff' can trace its origins back to a formatting program called 'RUNOFF', written by Jerry Saltzer, which ran on the CTSS (_Compatible Time Sharing System_, a project of MIT, the Massachusetts Institute of Technology) in the mid-sixties.(1) (*note History-Footnote-1::) The name came from the use of the phrase "run off a document", meaning to print it out. Bob Morris ported it to the 635 architecture and called the program 'roff' (an abbreviation of 'runoff'). It was rewritten as 'rf' for the PDP-7 (before having Unix), and at the same time (1969), Doug McIlroy rewrote an extended and simplified version of 'roff' in the BCPL programming language. In 1971, the Unix developers wanted to get a PDP-11, and to justify the cost, proposed the development of a document formatting system for the AT&T patents division. This first formatting program was a reimplementation of McIlroy's 'roff', written by J. F. Ossanna. When they needed a more flexible language, a new version of 'roff' called 'nroff' ("Newer 'roff'") was written. It had a much more complicated syntax, but provided the basis for all future versions. When they got a Graphic Systems CAT Phototypesetter, Ossanna wrote a version of 'nroff' that would drive it. It was dubbed 'troff', for "typesetter 'roff'", although many people have speculated that it actually means "Times 'roff'" because of the use of the Times font family in 'troff' by default. As such, the name 'troff' is pronounced 't-roff' rather than 'trough'. With 'troff' came 'nroff' (they were actually the same program except for some '#ifdef's), which was for producing output for line printers and character terminals. It understood everything 'troff' did, and ignored the commands that were not applicable (e.g. font changes). Since there are several things that cannot be done easily in 'troff', work on several preprocessors began. These programs would transform certain parts of a document into 'troff', which made a very natural use of pipes in Unix. The 'eqn' preprocessor allowed mathematical formulae to be specified in a much simpler and more intuitive manner. 'tbl' is a preprocessor for formatting tables. The 'refer' preprocessor (and the similar program, 'bib') processes citations in a document according to a bibliographic database. Unfortunately, Ossanna's 'troff' was written in PDP-11 assembly language and produced output specifically for the CAT phototypesetter. He rewrote it in C, although it was now 7000 lines of uncommented code and still dependent on the CAT. As the CAT became less common, and was no longer supported by the manufacturer, the need to make it support other devices became a priority. However, before this could be done, Ossanna died by a severe heart attack in a hospital while recovering from a previous one. So, Brian Kernighan took on the task of rewriting 'troff'. The newly rewritten version produced device independent code that was very easy for postprocessors to read and translate to the appropriate printer codes. Also, this new version of 'troff' (called 'ditroff' for "device independent 'troff'") had several extensions, which included drawing functions. Due to the additional abilities of the new version of 'troff', several new preprocessors appeared. The 'pic' preprocessor provides a wide range of drawing functions. Likewise the 'ideal' preprocessor did the same, although via a much different paradigm. The 'grap' preprocessor took specifications for graphs, but, unlike other preprocessors, produced 'pic' code. James Clark began work on a GNU implementation of 'ditroff' in early 1989. The first version, 'groff' 0.3.1, was released June 1990. 'groff' included: * A replacement for 'ditroff' with many extensions. * The 'soelim', 'pic', 'tbl', and 'eqn' preprocessors. * Postprocessors for character devices, POSTSCRIPT, TeX DVI, and X Windows. GNU 'troff' also eliminated the need for a separate 'nroff' program with a postprocessor that would produce ASCII output. * A version of the 'me' macros and an implementation of the 'man' macros. Also, a front-end was included that could construct the, sometimes painfully long, pipelines required for all the post- and preprocessors. Development of GNU 'troff' progressed rapidly, and saw the additions of a replacement for 'refer', an implementation of the 'ms' and 'mm' macros, and a program to deduce how to format a document ('grog'). It was declared a stable (i.e. non-beta) package with the release of version 1.04 around November 1991. Beginning in 1999, 'groff' has new maintainers (the package was an orphan for a few years). As a result, new features and programs like 'grn', a preprocessor for gremlin images, and an output device to produce HTML and XHTML have been added. (1) Jerome H. Saltzer, a grad student then, later a Professor of Electrical Engineering, now retired. Saltzer's PhD thesis was the first application for 'RUNOFF' and is available from the MIT Libraries. _ _ _ _ _ _ _ I'm interested in how well this history bleshes up with what others know, especially since it doesn't appear here, the latest info document: https://www.gnu.org/software/groff/manual/groff.info.tar.gz There is another, perhaps better-written, history in "man 7 roff". Also, as part of this excursion, I learned about "groffer", which (on my Linux Mint system) will format a man page as pdf and display it using Xreader. (As someone mentioned previously, the advantage of using a GUI for workstation users is that one gets to see the *bold* and /italic/ fonts in all their glory, instead of terminal replacements.) TL;DR: roff is one of the oldest Unix applications, if not _the_ oldest -- and hats off to Lynn for preserving its history. -- -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti OS: Linux 6.10.2 Release: Mint 21.3 Mem: 258G (And using Linux since the 1992 MCC "distribution"... such as it was.)