[BACK]Return to mdocml.1 CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Annotation of mandoc/mdocml.1, Revision 1.18

1.1       kristaps    1: .\"
1.2       kristaps    2: .Dd $Mdocdate$
1.17      kristaps    3: .Dt mdocml 1 alpha
1.1       kristaps    4: .Os
1.3       kristaps    5: .\"
1.1       kristaps    6: .Sh NAME
1.2       kristaps    7: .Nm mdocml
                      8: .Nd compile manpage source into mark-up language
1.3       kristaps    9: .\"
1.1       kristaps   10: .Sh SYNOPSIS
1.2       kristaps   11: .Nm mdocml
1.17      kristaps   12: .Op Fl vW
1.7       kristaps   13: .Op Fl f Ar filter
1.2       kristaps   14: .Op Fl o Ar outfile
                     15: .Op Ar infile
1.3       kristaps   16: .\"
1.1       kristaps   17: .Sh DESCRIPTION
                     18: The
                     19: .Nm
1.13      kristaps   20: utility parses mdoc formatted manual source and passes results into an
1.17      kristaps   21: output filter.  The current output filters are
                     22: .Ar html
                     23: and
1.10      kristaps   24: .Ar xml ,
1.17      kristaps   25: the default.  Arguments common to all filters follow:
1.10      kristaps   26: .Bl -tag -width "\-o outfile"
                     27: .It Fl f Ar filter
1.12      kristaps   28: The output filter name.
1.10      kristaps   29: .It Fl o Ar outfile
1.12      kristaps   30: Write output to
1.2       kristaps   31: .Ar outfile ,
                     32: which may be
1.6       kristaps   33: .Qq \-
1.12      kristaps   34: for stdout.
1.10      kristaps   35: .It Fl W
1.12      kristaps   36: Print warnings to stderr.
1.2       kristaps   37: .It Ar infile
                     38: Read input from
                     39: .Ar infile ,
                     40: which may be
1.6       kristaps   41: .Qq \-
1.12      kristaps   42: for stdin.
1.2       kristaps   43: .El
1.12      kristaps   44: .Pp
                     45: By default,
                     46: .Nm
                     47: reads from stdin and writes to stdout using the xml filter.
                     48: .\"
1.10      kristaps   49: .Ss XML Filter
                     50: The XML filter, specified by
                     51: .Fl f Ar xml ,
1.17      kristaps   52: is the default filter.  This filter has no additional arguments.
                     53: .Pp
                     54: The XML filter creates an XML document where element names are their respective
                     55: roff macro names.  Each element name has an associated
1.10      kristaps   56: namespace, which is one of
1.16      kristaps   57: .Qq block ,
                     58: .Qq head ,
                     59: .Qq body ,
1.12      kristaps   60: or
1.10      kristaps   61: .Qq inline ,
1.12      kristaps   62: corresponding to the display mode of a node.  The document root is
                     63: always the
                     64: .Qq mdoc
1.17      kristaps   65: element, in the default namespace; the
                     66: .Qq head
                     67: namespace is for block headers (such as
                     68: .Sq .Ss
                     69: and
                     70: .Sq .Sh ) ;
                     71: the
                     72: .Qq body
                     73: namespace is for block bodies; and the
                     74: .Qq inline
                     75: namespace is for in-line elements (such as
                     76: .Sq .Em ) .
                     77: .Ss HTML Filter
                     78: The HTML filter, specified by
                     79: .Fl f Ar html ,
                     80: accepts the following filter-specific arguments:
                     81: .Bl -tag -width "\-c css"
                     82: .It Fl c Ar css
                     83: The CSS file location, which defaults to
                     84: .Ar mdocml.css .
                     85: .It Fl e
                     86: Whether to embed the CSS file into the HTML prologue.
                     87: .El
1.18    ! kristaps   88: .\"
1.17      kristaps   89: .Sh EXAMPLES
                     90: To produce an HTML4-strict document
                     91: .Pa mdocml.html
                     92: for
                     93: .Pa mdocml.1
                     94: with the default, embedded style-sheet:
                     95: .Pp
1.18    ! kristaps   96: .D1 % mdocml -fhtml -e -o mdocml.html mdocml.1
1.17      kristaps   97: .Pp
                     98: To create an XML document on standard output from
                     99: .Pa mdocml.1
                    100: with the default namespace identifiers
                    101: .Li head ,
                    102: .Li body ,
                    103: .Li block
                    104: and
                    105: .Li inline :
                    106: .Pp
                    107: .D1 % mdocml mdocml.1
1.12      kristaps  108: .\"
1.3       kristaps  109: .Sh SEE ALSO
                    110: .Xr groff 1 ,
                    111: .Xr mdoc.samples 7 ,
                    112: .Xr mdoc 7
1.1       kristaps  113: .\" .Sh STANDARDS
                    114: .\" .Sh HISTORY
1.3       kristaps  115: .Sh AUTHORS
                    116: The
                    117: .Nm
                    118: utility was written by
1.9       kristaps  119: .An Em Kristaps Dzonsons Aq kristaps@kth.se .
1.3       kristaps  120: .\"
                    121: .Sh CAVEATS
1.7       kristaps  122: Most caveats of
1.3       kristaps  123: .Nm
1.7       kristaps  124: stem from ambiguities in
                    125: .Xr mdoc 7
                    126: or the necessary limitations of converting an ad hoc language into
                    127: structured ones:
                    128: .Bl -enum -compact -offset indent
                    129: .It
1.12      kristaps  130: The engine doesn't understand the
                    131: .Sq \&Xo ,
                    132: .Sq \&Xc ,
                    133: .Sq \&No ,
                    134: .Sq \&Db ,
                    135: .Sq \&Xc ,
                    136: and
1.3       kristaps  137: .Sq \&Xo
1.12      kristaps  138: mdoc macros.
1.7       kristaps  139: .It
                    140: All macro arguments may be quoted, instead of only some.
                    141: .It
1.12      kristaps  142: Blank lines raise errors.
1.7       kristaps  143: .It
1.9       kristaps  144: If terminating punctuation is found, then
                    145: .Em all
                    146: remaining tokens are flushed after line scope is closed, not just the
                    147: last one.
1.7       kristaps  148: .El
1.14      kristaps  149: .Pp
                    150: The roff engine in
                    151: .Nm
                    152: produces text in-line; thus, output may already be partially written by
                    153: the time an error is encountered.
1.1       kristaps  154: .\" .Sh BUGS

CVSweb