1. Introduction

troff2page converts troff (man and ms) documents into HTML web pages.

To convert an input troff document named jobname.ms, use the script troff2page on the operating-system command line.

    troff2page jobname.ms

at your operating-system prompt. This creates an output HTML file jobname.html in the current directory. (This HTML file has the same basename as the input troff file (i.e., jobname), but its extension is .html.)

If the input troff uses the page-break request .bp, then the output HTML consists of a series of interlinked files: The first file is named jobname.html; the rest are jobname-Z-H-1.html, jobname-Z-H-2.html, &c.

The script troff2page runs on the Unix command-line on Cygwin, Linux, Mac OS X, and Solaris. It uses the Common Lisp implementation mentioned in the shell environment variable LISP, which can currently be set to either clisp, clozure, cmu, ecl, or sbcl: the corresponding Lisp implementations being CLISP, Clozure CL, CMUCL, ECL, and SBCL.

Copy the script troff2page to your PATH.

If LISP is not set, some default Lisp implementation is assumed.

For more information, please see the file INSTALL in the distribution.

Calling troff2page from within Lisp

It is not necessary to run the file troff2page as a Unix script. You can simply load troff2page (it is a Lisp file) into your Common Lisp, and then call the Lisp procedure troff2page:troff2page (i.e., the procedure named troff2page in the package troff2page) on your source document. E.g.,

    (load "pathname/of/troff2page")
    (troff2page:troff2page "my-troff-document.ms")

The procedure troff2page:troff2page can be called several times, on the same or different documents, from within the same Lisp session.