*BSD News Article 62869


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!newshost.telstra.net!act.news.telstra.net!psgrain!reuter.cse.ogi.edu!news.ssd.intel.com!chnews!itnews.sc.intel.com!news.sprintlink.net!news.chattanooga.net!tarush!tom
From: tom@tarush.chattanooga.net (Tom Rush)
Subject: Re: [Q] How to create MAN pages?
X-Newsreader: TIN [version 1.2 PL2]
Organization: Rush Co.
Message-ID: <DntqrJ.AFt@tarush.chattanooga.net>
References: <4h511u$528@news.neocom.ca>
Date: Wed, 6 Mar 1996 02:26:07 GMT
Lines: 62

Harold Smorodin (harold@neocom.ca) wrote:
: All,

: Could someone describe the step by step process of creating a man page
: and / or point me to some documentation?

: I am running FBSD 2.1R and have not been able to find any details on
: the topic of creating man pages in any of the documentation. 

See the manpages for mdoc and mdoc.samples.

: I also have the following questions:

: 1.  What directory should the source text for man pages be placed in
: the FreeBSD system?  Is there a convention for this?

/usr/{share,local,X11R6}/man/man[1-8];  Sections 1-8 are for:
1. user commands 2. system calls 3. library functions 4. device drivers
5. file formats 6. games 7. misc 8. system maint.

: 2.  Is there a template or program that I should use to create the
: source text?  I am thinking in terms of I enter the text and the
: program or template supplies the formatting codes.

A very basic one is in /usr/share/misc/mdoc.template.

: 3.  If I must use a text editor such as vi to manually embed
: formatting codes into the source text, where do I find a list of these
: codes and their meanings?

See manpages mentioned earlier.

: 4.  Is the man program a formatter/viewer, or just a viewer?  If the
: latter, what formatting program do I use to produce the formatted man
: page?

It is both, but also see 'man catman' to format mass quantities of
man pages.

: 5.  What directory should the formatted man page be placed in?  Is
: there a convention for this?

You should create directories /usr/{share,local,X11R6}/man/cat[1-8]
for the formatted pages.  (Owner man, group bin, mode 755.)

: 6.  Can the man page text be stored in compressed format?  If yes,
: which compression program do I use?  Does the man program decompress
: it automatically upon access?

Yes, gzip, yes.  BSD make, when used with the system 'include' files
(e.g. /usr/share/mk/bsd.prog.mk), handles compression and installation
quite nicely when you do a 'make install' for your application.

: I would greatly appreciate any clues to get me started.

: --
: Harold


--
Tom Rush
tom@tarush.chattanooga.net