"What you need to know to write man pages:"
http://www.linux.com/archive/feed/34212To summarize: there are two *roff macro sets that might be used in writing man pages. The traditional macro set is tmac.an, and a newer (BSD unix) set is named tmac.doc. There is also a third set which is used for auto-detecting the correct macro set, called tmac.andoc. (Yes, traditionally "tmac" was a name prefix, not a suffix.)
The strange names are related to the macro set selection option of *roff formatters, which is '-m'. So, when selecting the tmac.an macro set, a command like "nroff -man" would be used, and the macros might also be referred to as "-man macros" or "-mdoc macros".
In Linux, the default manpage formatter macro set is tmac.andoc (or rather, its GNU groff equivalent andoc.tmac). So Linux man pages might use both macro sets, as the default macro set will auto-detect the correct one.
On the other hand, HP-UX uses the traditional tmac.an macro set *only*.
The systems that have the BSD tmac.doc macro set will usually also have the traditional tmac.an macro set for compatibility. But the "traditionalist" systems will usually have the tmac.an macro set only.
So, your problem is probably porting the existing tmac.doc format man page to the universally-understood tmac.an format. I could not find any automated tools for that, but the conversion should not be very difficult to do manually. And once the man page is in traditional tmac.an format, it should be usable in both Linux and HP-UX systems as-is, with no further conversion needed.
In HP-UX, "man 5 man" command can be used to view the documentation for the tmac.an macro set.
MK
MK