Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Nov 1997 22:54:06 -0800 (PST)
From:      Brion Moss <brion@queeg.com>
To:        David Petrou <dpetrou@kinclaith.pdl.cs.cmu.edu>
Cc:        freebsd-doc@freebsd.org, freebsd-questions@freebsd.org
Subject:   Re:[Q] Making man pages...
Message-ID:  <199711220654.WAA12553@coven.queeg.com>
In-Reply-To: <199711220417.UAA10771@hub.freebsd.org>
References:  <199711220417.UAA10771@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi, David!  Long time no see...

There are two macro sets that people use to write man pages.  4.4BSD
and derivatives use the "doc" macro set.  The rest of the world uses
the "man" macro set.  When you read a man page under FreeBSD, it gets
processed by the "mandoc" macro package, which basically looks at the
file and passes it on to either "man" or "doc", depending on what kind
of file it looks like.

I'd suggest using the "man" macro set, because its more portable, but
I'm sure there are good reasons to prefer "doc".

In any case...you can get a description of the two macro languages by
reading the man pages for man(7) and mdoc(7).  There's a pretty good
(but brief) tutorial on writing man pages in the standard man format
at http://elc2.igpm.rwth-aachen.de/~albrecht/manpage.html.  There's
also a manpage-howto somewhere in the Linux documentation.  I
generally take an existing man page as a template and modify it; the
language is pretty simple and I usually only use a small subset of
it. 

	-Brion

David Petrou writes:
> I've recently written some software for FreeBSD and I would like to
> write some man pages for them.  How do people make manpages today?  Do
> they write in troff directly?  I know nothing of troff.  Are
> there tools that perhaps convert a subset of TeX to troff?
> 
> Do people generally take existing man pages and modify them to create
> new ones, or is there a blank template for new man pages?
> 
> I've checked the FAQ and Handbook and came up empty on this topic.
> 
> Thanks,
> David
> 
> P.S.: Please reply to dpetrou@cs.cmu.edu besides the list, as I'm not
> subscribed to these lists.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711220654.WAA12553>