Re: man pages: howto create a man page ?

Guest section DW (dwguest@win.tue.nl)
Fri, 14 Sep 2001 19:36:28 +0200


On Fri, Sep 14, 2001 at 04:10:04PM +0200, Lukas Ruf wrote:

> can anyone give me a hint what the easiest way could be to create a man
> page out of some text? Is there a latex to man page converter around?
> Is it required that I must learn SGML?

Old-fashioned man pages are written in *roff.
For example,

.TH example 0 2001-09-14 "" ""
.SH NAME
example \- how to write a man page
.SH SYNOPSIS
how to invoke
.SH DESCRIPTION
what it does
.SH "RETURN VALUE"
what it returns
.SH "CONFORMING TO"
standards
.SH NOTES
interesting tidbits
.SH "SEE ALSO"
related stuff

In man(7) you can read about the macros used.
The easiest way to start is to copy some other man page.

These days it is frowned upon if you really use detailed knowledge
of *roff. Man pages are produced by conversion from other formats,
and conversely other formats are produced by conversion from *roff
(e.g., by man2html). Knowing more about *roff than what is documented
in man(7) may be bad for you - these automatic converters have only
a limited knowledge.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/