<<

User Commands TROFF2HTML ( 1 )

NAME troff2html − convert output into HTML SYNOPSIS troff2html [ -t title ][®le ... ] DESCRIPTION Troff2html reads the troff(1) output in the named ®les, default standard input, and converts them into HTML. Troff2html does a tolerable job with straight troff output, but it is helped by annotations, described below. Its main use is for man2html (see Plan 9's httpd(8)), which converts man(1) pages into HTML and depends on a specially annotated set of man(7) macros, invoked by troff -manhtml. Troff output lines beginning x X ... which are introduced by placing \X'html ...' in the input, cause the rest of the line to be interpolated into the HTML produced. Several such lines are recognized specially by troff2html. The most important are the pair x X html manref start cp 1 x X html manref end cp 1 which are used to create HTML hyperlinks around text of the form cp(1) pointing to /magic/man2html/1/cp. Troff2html is new and experimental; in time, it may improve and subsume Plan 9's ms2html(1). On the one hand, because it uses the input, ms2html can handle (1), (1), etc., which troff2html does not handle at all; on the other hand, ms2html understands only ms(7) documents and is easily confused by complex troff constructions. Troff2html has the reverse properties: it does not handle the but its out- put is reliable and (modulo helper annotations) is independent of package. SEE ALSO troff(1), Plan 9's ms2html(1), man2html in Plan 9's httpd(8). BUGS Troff and HTML have different models, and they don't mesh well in all cases. Troff's indented para- graphs are not well served in HTML, and the output of troff2html shows this.

SunOS 5.10 Last change: 1