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