Home – Source code
The source of Bell Labs' troff isn't generally available. A descendant used in their Plan 9 operating system is accessible along with the rest of the source of Plan 9 which includes pic, eqn, etc.
GNU groff's source is available from the GNU Groff page, including a web interface to their CVS repository.
The Heirloom project has a Documentation Tools package that provides troff, nroff, and related utilities. They are portable and enhanced versions of the utilities released by Sun as part of OpenSolaris.
chem is available from Brian Kernighan's home page.
dformat is available from Jon Bentley's paper but to save extracting it from the PostScript there are two versions available from troff.org. dformat.jlb is identical to the version in the paper. dformat is derived from dformat.jlb but has been re-formatted for ease of reading and changed from a shell script to an awk script. No other changes have been made.
Some of the macro packages from the 7th Edition of Unix are available from Bell Labs in a shell archive.
From: Mark Lawrence <email@example.com> Caldera has released (under a Berkeley-style license) the source code for a variety of old Unices. This includes the sources for troff and friends. They can be found at http://www.tuhs.org/Archive/PDP-11/Distributions/research/ which gives Version 3 through Version 7, and http://www.tuhs.org/Archive/PDP-11/Distributions/usdl/ which gives 32V. The details of the Caldera's license are in the PDF file http://www.tuhs.org/Archive/Caldera-license.pdf These might be good way to investigate the "how did the original troff do it?" questions that occasionally arise. (Then again, maybe not--ditroff was a relative latecomer. Does anyone have a C/A/T phototypesetter?) At any rate, I think it's worth inclusion in the source code page of troff.org. [and later] Sorry, Mr. Toomey must have rearranged his site after being /.ed. The current links are: ftp://minnie.tuhs.org/UnixArchive/PDP-11/Distributions/research/ ftp://minnie.tuhs.org/UnixArchive/PDP-11/Distributions/usdl/32V/ ftp://minnie.tuhs.org/UnixArchive/Caldera-license.pdf
From: Jaap-Jan Boor <firstname.lastname@example.org> Also, for non-commercial use, the Solaris 8 code can be downloaded from Sun, this includes the Sys V.4 troff source.
From: Bernd Warken <email@example.com> - http://plan9.bell-labs.com - register with your name and email address. - fill in the floppy setup screen (or just do a `continue'). - download the plan9.9gz (large ~60 MB), the complete install incl. source - `gunzip plan9.9gz' produces a ~150 MB plain text archive. - in `less' search for the files starting with `/sys/src/cmd/troff'.
Copyright Ralph Corderoy, 2001, 2002, 2003, 2004, 2006. $Revision: 1.27 $.