2 .Dd $Mdocdate: December 10 2008 $
8 .Nd compile manpage source into mark-up language
21 utility parses mdoc formatted manual source and passes results into an
22 output filter. The current output filters are
28 only validates its input. This may be explicitly directed with
30 Arguments common to all filters follow:
31 .Bl -tag -width "\-o outfile"
33 The output filter name.
39 for stdout. This is meaningless for
42 Print warning messages. If set to
44 all warnings are printed; if
46 warnings are considered errors and cause utility termination. Multiple
48 arguments may be comma-separated, such as
49 .Fl W Ns Ar error,all .
51 Make warning and error messages verbose.
62 reads from stdin and writes to stdout.
69 filter simply validates its input; it produces no output beyond error
73 The XML filter, specified by
75 produces correctly-formatted XML output. This filter has no additional
78 The XML filter creates an XML document where element names are their respective
79 roff macro names. Each element name has an associated
80 namespace, which is one of
86 corresponding to the display mode of a node. The document root is
89 element, in the default namespace; the
91 namespace is for block headers (such as
97 namespace is for block bodies; and the
99 namespace is for in-line elements (such as
103 The HTML filter, specified by
105 accepts the following filter-specific arguments:
106 .Bl -tag -width "\-c css"
108 The CSS file location, which defaults to
111 Whether to embed the CSS file into the HTML prologue.
114 By default, the HTML filter produces HTML-4.01 strict mark-up. The
115 default CSS document styles the page as it would appear in a terminal
119 To produce an HTML4-strict document
123 with the default, embedded style-sheet:
125 .D1 % mdocml -fhtml -e -o mdocml.html mdocml.1
127 To create an XML document on standard output from
129 with the default namespace identifiers
136 .D1 % mdocml -Wall,error -fxml mdocml.1
138 The previous example will also halt on input document warnings.
149 utility was written by
150 .An Kristaps Dzonsons Aq kristaps@kth.se .
155 stem from ambiguities in
157 or the necessary limitations of converting an ad hoc language into
159 .Bl -enum -compact -offset indent
161 The engine doesn't understand the
169 All macro arguments may be quoted, instead of only some.
171 Blank lines raise errors.
173 If terminating punctuation is found, then
175 remaining tokens are flushed after line scope is closed, not just the
181 produces text in-line; thus, output may already be partially written by
182 the time an error is encountered.