1 .\" $Id: mandoc.1,v 1.25 2009/07/14 15:57:43 kristaps Exp $
3 .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .Dd $Mdocdate: July 14 2009 $
23 .Nd format and display UNIX manuals
28 .Op Fl f Ns Ar option...
39 manual pages for display. The arguments are as follows:
42 .It Fl f Ns Ar option...
43 Override default compiler behaviour. See
50 for available formats. Defaults to
56 for available formats. Defaults to
60 Print version and exit.
63 Configure warning messages. Use
67 for warnings to be considered errors and cause utility
70 arguments may be comma-separated, such as
71 .Fl W Ns Ar error,all .
74 Read input from zero or more
76 If unspecified, reads from stdin. If multiple files are specified,
78 will halt with the first failed parse.
88 text from stdin, implying
90 and prints 78-column backspace-encoded output to stdout as if
97 .Ss Punctuation and Spacing
98 If punctuation is set apart from words, such as in the phrase
99 .Dq to be \&, or not to be ,
102 according to the following rules: opening punctuation
109 is not followed by a space; closing punctuation
122 is not preceded by whitespace.
126 these rules are also applied to macro arguments when appropriate.
128 White-space, in non-literal (normal) mode, is stripped from input and
129 replaced on output by a single space. Thus, if you wish to preserve
130 multiple spaces, they must be space-escaped
132 or used in a literal display mode, e.g.,
154 should only be used for legacy manuals.
158 which is also the default, determines encoding on-the-fly: if the first
165 parser is used; otherwise, the
170 files are specified with
172 each has its file-type determined this way. If multiple files are
177 is specified, then this format is used exclusively.
179 .\" The following escape sequences are recognised, although the per-format
180 .\" compiler may not allow certain sequences.
181 .\" .Bl -tag -width Ds -offset XXXX
183 .\" sets the font mode to X (B, I, R or P, where P resets the font)
184 .\" .It \eX, \e(XX, \e[XN]
185 .\" queries the special-character table for a corresponding symbol
186 .\" .It \e*X, \e*(XX, \e*[XN]
187 .\" deprecated special-character format
193 utility accepts the following
198 Produce 7-bit ASCII output, backspace-encoded for bold and underline
199 styles. This is the default.
201 Produce an indented parse tree.
203 Parse only: produce no output.
206 If multiple input files are specified, these will be processed by the
207 corresponding filter in-order.
210 Default compiler behaviour may be overriden with the
214 .It Fl f Ns Ar ign-scope
215 When rewinding the scope of a block macro, forces the compiler to ignore
216 scope violations. This can seriously mangle the resulting tree.
218 .It Fl f Ns Ar no-ign-escape
219 Don't ignore invalid escape sequences.
220 .It Fl f Ns Ar no-ign-macro
221 Do not ignore unknown macros at the start of input lines.
222 .It Fl f Ns Ar no-ign-chars
223 Do not ignore disallowed characters.
224 .It Fl f Ns Ar strict
226 .Fl f Ns Ar no-ign-escape ,
227 .Fl f Ns Ar no-ign-macro
229 .Fl f Ns Ar no-ign-chars .
237 options may be grouped and delimited with a comma. Using
238 .Fl f Ns Ar ign-scope,no-ign-escape ,
239 for example, will try to ignore scope and not ignore character-escape
243 To page manuals to the terminal:
246 .D1 % mandoc \-Wall,error \-fstrict mandoc.1 2>&1 | less
247 .D1 % mandoc mandoc.1 mdoc.3 mdoc.7 | less
250 This section summarises
257 A list or display following
259 does not assert a prior vertical break, just as it doesn't with
262 The \-literal and \-unfilled
264 displays types are synonyms, as are \-filled and \-ragged.
266 Words aren't hyphenated.
268 In normal mode (not a literal block), blocks of spaces aren't preserved,
269 so double spaces following sentence closure are reduced to a single space
270 .Pq Dq French spacing .
281 utility was written by
282 .An Kristaps Dzonsons Aq kristaps@kth.se .