Writing Man Pages
On 4.4BSD and its descendants, including FreeBSD, NetBSD, OpenBSD, DragonFly BSD, and OS X, and in GNU/Linux systems, two groff macro packages are available for use in writing manual pages, man and mdoc. The man macro package is older and is the traditional macro package used to write manual pages on UNIX systems, whereas the mdoc package is newer and offers more support for semantic structuring of documents. The commands man groff_man
and man groff_mdoc
may be used in 4.4BSD-descended systems, and in GNU/Linux, to bring up the online documentation (man pages) for using the man and mdoc macro packages, respectively.
In addition, one can simply inspect the source code for man pages installed on the system to see how they are written, typically found in /usr/share/man
and other directories on 4.4BSD-descended systems and GNU/Linux systems. (To find the location of the manual page source file for command command
, type man -w command
.)
Man pages can also be written in DocBook or LinuxDoc format, then converted to groff.
Read more about this topic: Man Page
Famous quotes containing the words writing, man and/or pages:
“I am writing for myself and strangers. This is the only
way that I can do it. Everybody is a real one to me,
everybody is like some one else too to me. No one of
them that I know can want to know it and so I write
for myself and strangers.”
—Gertrude Stein (18741946)
“A man ceases to be a beginner in any given science and becomes a master in that science when he has learned that ... he is going to be a beginner all his life.”
—R.G. (Robin George)
“Mathematics may be compared to a mill of exquisite workmanship, which grinds your stuff of any degree of fineness; but nevertheless, what you get out depends upon what you put in; and as the grandest mill in the world will not extract wheat- flour from peascods, so pages of formulae will not get a definite result out of loose data.”
—Thomas Henry Huxley (182595)