Home – Books covering troff and its companions

Books covering troff and its companions


Document Formatting and Typesetting on the UNIX System, 2nd Ed., Narain Gehani.

Book Cover

mm macros, tbl, pic, eqn, and wwb tools. Very brief discussions of raw troff, ideal, grap, ms and mv macros, and refer.

Silicon Press. ISBN 0-9615336-2-5. amazon.com.


Document Formatting and Typesetting on the UNIX System Volume II: grap, mv, ms, and troff, Narain Gehani, Steven Lally.

Book Cover

In-depth coverage of items only touched upon in the first volume. The raw troff chapter has many macro writing examples.

Silicon Press. ISBN 0-9615336-3-3. amazon.com.


groff — The GNU implementation of troff

This is the texinfo document available as part of the groff package.


Introducing Unix System V, Rachel Morgan, Henry McGilton.

ISBN 0070431523. amazon.com.


Preparing Documents with Unix, Constance C. Brown, Jack L. Falk, Richard D. Sperline.

Book Cover

ISBN 013699976X. amazon.com.


Software Tools, Brian W. Kernighan, P. J. Plauger.

Book Cover

ISBN 020103669X. amazon.com.

The book's home page includes the source code for the programs from the book, including a cut-down roff.

There was also a version of the book titled Software Tools in Pascal that covers similar material but using Pascal instead of Ratfor, ‘Rational Fortran’, as the implementation language. The experience of writing this caused Brian W. Kernighan to pen Why Pascal is Not My Favorite Programming Language.


Text Processing and Typesetting with UNIX, David Barron, Mike Rees.

Book Cover

Introduces nroff and troff, the macro packages -mm and -ms, and the related preprocessors.

ISBN 0-201-14219-8. amazon.com.


troff Typesetting for UNIX Systems, Sandra L. Emerson, Karen Paulsell.

Book Cover

Emphasis on raw troff and macro writing. Some discussion of mm and man macros; more of ms macros. One chapter covering both tbl and eqn.

Prentice-Hall. ISBN 0-13-930959-4. amazon.com.


Typesetting Tables on the Unix System, Henry McGilton, Mary McNabb.

Book Cover

ISBN 0962628905. amazon.com.


Unix Document Processing and Typesetting, B. Srinivasan.

Book Cover

World Scientific, December 1993. ISBN 981-02-0605-4. amazon.com.

Details from the publisher.

Review by Andreas Kähäri, andreas.kahari at unix.net.

This is a really good book for learning about typesetting using raw nroff/troff (chapters 2 and 4) and the mm macro package (chapter 3). It also does a really good job of introducing the tbl, eqn, and pic preprocessors (chapter 5) and gives numerous examples of input to these programs.

The book is written in a clear and easy to understand language and it uses examples throughout the text. This does not mean it's only suitable as introductory material; it covers ‘difficult’ topics such as diversions, environments, traps, conditional text, and basically everything else that you will need to know to waste far too much time hacking away on private macros.

Once you have learnt the basics, you can use the comprehensive reference section (chapter 7) for your day-to-day troff-ing. It serves as a reference to both raw troff (requests, registers, and escape sequences) as well as to mm (macros and registers) and does a good job of describing every single troff request and mm macro with two to eight lines of text.

The copy of the book that I got hold of is a compact (about 35 lines per page) hard-cover that definitely has earned a place by my desk.


Unix in a Nutshell: System V Ed., 3rd Ed., Arnold Robbins.

Book Cover

O'Reilly & Associates, Inc., 1999. ISBN 1-56592-427-4. amazon.com.

Part 3 contains six chapters on troff, and common macro packages and preprocessors.


Unix nroff/troff: A User's Guide, Kevin P. Roddy.

Holt, Rinehart and Winston, 1987. ISBN 0-03-000167-6. amazon.com.


The UNIX Programming Environment, Brian W. Kernighan, Rob Pike.

Book Cover

ISBN 013937681X. amazon.com.

Brian W. Kernighan maintains the book's home page.


UNIX Text Processing, Dale Dougherty, Tim O'Reilly.

Book Cover

The book's authors, as copyright holders, have made scanned pages available.

Subscribers to the groff mailing list have undertaken to re-produce the troff source of the book, lost by the authors. A snapshot of the book is also available in various formats. The same content is also available as a PDF with clickable links.


The Unix Text Processing System, Kaare Christian.

Book Cover

Seven chapters on troff and friends: raw troff, ms and mm macros, eqn, tbl, refer, and pic.

Wiley-Interscience. ISBN 0-471-85581-2. amazon.com.


The UNIX Word Processing Book: A Step-By-Step Guide, Bryan Strong, Jay Hosler.

Wiley. ISBN 0-471-85795-5. amazon.com.


To Do

Add year of publication and number of pages.

Include the Sun ‘Formatting Documents’ and other books — Stewart Russell.


Copyright Ralph Corderoy, 2001, 2002, 2003, 2011, 2015.