1 .\" $Id: mandoc.1,v 1.14 2009/04/12 19:19:57 kristaps Exp $
3 .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@openbsd.org>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the
7 .\" above copyright notice and this permission notice appear in all
10 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11 .\" WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13 .\" AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14 .\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15 .\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16 .\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 .\" PERFORMANCE OF THIS SOFTWARE.
19 .Dd $Mdocdate: April 12 2009 $
25 .Nd format and display UNIX manuals
30 .Op Fl f Ns Ar option...
41 manual pages for display. The arguments are as follows:
42 .Bl -tag -width XXXXXXXXXXXX
44 .It Fl f Ns Ar option...
45 Override default compiler behaviour. See
52 for available formats. Defaults to
58 for available formats. Defaults to
62 Print version and exit.
65 Print warning messages. May be set to
69 for groff/troff-compatibility warnings, or
71 for syntax warnings. If
73 is specified, warnings are considered errors and cause utility
76 arguments may be comma-separated, such as
77 .Fl W Ns Ar error,all .
80 Read input from zero or more
82 If unspecified, reads from stdin. If multiple files are specified,
84 will halt with the first failed parse.
94 text from stdin, implying
96 and prints 78-column backspace-encoded output to stdout as if
104 If punctuation is set apart from words, such as in the phrase
105 .Dq to be \&, or not to be ,
108 according to the following rules. Opening punctuation
115 is not followed by a space. Closing punctuation
128 is not preceeded by whitespace.
132 these rules are also applied to macro arguments when appropriate.
151 should only be used for legacy manuals.
155 which is also the default, determines encoding on-the-fly: if the first
162 parser is used; otherwise, the
167 files are specified with
169 each has its file-type determined this way. If multiple files are
174 is specified, then this format is used exclusively.
176 .\" The following escape sequences are recognised, although the per-format
177 .\" compiler may not allow certain sequences.
178 .\" .Bl -tag -width Ds -offset XXXX
180 .\" sets the font mode to X (B, I, R or P, where P resets the font)
181 .\" .It \eX, \e(XX, \e[XN]
182 .\" queries the special-character table for a corresponding symbol
183 .\" .It \e*X, \e*(XX, \e*[XN]
184 .\" deprecated special-character format
190 utility accepts the following
193 .Bl -tag -width XXXXXXXXXXXX
195 Produce 7-bit ASCII output, backspace-encoded for bold and underline
196 styles. This is the default.
198 Produce an indented parse tree.
200 Parse only: produce no output.
203 If multiple input files are specified, these will be processed by the
204 corresponding filter in-order.
207 Default compiler behaviour may be overriden with the
210 .Bl -tag -width XXXXXXXXXXXXXX
211 .It Fl f Ns Ar ign-scope
212 When rewinding the scope of a block macro, forces the compiler to ignore
213 scope violations. This can seriously mangle the resulting tree.
215 .It Fl f Ns Ar ign-escape
216 Ignore invalid escape sequences.
217 .It Fl f Ns Ar ign-macro
218 Ignore unknown macros at the start of input lines (default for
221 .It Fl f Ns Ar no-ign-macro
222 Do not ignore unknown macros at the start of input lines (default for
232 options may be grouped and delimited with a comma. Using
233 .Fl f Ns Ar ign-scope,ign-escape ,
234 for example, will try to ignore scope and character-escape errors.
237 To page manuals to the terminal:
240 .D1 % mandoc \-Wall,error mandoc.1 2>&1 | less
242 .D1 % mandoc mandoc.1 mdoc.3 mdoc.7 | less
252 utility was written by
253 .An Kristaps Dzonsons Aq kristaps@openbsd.org .
260 mode doesn't yet know how to display the following:
266 list is not yet supported.
269 Other macros still aren't supported by virtue of nobody complaining
270 about their absence. Please report any omissions: this is a work in
273 The following list documents differences between traditional
280 A list of display following
282 does not assert a prior vertical break, just as it doesn't with
285 Special characters don't follow the current font style.
288 The \-literal and \-unfilled
290 displays types are synonyms, as are \-filled and \-ragged.