The most important part of the mdoc tools is the formatter, which compiles an mdoc document into an output format.


catconcatenate and print files


cat [-benstuv] [file ...]


The cat utility reads files sequentially, writing them to the standard output. The file operands are processed in command-line order. If file is a single dash (‘​-') or absent, cat reads from the standard input.

All formatters must adhere to the general conventions set forth in the Version 1 AT&T UNIX Programmer's Manual, which details the terms that are in bold and those that are italicised (rendered with underlines in terminals).

Most formatters also support printer-friendly output, usually to PS or PDF. Some also include HTML or XHTML for web publication.

In this book, I'll focus only on contemporary formatters. Originally, mdoc, as a macro set for the roff language, was exclusively formatted by the troff and nroff utilities as distributed with BSD UNIX. Historically, troff was tailored for printers and graphical output, while nroff focussed on terminal output.

Most modern utilities, however, encompass both of these capabilities.

Last edited by $Author: kristaps $ on $Date: 2011/11/04 01:06:28 $. Copyright © 2011, Kristaps Dzonsons. CC BY-SA.