Heirloom Project

☞ Home
☞ Toolchest
☞ Bourne Shell
☛ Documentation Tools
☞ Development Tools
☞ mailx
☞ Packaging Tools
☞ vi

The Heirloom Documentation Tools

The Heirloom Documentation Tools package provides troff, nroff, and related utilities to format manual pages and other documents for output on terminals and printers. They are portable and enhanced versions of the utilities released by Sun as part of OpenSolaris, which are a variant of ditroff, which, in turn, descends to the historical Unix troff that generated output for the C/A/T phototypesetter.

nroff is most prominently used to format Unix manual pages for viewing them on a terminal. This implementation consumes relatively few system resources and is thus suitable for small system distributions. It has been enhanced to generate UTF-8 output.

troff generates PostScript output from the same document source code as nroff. Thus a special use of it is to prepare manual pages for printing. troff is a general-purpose typesetting processor, though. Significant features that have been added in this implementation are:

  • “Plug-and-Play” font handling: troff can access PostScript Type 1, OpenType, and TrueType fonts directly, that is, it can read font metrics from AFM, OpenType, or TrueType files, and can instruct its dpost post-processor to include glyph data from PFB, PFA, OpenType, and TrueType files into the output it generates.
  • Justification improvements include paragraph-at-once adjustment using a variant of the Knuth-Plass algorithm originally developed for TeX, and options to decrease word spaces and to dynamically change the letter spacing as well as the glyph widths (microtypography).
  • Pairwise kerning of characters and letter space tracking are supported. troff includes a request to construct kerning pairs for characters from different fonts.
  • Hanging characters can be used, for example, hyphens can partially or entirely hang over the right margin of a document.
  • Mechanisms for typesetting small capitals, old-style numerals, and arbitrary ligatures e.g. using Type 1 “expert” or OpenType fonts are provided.
  • Letters can be of arbitrary size, including fractional point sizes. Individual fonts can be zoomed.
  • Text input is processed according to the LC_CTYPE environment variable. With a UTF-8 locale, a large set of characters is available without the need to type troff escape sequences.
  • Hyphenation of international languages is supported using the OpenOffice variant of Raph Levien's LibHnj, which is in turn based on Liang's TeX algorithm.
  • International paper sizes such as A4 can be configured.
  • The dpost post-processor can generate instructions for the PDF distiller for the inclusion of bookmarks, links, titles, and authorship information.
  • Most groff extensions, like long names for requests, strings, and number registers, are supported. A special groff compatibility mode is also provided.
  • Other troff language extensions include a string search request, output line traps, floating-point registers, and local variables per macro instance.

The distribution contains a script to convert OpenDocument files to troff input. This allows troff to act as typesetting application in a production scheme where authors hand in office documents.


Samples, introductory documents, manuals

View the Troff Demonstration Page to get an impression of what can be done with troff and PostScript fonts.

The Quickstart Guide is a short introduction for those who are already familiar with other versions of troff and want to explore Heirloom troff now.

Paragraph-at-once adjustment, microtypography, and other improvements to the adjustment mechanisms are presented in Justification in Heirloom Troff.

Font Handling in Troff with PostScript Devices explains how to install fonts and how to access their typographical features.

The Nroff/Troff User's Manual forms the reference documentation for nroff and troff.

Online manual pages for addbib, checknr, dpost, eqn, grap, lookbib, mcolor, mpictures, nroff, otfdump, pic, picpack, ptx, refer, roffbib, soelim, sortbib, tbl, troff, and vgrind are available.

For installation instructions, see the README.

The list of CHANGES made since the first release.

Browse the CVS repository.


Download the source code

Use

$ cvs -d:pserver:anonymous@heirloom.cvs.sourceforge.net:/cvsroot/heirloom \
	login
CVS password:<just type return>
$ cvs -d:pserver:anonymous@heirloom.cvs.sourceforge.net:/cvsroot/heirloom \
	co -P heirloom-doctools
to retrieve a copy. Follow these instructions for more information. If you want to report a problem, please look at the CHANGES to see if it has already been resolved,

Gunnar Ritter <gunnarr@acm.org> 2010-06-20

SourceForge.net Logo