mandoc

mandoc

mandoc (historically called mdocml) is an ISC licensed utility for formatting man pages, specifically those written in the mdoc macro language. Unlike the groff and older troff and nroff tools predominantly used for this purpose, mandoc focusses specifically on manuals and is not suitable for general-purpose type-setting.

Development began in November 2008 specifically to produce CSS-enabled HTML forms of manuals in response to the limitations of groff. mandoc gained initial text-mode output in February 2009.[1] It was then showcased at AsiaBSDCon-2009.[2][3][4] In summer of 2010, mandoc was the subject of a NetBSD-mentored Google Summer of Code project[5] for producing PostScript and PDF output alongside the existing text, HTML, and XHTML outputs. This work was completed in August 2010.[6] mandoc became the default formatter of manuals for OpenBSD 4.8, released in November 2010.[7][8] It is also part of NetBSD and DragonFlyBSD, and a third-party port for FreeBSD. Its advantages were stated as high speed,[9] license, and clean reimplementation.

While mandoc works well with the mdoc manuals used in the BSD Operating Systems, it poorly handles older troff macros such as man, me, and the roff language itself. This makes it a poor fit for GNU/Linux distributions, which primarily use man troff macros and low-level roff for their manual pages.

mandoc has built-in support for the troff soelim preprocessor and partial built-in support for tbl and eqn. It has strong support for wide-character output.

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.

# Pipe output to a pager.
$ mandoc foo.1 | less
# HTML output with a style-sheet.
$ mandoc -Thtml -Ostyle=style.css >foo.1.html

Multibyte (localised) manuals may also be rendered with the included preconv recoding utility. In this example, foo.jp.1 is a Japanese manual encoded in UTF-8. It assumes that the user's terminal has support for locales.

# Pipe wide-character output to a pager.
$ preconv -e utf-8 foo.jp.1 | mandoc -Tlocale | less
# XHTML output with manual links.
$ preconv -e utf-8 foo.jp.1 | mandoc -Txhtml -Oman=%N.%S.xhtml >foo.1.xhtml

References

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Man page — The man page on man Man pages (short for manual pages) are the extensive documentation that comes preinstalled with almost all substantial Unix and Unix like operating systems. The Unix command used to display them is man. Each page is a self… …   Wikipedia

  • Cellule photovoltaïque en polymères — Cellule polymère photovoltaïque Les cellules polymères photovoltaïques désignent une technologie de cellules solaires organiques produisant de l électricité à partir de la lumière à l aide de polymères semiconducteurs. Il s agit d une technologie …   Wikipédia en Français

  • Cellule polymère photovoltaïque — Les cellules photovoltaïques polymères désignent une technique de cellules solaires organiques produisant de l électricité à partir de la lumière à l aide de polymères semiconducteurs. Il s agit d une technique relativement récente étudiée en… …   Wikipédia en Français

  • Cellules photovoltaïques en polymères — Cellule polymère photovoltaïque Les cellules polymères photovoltaïques désignent une technologie de cellules solaires organiques produisant de l électricité à partir de la lumière à l aide de polymères semiconducteurs. Il s agit d une technologie …   Wikipédia en Français

  • Cellules photovoltaïques à polymères — Cellule polymère photovoltaïque Les cellules polymères photovoltaïques désignent une technologie de cellules solaires organiques produisant de l électricité à partir de la lumière à l aide de polymères semiconducteurs. Il s agit d une technologie …   Wikipédia en Français

  • Cellules polymères photovoltaïques — Cellule polymère photovoltaïque Les cellules polymères photovoltaïques désignent une technologie de cellules solaires organiques produisant de l électricité à partir de la lumière à l aide de polymères semiconducteurs. Il s agit d une technologie …   Wikipédia en Français

  • Cellules à polymères photovoltaïques — Cellule polymère photovoltaïque Les cellules polymères photovoltaïques désignent une technologie de cellules solaires organiques produisant de l électricité à partir de la lumière à l aide de polymères semiconducteurs. Il s agit d une technologie …   Wikipédia en Français

  • MDMO-PPV — Général Nom IUPAC poly[2 méthoxy 5 (3,7 diméthyloctyloxy) 1,4 phénylène vinylène] No CAS …   Wikipédia en Français

  • PCNEPV — Général Nom IUPAC poly[oxy 1,4 phénylène(1 cyano 1,2 éthènediyl)[[(3,7 diméthyloctyl)oxy]méthoxy 1,4 phénylène](2 cyano 1,2 éthènediyl) 1,4 phénylène] No CAS …   Wikipédia en Français

  • Células solares de polímeros — Saltar a navegación, búsqueda Las células fotovoltaicas de polímeros, es una tecnología de células solares orgánicas que producen electricidad a partir de la luz con la ayuda de polímeros semiconductores. Se trata de una tecnología relativamente… …   Wikipedia Español

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”