aboutsummaryrefslogtreecommitdiff
mht(1) General Commands Manual mht(1)

mht
troff for HTML

mht [file]

mht is a utility that generates HTML from troff(1) source code.

While mht 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.

This section describes the various types of requests supported by mht. On the left side is the name of the request. On the right side is the HTML expansion.

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.

In block element requests, a percent sign (%) signifies the lines following the request until the next block element request.

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.

br
<br/>

Qp
<blockquote>{<p>%</p>}</blockquote>

Hh
<h\$1>%</h\$1>
Pp
<p>%</p>
Pr
<pre>%</pre>
Sh
<h3>%</h3>
Ti
<title>%</title>

Au
<meta name="author" content="\$1"/>
Bd
\$3<b>\$1</b>\$2
Cd
\$3<code>\$1</code>\$2
Cs
<meta http-equiv="Content-Type" content="text/html; charset=\$1"/>
Da
<meta name="created" content="\$1"/>
Em
\$3<em>\$1</em>\$2
Hy
<a href="\$2">\$1</a>
Im
<img src="\$1" alt="\$2"/>
It
\$3<i>\$1</i>\$2
St
\$3<strong>\$1</strong>\$2
Tt
\$3<tt>\$1</tt>\$2
Ul
\$3<u>\$1</u>\$2

mht is written by John Ankarström <john (at) ankarstrom.se>.
December 11, 2020 Linux 5.4.72-0-lts