1 78e51a8c 2005-01-14 devnull .TH TROFF2HTML 1
3 78e51a8c 2005-01-14 devnull troff2html \- convert troff output into HTML
4 78e51a8c 2005-01-14 devnull .SH SYNOPSIS
5 78e51a8c 2005-01-14 devnull .B troff2html
13 78e51a8c 2005-01-14 devnull .SH DESCRIPTION
14 78e51a8c 2005-01-14 devnull .I Troff2html
15 78e51a8c 2005-01-14 devnull reads the
16 d32deab1 2020-08-16 rsc .MR troff (1)
17 78e51a8c 2005-01-14 devnull output in the named
18 78e51a8c 2005-01-14 devnull .IR files ,
19 78e51a8c 2005-01-14 devnull default standard input,
20 78e51a8c 2005-01-14 devnull and converts them into HTML.
22 78e51a8c 2005-01-14 devnull .I Troff2html
23 78e51a8c 2005-01-14 devnull does a tolerable job with straight
25 78e51a8c 2005-01-14 devnull output, but it is helped by annotations, described below.
26 78e51a8c 2005-01-14 devnull Its main use is for
27 78e51a8c 2005-01-14 devnull .B man2html
28 977b25a7 2020-08-14 rsc (see Plan 9's
29 977b25a7 2020-08-14 rsc .IR httpd (8)),
30 78e51a8c 2005-01-14 devnull which converts
32 78e51a8c 2005-01-14 devnull pages into HTML
33 78e51a8c 2005-01-14 devnull and depends on a specially annotated set of
35 78e51a8c 2005-01-14 devnull macros, invoked by
37 78e51a8c 2005-01-14 devnull .BR -manhtml .
40 78e51a8c 2005-01-14 devnull output lines beginning
43 78e51a8c 2005-01-14 devnull x X html \f1...
46 78e51a8c 2005-01-14 devnull which are introduced by placing
47 78e51a8c 2005-01-14 devnull .B \eX'html\ \f1...\fP'
49 78e51a8c 2005-01-14 devnull .IR input ,
50 78e51a8c 2005-01-14 devnull cause the rest of the line to be interpolated into the HTML produced.
51 78e51a8c 2005-01-14 devnull Several such lines are recognized specially by
52 78e51a8c 2005-01-14 devnull .IR troff2html .
53 78e51a8c 2005-01-14 devnull The most important are the pair
56 78e51a8c 2005-01-14 devnull x X html manref start cp 1
57 78e51a8c 2005-01-14 devnull x X html manref end cp 1
60 78e51a8c 2005-01-14 devnull which are used to create HTML hyperlinks around text of the form
62 78e51a8c 2005-01-14 devnull pointing to
63 78e51a8c 2005-01-14 devnull .BR /magic/man2html/1/cp .
65 78e51a8c 2005-01-14 devnull .I Troff2html
66 78e51a8c 2005-01-14 devnull is new and experimental; in time, it may improve and subsume
68 977b25a7 2020-08-14 rsc .IR ms2html (1).
69 78e51a8c 2005-01-14 devnull On the one hand, because it uses the input,
70 78e51a8c 2005-01-14 devnull .B ms2html
71 78e51a8c 2005-01-14 devnull can handle
72 d32deab1 2020-08-16 rsc .MR pic (1) ,
73 d32deab1 2020-08-16 rsc .MR eqn (1) ,
74 78e51a8c 2005-01-14 devnull etc., which
75 78e51a8c 2005-01-14 devnull .I troff2html
76 78e51a8c 2005-01-14 devnull does not handle at all; on the other hand,
77 78e51a8c 2005-01-14 devnull .B ms2html
78 78e51a8c 2005-01-14 devnull understands only
80 78e51a8c 2005-01-14 devnull documents and is easily confused by complex
82 78e51a8c 2005-01-14 devnull constructions.
83 78e51a8c 2005-01-14 devnull .I Troff2html
84 78e51a8c 2005-01-14 devnull has the reverse properties: it does not handle the preprocessors but its output
85 78e51a8c 2005-01-14 devnull is reliable and (modulo helper annotations) is independent of macro package.
86 78e51a8c 2005-01-14 devnull .SH SEE ALSO
87 d32deab1 2020-08-16 rsc .MR troff (1) ,
89 977b25a7 2020-08-14 rsc .IR ms2html (1),
90 adc93f60 2005-01-14 devnull .I man2html
93 977b25a7 2020-08-14 rsc .IR httpd (8).
96 78e51a8c 2005-01-14 devnull and HTML have different models, and they don't mesh well in all cases.
97 78e51a8c 2005-01-14 devnull .BR Troff 's
98 78e51a8c 2005-01-14 devnull indented paragraphs are not well served in HTML, and the output of
99 78e51a8c 2005-01-14 devnull .I troff2html
100 78e51a8c 2005-01-14 devnull shows this.