Should I use mdoc for user programs?

Yuri Pankov yuripv at gmx.com
Thu Oct 12 13:23:49 UTC 2017


On Thu, 12 Oct 2017 11:02:49 +0200, Sijmen J. Mulder wrote:
> Hi,

Yes, you should.

> Is it considered bad form to use mdoc, rather than some other man
> format, for documenting non-system programs?

No.

> I noticed that the required .Os macro (man 7 mdoc) outputs "FreeBSD
> General Commands Manual" which does not seem appropriate.

It's not about the .Os macro, rather it's man-section-to-name mapping 
done by the formatter used, i.e. when using mandoc(1), on FreeBSD 
section 1 man pages would say "FreeBSD General Commands Manual", on 
illumos exactly the *same* man page would say just "User Commands" (for 
mandoc this can be customized editing one of the source files currently).

.Os macro defines the OS name shown in the footer, and (yet again) for 
mandoc default value can be set while compiling.


More information about the freebsd-questions mailing list