Subject: Re: how to write man pages
To: James K. Lowden <jklowden@schemamania.org>
From: Samantha Samuel <ssamuel@taz.cs.wcupa.edu>
List: netbsd-help
Date: 02/12/2002 12:50:51
I just started using netbsd, and this template below has been implemented
on linux so far. Hope you find it useful.

#Beginning of man page template
# Comment

=head1  NAME

Your proggy name

=head1  SYNOPSIS

Explain how you use it on the cli here

=head1  DESCRIPTION

Describe what your program does here. If you do "B<something> blah"
"something" will be bolded and blah will be in reg font.

To go to a next para, hit enter twice

=head1 OPTIONS

If there are options in your proggy list them here.

=head1 NOTES
Tell your users something you feel they ought to know.

=head1 BUGS

You get the idea, if you want to create a new head have it follow the
key word: =head1

=head1 AUTHOR

Your name and email addy, for users to get in touch with you

Once you have written this and saved it as:name_of_manpage.pod
You make sure pod2man, perl is installed and then do:

pod2man $(MAIN).pod > $(MAIN).tmp
sed 's/perl v5.6.1/del da deleting machine/g' $(MAIN).tmp > $(MAIN).1
rm -f  $(MAIN).tmp
cp -vf $(MAIN).1 debian/manpage.1.ex (I use debian of course, you put in
whatever is relevant to you)

As root do this:
cp $(MAIN).1 /usr/man/man1/

Hope this was of help.
-- 
Samantha
-------
Real programmers do not comment their code. If it was hard to write, it
should be hard to understand.


On Tue, 12 Feb 2002, James K. Lowden wrote:

> Hi all,
>
> Every time I think about writing man pages, I look at mdoc.samples
> and think, that looks *hard*.  Isn't there an easier way?  No smgl and
> dsssl or xslt for man pages?
>
> I know, if it's hard to read it should be hard to write.
>
> If mdoc is the way, could someone tell me how widely it's used?  I'm
> part of a project that could use a lot of man pages, and I'd expect
> the sources would wind up getting built on non-NetBSD systems.
>
> Thanks for any guidance.
>
> --jkl
>