209 lines
6.0 KiB
HTML
209 lines
6.0 KiB
HTML
<html>
|
|
<head>
|
|
<!-- This file has been generated by unroff 1.0, 03/21/96 19:29:25. -->
|
|
<!-- Do not edit! -->
|
|
<link rev="made" href="mailto:net@informatik.uni-bremen.de">
|
|
<!-- $Revision: 1.6 $ -->
|
|
<title>Manual page for unroff-html-man(1)</title>
|
|
</head>
|
|
<body>
|
|
<h2>
|
|
unroff-html-man - back-end to translate manual pages to HTML 2.0
|
|
<hr></h2>
|
|
<h2>SYNOPSIS</h2>
|
|
<b>unroff
|
|
</b>[
|
|
<b>-fhtml
|
|
</b>] [
|
|
<b>-man
|
|
</b>] [
|
|
<i>file</i> | <i>option...
|
|
</i>]
|
|
<h2>OVERVIEW</h2>
|
|
When called with the
|
|
<b>-fhtml
|
|
</b>and
|
|
<b>-man
|
|
</b>options, the troff translator
|
|
<i>unroff
|
|
</i>loads the back-end for converting UNIX manual pages to the Hypertext
|
|
Markup Language (HTML) version 2.0.<tt> </tt>
|
|
<p>
|
|
Please read
|
|
<b>unroff</b>(1)
|
|
first for an overview of the Scheme-based, programmable troff translator
|
|
and for a description of the generic options that exist in
|
|
addition to
|
|
<b>-f
|
|
</b>and
|
|
<b>-m</b>.<tt> </tt>
|
|
The translation of basic troff requests, special characters,
|
|
escape sequences, etc. as well as the HTML-specific options
|
|
are described in
|
|
<b>unroff-html</b>(1).<tt> </tt>
|
|
For information about extending and programming
|
|
<i>unroff
|
|
</i>also refer to the
|
|
<i>Unroff Programmer's Manual</i>.<tt> </tt>
|
|
<h2>OPTIONS</h2>
|
|
The
|
|
<b>-man
|
|
</b>extension provides one new keyword/value option in addition to
|
|
those listed in
|
|
<b>unroff</b>(1)
|
|
and
|
|
<b>unroff-html</b>(1):
|
|
<dl>
|
|
<dt><b>do-signature</b> (boolean)
|
|
<dd>
|
|
If set to 1, a signature is appended to each output file.<tt> </tt>
|
|
The signature is composed of a horizontal rule and a one-line
|
|
message consisting of version information and date and time.<tt> </tt>
|
|
The default value of this option is 1.<tt> </tt>
|
|
</dl>
|
|
<h2>DESCRIPTION</h2>
|
|
<i>unroff
|
|
</i>reads and parses its input files (each containing a UNIX manual
|
|
page); the HTML output is written to a separate output file
|
|
for each input file.<tt> </tt>
|
|
The name of an output file is obtained by appending the
|
|
suffix ``.html'' to the name of the corresponding input
|
|
file.<tt> </tt>
|
|
Any
|
|
<b>document
|
|
</b>option is ignored if input files are named in the command line.<tt> </tt>
|
|
As usual, the special file name
|
|
`<b>-</b>'
|
|
can be used to interpolate standard input.<tt> </tt>
|
|
<p>
|
|
If no file name is given in the command line, a manual page
|
|
is read from standard input and sent to standard output,
|
|
unless the
|
|
<b>document
|
|
</b>option is given, in which case the HTML output is written
|
|
to the specified file (with ``.html'' appended).<tt> </tt>
|
|
Example:
|
|
this call to
|
|
<i>unroff
|
|
</i>translates two manual pages and creates two corresponding output files,
|
|
<b>cc.1.html
|
|
</b>and
|
|
<b>send.2.html</b>:
|
|
<dl><dt><dd>
|
|
<pre>
|
|
unroff -fhtml -man /usr/man/man1/cc.1 /usr/man/man2/send.2
|
|
</pre>
|
|
</dl>
|
|
<p>
|
|
The following
|
|
<b>-man
|
|
</b>macros are recognized and translated (in addition to any user-defined macros):
|
|
<p>
|
|
<pre>
|
|
.TH .SH .SS .I .B .SB .SM
|
|
.BI .BR .IB .IR .RB .RI .TP
|
|
.IP .HP .RS .RE .LP .PP .P
|
|
</pre>
|
|
<p>
|
|
In addition, the following Sun-specific macros are silently
|
|
ignored (.TX generates an informational message containing
|
|
its argument):
|
|
<p>
|
|
<pre>
|
|
.TX .IX .DT .PD .UC
|
|
</pre>
|
|
<p>
|
|
The following predefined troff strings are recognized
|
|
(\*S expands to the empty string):
|
|
<p>
|
|
<pre>
|
|
\*R \*S \*(lq \*(rq
|
|
</pre>
|
|
<p>
|
|
The title of each HTML document generated is obtained by calling
|
|
the primitive
|
|
<i>substitute
|
|
</i>(as explained in the Programmer's Manual) with the value of the option
|
|
<b>title
|
|
</b>and the first and second arguments passed to the initial call to
|
|
<b>.TH</b>.<tt> </tt>
|
|
Thus, the specifiers ``%1%'' and ``%2%'' can be used
|
|
in the option to interpolate the command (or whatever is documented
|
|
in the manual page) and the section number.<tt> </tt>
|
|
If
|
|
<b>title
|
|
</b>has not been specified, the string ``Manual page for %1%(%2%)''
|
|
is taken.<tt> </tt>
|
|
As generating the HTML title element is deferred until the call to
|
|
<b>.TH</b>,
|
|
any macros or other troff requests that produce output must not be
|
|
used before the initial
|
|
<b>.TH</b>.<tt> </tt>
|
|
<p>
|
|
HTML header elements <h2> and <h3> are created for
|
|
<b>.SH
|
|
</b>and
|
|
<b>.SS
|
|
</b>requests.<tt> </tt>
|
|
The markup created for the initial NAME section differs in that the
|
|
contents of the section (usually a single line) is itself placed
|
|
inside a header element.<tt> </tt>
|
|
<p>
|
|
The font switching macros are based on changes to the fonts `R',
|
|
`I', and `B', as explained under FONTS in
|
|
<b>unroff-html</b>(1).<tt> </tt>
|
|
Of course, this fails if the fonts (which are mounted on startup)
|
|
are unmounted by explicit
|
|
<b>.fp
|
|
</b>requests.<tt> </tt>
|
|
As HTML is lacking the concept of text size, the macro
|
|
<b>.SB
|
|
</b>is just an alias for
|
|
<b>.B</b>,
|
|
and
|
|
<b>.SM
|
|
</b>simply echoes its arguments.<tt> </tt>
|
|
<p>
|
|
The translation rules for
|
|
<b>.TP
|
|
</b>and
|
|
<b>.IP
|
|
</b>employ a heuristic to determine whether to generate a definition
|
|
list or an unordered list:
|
|
if the first in a sequence of tagged/indented paragraph macros is
|
|
called with a tag consisting of the special character \(bu, a
|
|
definition list is begun, otherwise an unordered list.<tt> </tt>
|
|
Subsequent invocations cause the list style to change if appropriate.<tt> </tt>
|
|
Use of tagged paragraphs inside non-filled (pre-formatted) text
|
|
violates the HTML definition and should be avoided.<tt> </tt>
|
|
A warning message is printed in this and other questionable situations.<tt> </tt>
|
|
<p>
|
|
As hanging tags cannot be realized with HTML 2.0,
|
|
a kludge is used for the
|
|
<b>.HP
|
|
</b>(hanging paragraph) macro:
|
|
the macro starts a definition list (as does the ordinary
|
|
<b>.TP
|
|
</b>macro), and everything up to the next request that causes a break
|
|
is placed inside the definition tag.<tt> </tt>
|
|
This method obviously fails if no break occurs in subsequent lines,
|
|
but it works for the common, idiomatic use of hanging paragraphs
|
|
in manual pages.<tt> </tt>
|
|
<h2>SEE ALSO</h2>
|
|
<b>unroff</b>(1),
|
|
<b>unroff-html</b>(1),
|
|
<b>troff</b>(1),
|
|
<b>man</b>(5 or 7).<tt> </tt>
|
|
<p>
|
|
Unroff Programmer's Manual.<tt> </tt>
|
|
<p>
|
|
http://www.informatik.uni-bremen.de/~net/unroff
|
|
<p>
|
|
Berners-Lee, Connolly, et al.,
|
|
HyperText Markup Language Specification--2.0,
|
|
Internet Draft, Internet Engineering Task Force.<tt> </tt>
|
|
<p><hr>
|
|
Markup created by <em>unroff</em> 1.0, <tt> </tt> <tt> </tt>March 21, 1996.
|
|
</body>
|
|
</html>
|