Use Troff !

What is Troff?

Troff is the historical text processor for Unix. It is mainly used today to format manual pages, but it is also able to produce postscript and pdf files. There are several implementation of troff, and amongst them, some provide high quality typographic features – such as a paragraph at once adjustment – which make them able to contest with TeX.

The Utroff project

The Utroff project aims to prove that Troff can still be used efficiently today. For that purpose, it provides a «piles included» set of macros (utmac), and a set of tools to index documents (idx), write polytonic greek (tchars), manage bibliography references (refer), highlight source code (ugrind), and eventually, export troff documents to xml, html, and flat OpenDocument (troffxml).

You can get an overview of the layout by downloading layout-uh.pdf, layout-ul.pdf, and layout-us.pdf.

Troff implementations

Utroff does not provide the troff text processor itself. But it is compatible with the two troff implementations providing paragraph at once adjustment:


2018-04-14 utmac

Utmac now uses Neatroff as its default troff processor. Since Neatroff does not provide nroff, Groff is used instead to produce plain text files and xml files.

2017-12-11 troffxml-0.6

Utmac now uses KA, KN, KT, KO, KW macros to index some keywords. These changes are reflected on utohtml.xsl.

Bugfixes in postxml: any number of following #- are deleted, and #- are not ignored after repeated newlines.

2017-12-11 utmac-0.6

The macro to define the substitution text for a link is now LT instead of LP.

The user interface to index keywords is now completely separated from the one used to print links. The keywords to index are now defined by the K[x] macro. K[x] macros don’t print anything, and the (new) LT macro is now reserved to links.

Defined K[x] macros are KA (acronyms), KN (names), KO (objects, things), KT (titles, books), KW (words). It is easy to add new ones by using the internal idx:make macro.

Following the development of Heirloom Troff on github, ux.tmac now uses \(dq to escape double quotes and u-ref.tmac now uses \E as escape seqence instead of \\.

2017/12/08 utmac-0.5

The macros for links are now in u-links.tmac. LL, LM and LU now print the link even if LP is not used. A glitch in summaries and table of contents has been fixed by correctly escaping \a and \t.

2017/12/08 troffxml-0.5

Utofodt.xsl attempts to render the code formatted by Ugrind correctly. Utohtml.xsl has a better support for index macros and links. A bug affecting internal links to bottom notes is fixed in utohtml.xsl.

2017/12/06 ugrind-0.4

Separating ugrind from the Utroff archive. The troff formatter now escape ’\’ in macro names. Fix a bug in the troff formatter which was dropping newlines in some circumstances (bug report by Marcin Cieslak). Removed unused variables, added parenthesis and braces to fix compiler warnings (bug report by Marcin Cieslak).

2017/12/05 refer-0.4

Separating refer from the Utroff archive. Added parenthesis and braces to fix compiler warnings, and added missing fields in sortbib (bug report by Marcin Cieslak).

2017/12/01 troffxml-0.4

Separating troffxml from the Utroff archive. Fixed a bug in utohtml.xsl which was not linking notes correctly.

2017/11/30 tchars-0.4

Separating tchars from the Utroff archive. Tchars now translates characters indicated by the macros CW, CL, CS, CE.

2017/11/25 utmac-0.4

Separatting Utmac from the Utroff archive. Added macro ul to write letters.

2014/03/17 utroff-0.3

U: Remove bashisms (bug report by fravashyo) and fix a bug in the directory list of fonts.

2014/03/13 utroff-0.2

tchars: RFC 3629 ends utf8 at U+10FFFF, so that utf8 is never encoded on more than 4 bits (bug report by seb).

utmac: Load a font if the user locale macro does not do it (bug report by Fravashyo).

2013/11/05 utroff-0.1

Initial revision.