diff options
author | John Ankarström <john@ankarstrom.se> | 2020-12-11 00:24:14 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-12-11 00:24:14 +0100 |
commit | 869295358540c06765b31f853e55b6d6d2e5a99e (patch) | |
tree | 83660f7fdd616f56021a168c9d9f20de34455e25 /mht.1 | |
parent | 7e93c530bde69b4eb971dc400063d2e96a88306e (diff) | |
download | mht-869295358540c06765b31f853e55b6d6d2e5a99e.tar.gz |
mht, mht.1: Remove strict arities
Now, superfluous or missing arguments will be silently ignored.
Furthermore, only one definition of the same request is allowed.
But on the upside, the system is a whole lot simpler and can be made
even more flexible in the future than before.
Diffstat (limited to 'mht.1')
-rw-r--r-- | mht.1 | 74 |
1 files changed, 23 insertions, 51 deletions
@@ -26,8 +26,8 @@ As such, it supports only a subset of the standard troff requests. .Pp This section describes the various types of requests supported by .Nm . -On the left side are the name and arity of each request, separated by a slash. -On the right side is the HTML expansion of each request. +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 @@ -36,79 +36,51 @@ In block element requests, a percent sign (%) signifies the lines following the 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/0 +.It Sy \&br <br/> .El .Ss Contiguous element requests .Bl -tag -.It Sy \&Qp/0 +.It Sy \&Qp <blockquote>{<p>%</p>}</blockquote> .El .Ss Block element requests .Bl -tag -.It Sy \&Pp/0 +.It Sy \&Hh +<h\\$1>%</h\\$1> +.It Sy \&Pp <p>%</p> -.It Sy \&Pr/0 +.It Sy \&Pr <pre>%</pre> -.It Sy \&Sh/0 +.It Sy \&Sh <h3>%</h3> -.It Sy \&Sh/1 -<h\\$1>%</h\\$1> -.It Sy \&Ti/0 +.It Sy \&Ti <title>%</title> .Ss Inline element requests .Bl -tag -.It Sy \&Au/1 +.It Sy \&Au <meta name="author" content="\\$1"/> -.It Sy \&Bd/1 -<b>\\$1</b> -.It Sy \&Bd/2 -<b>\\$1</b>\\$2 -.It Sy \&Bd/3 +.It Sy \&Bd \\$3<b>\\$1</b>\\$2 -.It Sy \&br/0 -<br/> -.It Sy \&Cd/1 -<code>\\$1</code> -.It Sy \&Cd/2 -<code>\\$1</code>\\$2 -.It Sy \&Cd/3 +.It Sy \&Cd \\$3<code>\\$1</code>\\$2 -.It Sy \&Cs/1 +.It Sy \&Cs <meta http-equiv="Content-Type" content="text/html; charset=\\$1"/> -.It Sy \&Em/1 -<em>\\$1</em> -.It Sy \&Em/2 -<em>\\$1</em>\\$2 -.It Sy \&Em/3 +.It Sy \&Da +<meta name="created" content="\\$1"/> +.It Sy \&Em \\$3<em>\\$1</em>\\$2 -.It Sy \&Hy/2 +.It Sy \&Hy <a href="\\$2">\\$1</a> -.It Sy \&Im/2 +.It Sy \&Im <img src="\\$1" alt="\\$2"/> -.It Sy \&It/1 -<i>\\$1</i> -.It Sy \&It/2 -<i>\\$1</i>\\$2 -.It Sy \&It/3 +.It Sy \&It \\$3<i>\\$1</i>\\$2 -.It Sy \&St/1 -<strong>\\$1</strong> -.It Sy \&St/2 -<strong>\\$1</strong>\\$2 -.It Sy \&St/3 +.It Sy \&St \\$3<strong>\\$1</strong>\\$2 -.It Sy \&Tt/1 -<tt>\\$1</tt> -.It Sy \&Tt/2 -<tt>\\$1</tt>\\$2 -.It Sy \&Tt/3 +.It Sy \&Tt \\$3<tt>\\$1</tt>\\$2 -.It Sy \&Ul/1 -<u>\\$1</u> -.It Sy \&Ul/2 -<u>\\$1</u>\\$2 -.It Sy \&Ul/3 +.It Sy \&Ul \\$3<u>\\$1</u>\\$2 .El . |