]> git.cameronkatri.com Git - mandoc.git/blob - mdocterm.1
Initial block-display support.
[mandoc.git] / mdocterm.1
1 .\" $Id: mdocterm.1,v 1.2 2009/02/22 11:23:19 kristaps Exp $
2 .\"
3 .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
4 .\"
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
8 .\" copies.
9 .\"
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.
18 .\"
19 .Dd $Mdocdate: February 22 2009 $
20 .Dt mdocmterm 1
21 .Os
22 .\" SECTION
23 .Sh NAME
24 .Nm mdocmterm
25 .Nd mdoc macro compiler
26 .\" SECTION
27 .Sh SYNOPSIS
28 .Nm mdocmterm
29 .Op Fl v
30 .Op Fl W Ns Ar err...
31 .Op Ar infile
32 .\" SECTION
33 .Sh DESCRIPTION
34 The
35 .Nm
36 utility formats a BSD
37 .Dq mdoc
38 manual page for display on the terminal. The arguments are as follows:
39 .Bl -tag -width "\-Werr... "
40 .\" ITEM
41 .It Fl v
42 Print verbose parsing output.
43 .\" ITEM
44 .It Fl W Ns Ar err...
45 Print warning messages. May be set to
46 .Fl W Ns Ar all
47 for all warnings,
48 .Ar compat
49 for groff/troff-compatibility warnings, or
50 .Ar syntax
51 for syntax warnings. If
52 .Fl W Ns Ar error
53 is specified, warnings are considered errors and cause utility
54 termination. Multiple
55 .Fl W
56 arguments may be comma-separated, such as
57 .Fl W Ns Ar error,all .
58 .\" ITEM
59 .It Ar infile
60 Read input from
61 .Ar infile ,
62 which may be
63 .Dq \-
64 for stdin.
65 .El
66 .\" PARAGRAPH
67 .Pp
68 The
69 .Nm
70 utility is a formatting front-end for
71 .Xr mdoc 3 ,
72 which parses the
73 .Dq mdoc
74 input, documented at
75 .Xr mdoc 7
76 and
77 .Xr mdoc.samples 7 ,
78 into an abstract syntax tree.
79 .\" PARAGRAPH
80 .Pp
81 By default,
82 .Nm
83 reads from stdin and prints terminal-encoded output to stdout.
84 .\" PARAGRAPH
85 .Pp
86 .Ex -std mdocmterm
87 .\" PARAGRAPH
88 .Pp
89 .Nm
90 is
91 .Ud
92 .\" SECTION
93 .Sh EXAMPLES
94 To display this manual page:
95 .\" PARAGRAPH
96 .Pp
97 .D1 % mdocmterm \-Wall,error mdocmterm.1
98 .\" PARAGRAPH
99 .Pp
100 To pipe a manual page to the pager:
101 .Pp
102 .D1 % mdocterm mdocterm.1 | less -R
103 .\" SECTION
104 .Sh SEE ALSO
105 .Xr mdoctree 1 ,
106 .Xr mdoc.samples 7 ,
107 .Xr mdoc 7 ,
108 .Xr mdoc 3
109 .\"
110 .Sh AUTHORS
111 The
112 .Nm
113 utility was written by
114 .An Kristaps Dzonsons Aq kristaps@kth.se .
115 .\" SECTION
116 .Sh CAVEATS
117 See
118 .Xr mdoc 3
119 for a list of bugs, caveats, and incomplete macros.