Any recommendations on tools to assist in creating/editing man pages? Ours is due for an update.

#FreeBSD #Linux #documentation

Follow

@BastilleBSD
Ok looking at this

They are also zipped, so it looks like emacs can handle this,

askubuntu.com/questions/788624

@zleap @BastilleBSD a manpage is just troff using a macro for manpages (openbsd uses mandoc which is a reduced troff interpreter only for manpages). troff really isn’t that complicated:

.XY "foo" "bar"on a single line calls macro XY with arguments foo and bar. you can also use 'XY "foo" "bar" instead of a period to call the macro without breaking the line but this shouldn’t be required for man pages. there are some backslash escapes for inline commands like font changes too e.g. foobar lorem ipsum \fBbold font\fRregular font again.

NB: classic troff commands only have two-character names, but modern implementations have extensions for longer names.

the relevant macros for manpages are described in man groff_man

to format the manpage with groff:

nroff -man input.roff > output

should be enough. the output then can go to a pager or whatever.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.