]> git.cameronkatri.com Git - mandoc.git/blob - mdocml.1
198f184709bdb83044773661ed10f047bc96c67d
[mandoc.git] / mdocml.1
1 .\"
2 .Dd $Mdocdate: January 20 2009 $
3 .Dt mdocml 1
4 .Os
5 .\"
6 .Sh NAME
7 .Nm mdocml
8 .Nd mdoc macro compiler
9 .\"
10 .Sh SYNOPSIS
11 .Nm mdocml
12 .Op Fl v
13 .Op Fl W Ns Ar err...
14 .Op Ar infile
15 .\"
16 .Sh DESCRIPTION
17 The
18 .Nm
19 utility interfaces the
20 .Xr mdoc 3
21 library to scan, parse and validate mdoc-macro documents. Arguments
22 follow:
23 .Bl -tag -width "\-Werr... "
24 .It Fl W Ns Ar err...
25 Print warning messages. May be set to
26 .Fl W Ns Ar all
27 for all warnings,
28 .Ar compat
29 for groff/troff-compatibility warnings, or
30 .Ar syntax
31 for syntax warnings. If
32 .Fl W Ns Ar error
33 is specified, warnings are considered errors and cause utility
34 termination. Multiple
35 .Fl W
36 arguments may be comma-separated, such as
37 .Fl W Ns Ar error,all .
38 .It Fl v
39 Print verbose parsing output.
40 .It Ar infile
41 Read input from
42 .Ar infile ,
43 which may be
44 .Dq \-
45 for stdin.
46 .El
47 .Pp
48 Parsing and validation rules are drawn entirely from the
49 .Xr mdoc 7
50 and
51 .Xr mdoc.samples 7
52 manuals.
53 .Pp
54 By default,
55 .Nm
56 reads from stdin, writes messages to stdout, and writes errors and
57 warnings to stderr.
58 .Pp
59 .Ex -std mdocml
60 .Pp
61 .Nm
62 is
63 .Ud
64 .\"
65 .Sh EXAMPLES
66 To validate this manual page:
67 .Pp
68 .D1 % mdocml \-Wall,error mdocml.1
69 .\"
70 .Sh SEE ALSO
71 .Xr groff 1 ,
72 .Xr mdoc.samples 7 ,
73 .Xr mdoc 7 ,
74 .Xr mdoc 3
75 .\" .Sh STANDARDS
76 .\" .Sh HISTORY
77 .Sh AUTHORS
78 The
79 .Nm
80 utility was written by
81 .An Kristaps Dzonsons Aq kristaps@kth.se .
82 .\"
83 .Sh CAVEATS
84 The most glaring short-coming of
85 .Nm
86 is that it doesn't yet support the
87 .Sq \&Xc
88 and
89 .Sq \&Xo
90 macros when used to extend the line arguments to
91 .Sq \&It ;
92 in effect, trampling the body section. We note that this is explicitly
93 discouraged in
94 .Xr mdoc.samples 7 ,
95 but in practice used quite often.
96 .\" .Sh BUGS