Mandoc

mandoc
Initial releaseNovember 2008
Stable release
1.14.6 / September 23, 2021; 3 years ago (2021-09-23)[1]
Repository
Written inC
TypeTypesetting
LicenseISC license
Websitemandoc.bsd.lv

mandoc (historically called mdocml) is a utility used for formatting man pages in BSD Operating Systems (e.g. NetBSD), specifically those written in the mdoc and man macro languages. Unlike the groff and older troff and nroff tools that are predominantly used for this purpose by tools such as man, mandoc focuses specifically on manuals and is not suitable for general-purpose type-setting.

mandoc is mainly used to format the mdoc manuals used in the BSD Operating Systems, but it also implements most of the man macros used in Linux distributions, as well as a subset of roff commands occasionally intermixed with the man macros.[2][1]: 1.14.5  It does not support other macro sets such as mm and ms, or any typesetting features like hyphenation, fonts and alignment.[2]: compatibility  Simple styling such as bold and italics are supported, but italicized text is replaced by underlined text on the terminal.[3][4]

mandoc has built-in support for the troff soelim (inclusion) preprocessor and partial built-in support for tbl and eqn. It has strong support for UTF-8 output. It can also use the semantic information in mdoc manuals to implement semantic search, which before version 1.4.1, relied on sqlite.[1]: 1.4.1 

  1. ^ a b c "Release notes". September 23, 2021.
  2. ^ a b roff(7) – OpenBSD Miscellaneous Information Manual
  3. ^ "Italics and colour in manual pages on a nosh user-space virtual terminal". jdebp.eu.
  4. ^ mandoc(1) – FreeBSD General Commands Manual. "Font styles are applied by using back-spaced encoding..."