@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.
@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_manto format the manpage with groff:
nroff -man input.roff > outputshould be enough. the output then can go to a pager or whatever.