*BSD News Article 63372


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.uoknor.edu!news.nodak.edu!netnews1.nwnet.net!news.u.washington.edu!root
From: kargl@troutmask.apl.washington.edu
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: [Q] How to create MAN pages?
Date: 1 Mar 1996 00:47:24 GMT
Organization: Applied Phyics Lab
Lines: 73
Message-ID: <4h5hes$pa1@nntp5.u.washington.edu>
References: <4h511u$528@news.neocom.ca>
NNTP-Posting-Host: troutmask.apl.washington.edu

     Harold Smorodin wrote in article <4h511u$528@news.neocom.ca> :
>
>Could someone describe the step by step process of creating a man page
>and / or point me to some documentation?

man 7 mdoc
man 7 mdoc.samples

>
>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. 
>
>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?

In your .cshrc file (if you use tcsh, csh, ...) put the following line

setenv MANPATH /usr/local/man:/usr/X11R6/man:/usr/share/man:$HOME/man

Everutime you start an interactive csh the MANPATH get set to

MANPATH=/usr/local/man:/usr/X11R6/man:/usr/share/man:/users/kargl/man

Now,

/usr/local/man   <--- man pages from locally install packages
/usr/X11R6/man   <--- X-window system man pages
/usr/share/man   <--- man pages for FreeBSD
/users/kargl/man <--- personal man pages


Every time you execute ``man'' the search path is MANPATH.

>
>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.

Use any available man page that in near the format you want.

>
>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?

man mdoc

>
>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?
>
>5.  What directory should the formatted man page be placed in?  Is
>there a convention for this?

man will place (compressed) formatted man pages in subdirectories
man/cat# where # is the section number for the man page.

>
>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

Steven G. Kargl     | Phone: 206-685-4677 |
Applied Physics Lab | Fax:   206-543-6785 |
Univ. of Washington |---------------------|
1013 NE 40th St     | FreeBSD 2.x-STABLE  |
Seattle, WA 98105   |---------------------|