3 ms·
Using mandoc instead of groff is a bit of a step backwards, note. grotty is capable of ECMA-48:1976 and ISO 8613-6:1994 control sequences, and can actually do
by JdeBP 9y ago
Using mandoc instead of groff is a bit of a step backwards, note.
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 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).
- jwilk 9y ago> one has to employ the MANROFFOPT environment variable, setting it to "-P-i". 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.
- JdeBP 9y agoAha! A typing error. One should set it to -- -P-i Note the -- option. This causes nroff to just pass the -P-i option straight through to groff.