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

Annotation of mandoc/mdocterm.1, Revision 1.16

1.16    ! kristaps    1: .\" $Id: mdocterm.1,v 1.15 2009/03/08 18:02:36 kristaps Exp $
1.1       kristaps    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$
1.14      kristaps   20: .Dt mdocterm 1
1.1       kristaps   21: .Os
                     22: .\" SECTION
                     23: .Sh NAME
                     24: .Nm mdocmterm
                     25: .Nd mdoc macro compiler
                     26: .\" SECTION
                     27: .Sh SYNOPSIS
                     28: .Nm mdocmterm
1.15      kristaps   29: .Op Fl vV
                     30: .Op Fl f Ns Ar option...
1.1       kristaps   31: .Op Fl W Ns Ar err...
                     32: .Op Ar infile
                     33: .\" SECTION
                     34: .Sh DESCRIPTION
                     35: The
                     36: .Nm
                     37: utility formats a BSD
                     38: .Dq mdoc
                     39: manual page for display on the terminal.  The arguments are as follows:
1.15      kristaps   40: .Bl -tag -width XXXXXXXXXXXX
1.1       kristaps   41: .\" ITEM
                     42: .It Fl v
                     43: Print verbose parsing output.
                     44: .\" ITEM
1.15      kristaps   45: .It Fl v
                     46: Print version and exit.
                     47: .\" ITEM
                     48: .It Fl f Ns Ar option...
                     49: Override default compiler behaviour.  See
                     50: .Sx Compiler Options
                     51: for details.
                     52: .\" ITEM
1.1       kristaps   53: .It Fl W Ns Ar err...
                     54: Print warning messages.  May be set to
                     55: .Fl W Ns Ar all
                     56: for all warnings,
                     57: .Ar compat
                     58: for groff/troff-compatibility warnings, or
                     59: .Ar syntax
                     60: for syntax warnings.  If
                     61: .Fl W Ns Ar error
                     62: is specified, warnings are considered errors and cause utility
                     63: termination.  Multiple
                     64: .Fl W
                     65: arguments may be comma-separated, such as
                     66: .Fl W Ns Ar error,all .
                     67: .\" ITEM
                     68: .It Ar infile
                     69: Read input from
                     70: .Ar infile ,
                     71: which may be
                     72: .Dq \-
                     73: for stdin.
                     74: .El
                     75: .\" PARAGRAPH
1.2       kristaps   76: .Pp
1.1       kristaps   77: The
                     78: .Nm
                     79: utility is a formatting front-end for
                     80: .Xr mdoc 3 ,
                     81: which parses the
                     82: .Dq mdoc
                     83: input, documented at
                     84: .Xr mdoc 7
                     85: and
                     86: .Xr mdoc.samples 7 ,
1.15      kristaps   87: into an abstract syntax tree.
1.1       kristaps   88: .Pp
1.15      kristaps   89: By default,
                     90: .Nm
                     91: reads from stdin and prints ANSI
                     92: .Qq raw
                     93: terminal-encoded output to stdout, at this time to a fixed column with
                     94: of 78 characters.
1.1       kristaps   95: .\" PARAGRAPH
                     96: .Pp
                     97: .Ex -std mdocmterm
1.15      kristaps   98: .\" SUB-SECTION
                     99: .Ss Compiler Options
                    100: Default compiler behaviour may be overriden with the
                    101: .Fl f
                    102: flag.  The available options are as follows:
                    103: .Bl -tag -width XXXXXXXXXXXX -offset XXXX
                    104: .It Fl f Ns Ar ign-scope
                    105: When rewinding the scope of a block macro, forces the compiler to ignore
                    106: scope violations.  This can seriously mangle the resulting tree.
                    107: .It Fl f Ns Ar ign-escape
                    108: Ignore invalid escape sequences.
1.16    ! kristaps  109: .It Fl f Ns Ar ign-macro
        !           110: Ignore unknown macros at the start of input lines.
1.15      kristaps  111: .El
1.1       kristaps  112: .\" PARAGRAPH
                    113: .Pp
1.15      kristaps  114: As with the
                    115: .Fl W
                    116: flag, multiple
                    117: .Fl f
                    118: options may be grouped and delimited with a comma.  Using
                    119: .Fl f Ns Ar ign-scope,ign-escape ,
                    120: for example, will try to ignore scope and character-escape errors.
1.7       kristaps  121: .\" SUB-SECTION
1.16    ! kristaps  122: .Ss Input Encoding
        !           123: The
        !           124: .Nm
        !           125: utility expects its input to be 7-bit ASCII as defined in
        !           126: .Xr ascii 7 .
        !           127: The only non-graphing characters accepted are spaces,
        !           128: .Sq \  ,
        !           129: and tabs,
        !           130: .Sq \et .
        !           131: Tabs are only accepted in literal block-displays and as column
        !           132: delimiters.
        !           133: .Pp
        !           134: Only Unix-style newlines (\en) are accepted; if the newline is escaped,
        !           135: the line is concatenated with the next.
        !           136: .\" SUB-SECTION
1.7       kristaps  137: .Ss Character Escapes
                    138: This section documents the character-escapes accepted by
                    139: .Xr mdocterm 1 .
1.10      kristaps  140: Note that the \\x, \\(xx and \\[n] forms are described here; the \\*(xx,
                    141: \\*[n] and \\*x forms described in
1.7       kristaps  142: .Xr mdoc.samples 7
1.10      kristaps  143: are deprecated, but still rendered.  All one- and two-character
                    144: sequences may be used in the n-character sequence \\[n].
1.7       kristaps  145: .Pp
                    146: Note that the
                    147: .Em Output
                    148: column will render differently whether executed with
                    149: .Xr mdocterm 1
                    150: or another output filter.
                    151: .\" PARAGRAPH
                    152: .Pp
1.10      kristaps  153: Grammatic:
                    154: .Pp
                    155: .Bl -tag -width "OutputXXXX" -offset "XXXX" -compact
                    156: .It Em Output
                    157: .Em Input (Name)
                    158: .It \(em
                    159: \\(em (em-dash)
                    160: .It \(en
                    161: \\(en (en-dash)
                    162: .It \-
                    163: \\- (hyphen)
                    164: .It \\
1.13      kristaps  165: \\\\ (back-slash)
1.10      kristaps  166: .El
                    167: .\" PARAGRAPH
                    168: .Pp
1.7       kristaps  169: Enclosures:
                    170: .Pp
                    171: .Bl -tag -width "OutputXXXX" -offset "XXXX" -compact
                    172: .It Em Output
                    173: .Em Input (Name)
1.13      kristaps  174: .It \(ra
                    175: \\(ra (right angle)
                    176: .It \(la
                    177: \\(la (left angle)
1.7       kristaps  178: .It \(rB
                    179: \\(rB (right bracket)
                    180: .It \(lB
1.13      kristaps  181: \\(lB (left bracket)
1.7       kristaps  182: .It \(lq
                    183: \\(lq (left double-quote)
                    184: .It \(rq
1.13      kristaps  185: \\(rq (right double-quote)
1.7       kristaps  186: .It \(oq
1.13      kristaps  187: \\(oq, \\` (left single-quote)
1.7       kristaps  188: .It \(aq
1.13      kristaps  189: \\(aq, \\' (right single-quote, apostrophe)
1.7       kristaps  190: .El
                    191: .\" PARAGRAPH
                    192: .Pp
                    193: Indicatives:
                    194: .Pp
                    195: .Bl -tag -width "OutputXXXX" -offset "XXXX" -compact
                    196: .It Em Output
                    197: .Em Input (Name)
                    198: .It \(<-
                    199: \\(<- (left arrow)
                    200: .It \(->
                    201: \\(-> (right arrow)
                    202: .It \(ua
                    203: \\(ua (up arrow)
                    204: .It \(da
                    205: \\(da (down arrow)
                    206: .El
                    207: .\" PARAGRAPH
                    208: .Pp
                    209: Mathematical:
                    210: .Pp
                    211: .Bl -tag -width "OutputXXXX" -offset "XXXX" -compact
                    212: .It Em Output
                    213: .Em Input (Name)
                    214: .It \(<=
                    215: \\(<= (less-than-equal)
                    216: .It \(>=
                    217: \\(>= (greater-than-equal)
                    218: .It \(==
1.13      kristaps  219: \\(== (equal)
1.7       kristaps  220: .It \(!=
                    221: \\(!= (not equal)
                    222: .It \(if
                    223: \\(if (infinity)
                    224: .It \(na
                    225: \\(na (NaN)*
                    226: .It \(+-
                    227: \\(+- (plus-minus)
1.10      kristaps  228: .It \(**
                    229: \\(** (asterisk)
1.7       kristaps  230: .El
                    231: .\" PARAGRAPH
                    232: .Pp
                    233: Diacritics:
                    234: .Pp
                    235: .Bl -tag -width "OutputXXXX" -offset "XXXX" -compact
                    236: .It Em Output
                    237: .Em Input (Name)
                    238: .It \(ga
                    239: \\(ga (accent grave)
                    240: .It \(aa
                    241: \\(aa (accent accute)
                    242: .El
                    243: .\" PARAGRAPH
                    244: .Pp
                    245: Special symbols:
                    246: .Pp
                    247: .Bl -tag -width "OutputXXXX" -offset "XXXX" -compact
                    248: .It Em Output
                    249: .Em Input (Name)
                    250: .It \(bu
                    251: \\(bu (bullet)
                    252: .It \(ba
                    253: \\(ba (bar)
1.10      kristaps  254: .It \(co
                    255: \\(co (copyright)
1.7       kristaps  256: .El
1.10      kristaps  257: .Pp
                    258: *This is a deviation from the standard, as NaN is usually rendered as
                    259: \\*(Na, which is a deprecated form.  We introduce \\(na, which follows
                    260: the more general syntax.
1.1       kristaps  261: .\" SECTION
                    262: .Sh EXAMPLES
                    263: To display this manual page:
                    264: .\" PARAGRAPH
                    265: .Pp
                    266: .D1 % mdocmterm \-Wall,error mdocmterm.1
1.2       kristaps  267: .\" PARAGRAPH
                    268: .Pp
                    269: To pipe a manual page to the pager:
                    270: .Pp
1.15      kristaps  271: .D1 % mdocterm mdocterm.1 2>&1 | less \-R
1.1       kristaps  272: .\" SECTION
                    273: .Sh SEE ALSO
                    274: .Xr mdoctree 1 ,
1.3       kristaps  275: .Xr mdoclint 1 ,
1.1       kristaps  276: .Xr mdoc.samples 7 ,
                    277: .Xr mdoc 7 ,
                    278: .Xr mdoc 3
                    279: .\"
                    280: .Sh AUTHORS
                    281: The
                    282: .Nm
                    283: utility was written by
                    284: .An Kristaps Dzonsons Aq kristaps@kth.se .
                    285: .\" SECTION
                    286: .Sh CAVEATS
                    287: See
                    288: .Xr mdoc 3
1.4       kristaps  289: for a list of bugs, caveats, and incomplete macros regarding the
                    290: document parse.
1.9       kristaps  291: .Pp
                    292: The
                    293: .Nm
                    294: utility doesn't yet know how to display the following:
                    295: .Pp
                    296: .Bl -bullet -compact
                    297: .It
1.11      kristaps  298: The \-hang and \-column
1.9       kristaps  299: .Sq \&Bl
1.11      kristaps  300: lists are not yet supported.
1.9       kristaps  301: .It
                    302: The \-literal and \-unfilled
                    303: .Sq \&Bd
                    304: displays only accept text contents.
                    305: .It
                    306: The
                    307: .Sq \&Xo/Xc
                    308: pair isn't supported (and never will be).
1.12      kristaps  309: .It
                    310: The
                    311: .Sq \&Sm
                    312: macro has no effect, yet.
1.9       kristaps  313: .El

CVSweb