Mandoc

Uses your system voice; voice and rate in settings.

Snapshot

≈ 4 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

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 , mandoc focuses specifically on manuals and is not suitable for general-purpose type-setting. 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. It does not support other macro sets such as mm and ms, or any typesetting features like hyphenation, fonts and alignment. Simple styling such as bold and italics are supported, but italicized text is replaced by underlined text on the terminal. 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.

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 , mandoc focuses specifically on manuals and is not suitable for general-purpose type-setting. 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. It does not support other macro sets such as mm and ms, or any typesetting features like hyphenation, fonts and alignment. Simple styling such as bold and italics are supported, but italicized text is replaced by underlined text on the terminal. 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. ==Sample usage== The following demonstrates running mandoc on its own. Usually, it would be called via the man utility. In this example, foo.1 is the name of an mdoc UNIX manual. $ # Page manual to the terminal. $ mandoc -l foo.1 $ # HTML output with a style-sheet. $ mandoc -Thtml -Ostyle=style.css >foo.1.html Multibyte (localised) manuals may also be rendered without preprocessing. In this example, foo.jp.1 is a Japanese manual encoded in UTF-8. mandoc will automatically detect the encoding. $ # Page wide-character manual to the terminal. $ mandoc -l foo.jp.1 The included apropos implementation can use semantic information in search: $ # Search for all functions starting with 'str' having return type size_t: $ apropos -s 3 Ft=size_t -a Nm~^str ==References== ==External links== mandoc source code repository OpenBSD online manpages, generated by mandoc's man.cgi program Undeadly article on mandoc Google Summer of Code mandoc_ps project site - work on PostScript support Freecode page for mandoc - used until 1.12.2

Text derived from https://en.wikipedia.org/w/index.php?oldid=1360282190 under CC BY-SA 4.0; modifications have been made.