Practical Unix Manuals: mdoc
manpages.bsd.lv
manpages.bsd.lv
For example: https://raw.githubusercontent.com/libguestfs/libguestfs/mast... and the output as HTML: http://libguestfs.org/virt-p2v.1.html
(The output in 'man' looks really good too, but I don't have an easy way to demonstrate that.)
Instead of explicit italicization and boldface
to the hard disks: Firstly, the qemu-nbd I<-r> (readonly) option is
I write semantic markup The <arg choice='plain'>--upstart-compatibility</arg> option causes <command>tcp-socket-listen</command> to set the <envar>UPSTART_FDS</envar> environment variable to 3, and the <envar>UPSTART_EVENTS</envar> environment variable to <literal>socket</literal>.
which I find preferable.[1] http://asciidoctor.org/docs/user-manual/#man-pages
[2] https://raw.githubusercontent.com/asciidoctor/asciidoctor/ma...
grotty is capable of ECMA-48:1976 and ISO 8613-6:1994 control sequences, and can actually do proper italicization, boldface, underline, and colour in manual pages; which many terminals nowadays have supported for decades.
* https://jdebp.eu/Softwares/nosh/italics-in-manuals.html
mandoc still only knows the old 1960s TTY-37 control sequences that use overstrike for boldface and underline and that have no notion of italicization or colour.
When FreeBSD switched from groff to mandoc, I went looking for any way to have mandoc support ECMA-48:1976 and ISO 8613-6:1994 control sequences. It turned out to be a large amount of work to bring it up to parity with something that the GNU toolchain has had since the 1990s (and is in fact the GNU toolchain's native mode of operation).
This didn't work for me (Debian unstable), because man called nroff, which doesn't understand the -P option.
So I put
DEFINE troff groff -mandoc -P-i
DEFINE nroff groff -mandoc -P-i
in /etc/manpath.config . This did the trick, but I'm not sure it didn't break something else. -- -P-i
Note the -- option. This causes nroff to just pass the -P-i option straight through to groff. .Sh SYNOPSIS
.Nm
.Op Fl C
.Op Fl o Ar output
.Op Ar prefix
becomes this: SYNOPSIS
hello [-C] [-o output] [prefix]
Semantic formating is nice, but atm I'm not sure there is much value to write the above vs using markdown and just convert it to roff.> Search for manuals in the library section mentioning both the “optind” and the “optarg” variables:
> $ apropos -s 3 Va=optind -a Va=optarg
[1] https://man.openbsd.org/?query=Ev%3DLANG&apropos=1&sec=0&arc...
To be fair, writing the programs or functions that the manual page is purporting to document isn't easy either. I have written manpages (and plenty of code) and in my experience, the hardest part is not the markup but getting the actual content right.
.SectionHeader
.Name
.Optional Flag C
.Optional Flag o Argument output
.Optional Argument prefix
or with some punctuation: .SectionHeader
.Name
.Optional Flag: C
.Optional Flag: o Argument: output
.Optional Argument: prefix
which is quite readable.It does colors, the pic implementation is programmable, it's just better.
So here is a vote against heirloom and for groff. And I get it, the BSD crowd hates GNU and I have my own issues with the GNU folks, but come on, use better when it is better.
See also: USL vs. BSDi: https://en.wikipedia.org/wiki/UNIX_System_Laboratories,_Inc.....
(But I set up a redirect, so now the dotless URL works, too.)