blob: f1bb73c7c82331dbbe4ede0892c0457958ae5281 (
plain)
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
|
.Dd $Mdocdate$
.Dt mht 1
.Os
.
.Sh NAME
.Nm mht
.Nd troff for HTML
.
.Sh SYNOPSIS
.Nm
.Op Ar file
.
.Sh DESCIPTION
.Pp
.Nm
is a utility that generates HTML from
.Xr troff 1
source code.
.Pp
While
.Nm
is named like a troff macro package and uses troff syntax, it is a standalone utility that does not use troff itself.
As such, it supports only a subset of the standard troff requests.
.
.Sh USAGE
.Pp
This section describes the various types of requests supported by
.Nm .
On the left side is the name of the request.
On the right side is the HTML expansion.
.Pp
In the HTML expansion of all element requests, a backslash and a dollar sign followed by a number (e.g. \\$1) signify a parameter expansion.
.Pp
In block element requests, a percent sign (%) signifies the lines following the request until the next block element request.
.Pp
Finally, in contiguous element requests, whatever text is on the outside of the area delimited by braces ({...}) is removed when two of the same contiguous element requests are placed next to one another.
.Ss Standard troff requests
.Bl -tag
.It Sy \&br
<br/>
.El
.Ss Contiguous element requests
.Bl -tag
.It Sy \&Qp
<blockquote>{<p>%</p>}</blockquote>
.El
.Ss Block element requests
.Bl -tag
.It Sy \&Hh
<h\\$1>%</h\\$1>
.It Sy \&Pp
<p>%</p>
.It Sy \&Pr
<pre>%</pre>
.It Sy \&Sh
<h3>%</h3>
.It Sy \&Ti
<title>%</title>
.Ss Inline element requests
.Bl -tag
.It Sy \&Au
<meta name="author" content="\\$1"/>
.It Sy \&Bd
\\$3<b>\\$1</b>\\$2
.It Sy \&Cd
\\$3<code>\\$1</code>\\$2
.It Sy \&Cs
<meta http-equiv="Content-Type" content="text/html; charset=\\$1"/>
.It Sy \&Da
<meta name="created" content="\\$1"/>
.It Sy \&Em
\\$3<em>\\$1</em>\\$2
.It Sy \&Hy
<a href="\\$2">\\$1</a>
.It Sy \&Im
<img src="\\$1" alt="\\$2"/>
.It Sy \&It
\\$3<i>\\$1</i>\\$2
.It Sy \&St
\\$3<strong>\\$1</strong>\\$2
.It Sy \&Tt
\\$3<tt>\\$1</tt>\\$2
.It Sy \&Ul
\\$3<u>\\$1</u>\\$2
.El
.
.Sh AUTHORS
.Pp
.Nm
is written by John Ankarström
.Aq Mt john (at) ankarstrom.se .
|