Blob


1 <head>
2 <title>troff2html(1) - Plan 9 from User Space</title>
3 <meta content="text/html; charset=utf-8" http-equiv=Content-Type>
4 </head>
5 <body bgcolor=#ffffff>
6 <table border=0 cellpadding=0 cellspacing=0 width=100%>
7 <tr height=10><td>
8 <tr><td width=20><td>
9 <tr><td width=20><td><b>TROFF2HTML(1)</b><td align=right><b>TROFF2HTML(1)</b>
10 <tr><td width=20><td colspan=2>
11 <br>
12 <p><font size=+1><b>NAME </b></font><br>
14 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
16 troff2html &ndash; convert troff output into HTML<br>
18 </table>
19 <p><font size=+1><b>SYNOPSIS </b></font><br>
21 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
23 <tt><font size=+1>troff2html</font></tt> [ <tt><font size=+1>&#8722;t</font></tt> <i>title</i> ] [ <i>file</i> ... ]<br>
25 </table>
26 <p><font size=+1><b>DESCRIPTION </b></font><br>
28 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
30 <i>Troff2html</i> reads the <a href="../man1/troff.html"><i>troff</i>(1)</a> output in the named <i>files</i>, default
31 standard input, and converts them into HTML.
32 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
34 <i>Troff2html</i> does a tolerable job with straight <tt><font size=+1>troff</font></tt> output, but
35 it is helped by annotations, described below. Its main use is
36 for <tt><font size=+1>man2html</font></tt> (see Plan 9&#8217;s <i>httpd</i>(8)), which converts <a href="../man1/man.html"><i>man</i>(1)</a> pages
37 into HTML and depends on a specially annotated set of <a href="../man6/man.html"><i>man</i>(6)</a> macros,
38 invoked by <tt><font size=+1>troff &#8722;manhtml</font></tt>.
39 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
41 <tt><font size=+1>Troff</font></tt> output lines beginning<br>
43 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
45 <tt><font size=+1>x X html</font></tt> ...<br>
47 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
50 </table>
51 which are introduced by placing <tt><font size=+1>\X'html</font></tt> ...<tt><font size=+1>'</font></tt> in the <i>input</i>, cause
52 the rest of the line to be interpolated into the HTML produced.
53 Several such lines are recognized specially by <i>troff2html</i>. The
54 most important are the pair<br>
56 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
58 <tt><font size=+1>x X html manref start cp 1<br>
59 x X html manref end cp 1<br>
61 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
62 </font></tt>
64 </table>
65 which are used to create HTML hyperlinks around text of the form
66 <a href="../man1/cp.html"><i>cp</i>(1)</a> pointing to <tt><font size=+1>/magic/man2html/1/cp</font></tt>.
67 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
69 <i>Troff2html</i> is new and experimental; in time, it may improve and
70 subsume <a href="../man1/ms2html.html"><i>ms2html</i>(1)</a>. On the one hand, because it uses the input,
71 <tt><font size=+1>ms2html</font></tt> can handle <a href="../man1/pic.html"><i>pic</i>(1)</a>, <a href="../man1/eqn.html"><i>eqn</i>(1)</a>, etc., which <i>troff2html</i> does
72 not handle at all; on the other hand, <tt><font size=+1>ms2html</font></tt> understands only
73 <a href="../man6/ms.html"><i>ms</i>(6)</a> documents and is easily confused by complex
74 <tt><font size=+1>troff</font></tt> constructions. <i>Troff2html</i> has the reverse properties: it
75 does not handle the preprocessors but its output is reliable and
76 (modulo helper annotations) is independent of macro package.<br>
78 </table>
79 <p><font size=+1><b>SEE ALSO </b></font><br>
81 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
83 <a href="../man1/troff.html"><i>troff</i>(1)</a>, <a href="../man1/ms2html.html"><i>ms2html</i>(1)</a>, <tt><font size=+1>man2html</font></tt> in <a href="../man8/httpd.html"><i>httpd</i>(8)</a>.<br>
85 </table>
86 <p><font size=+1><b>BUGS </b></font><br>
88 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
90 <tt><font size=+1>Troff</font></tt> and HTML have different models, and they don&#8217;t mesh well
91 in all cases. <tt><font size=+1>Troff</font></tt>&#8217;s indented paragraphs are not well served
92 in HTML, and the output of <i>troff2html</i> shows this.<br>
94 </table>
96 <td width=20>
97 <tr height=20><td>
98 </table>
99 <!-- TRAILER -->
100 <table border=0 cellpadding=0 cellspacing=0 width=100%>
101 <tr height=15><td width=10><td><td width=10>
102 <tr><td><td>
103 <center>
104 <a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
105 </center>
106 </table>
107 <!-- TRAILER -->
108 </body></html>