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

Diff for /mandoc/mandoc.1 between version 1.58 and 1.59

version 1.58, 2010/04/12 19:27:22 version 1.59, 2010/04/13 05:26:49
Line 1 
Line 1 
 .\"     $Id$  .\"     $Id$
 .\"  .\"
 .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>  .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv>
 .\"  .\"
 .\" Permission to use, copy, modify, and distribute this software for any  .\" Permission to use, copy, modify, and distribute this software for any
 .\" purpose with or without fee is hereby granted, provided that the above  .\" purpose with or without fee is hereby granted, provided that the above
Line 17 
Line 17 
 .Dd $Mdocdate$  .Dd $Mdocdate$
 .Dt MANDOC 1  .Dt MANDOC 1
 .Os  .Os
 .  
 .  
 .Sh NAME  .Sh NAME
 .Nm mandoc  .Nm mandoc
 .Nd format and display UNIX manuals  .Nd format and display UNIX manuals
 .  
 .  
 .Sh SYNOPSIS  .Sh SYNOPSIS
 .Nm mandoc  .Nm mandoc
 .Op Fl V  .Op Fl V
Line 33 
Line 29 
 .Op Fl T Ns Ar output  .Op Fl T Ns Ar output
 .Op Fl W Ns Ar err  .Op Fl W Ns Ar err
 .Op Ar file...  .Op Ar file...
 .  
 .  
 .Sh DESCRIPTION  .Sh DESCRIPTION
 The  The
 .Nm  .Nm
Line 42  utility formats
Line 36  utility formats
 .Ux  .Ux
 manual pages for display.  manual pages for display.
 The arguments are as follows:  The arguments are as follows:
 .  
 .Bl -tag -width Ds  .Bl -tag -width Ds
 .It Fl f Ns Ar option  .It Fl f Ns Ar option
 Comma-separated compiler options.  Comma-separated compiler options.
 See  See
 .Sx Compiler Options  .Sx Compiler Options
 for details.  for details.
 .  
 .It Fl m Ns Ar format  .It Fl m Ns Ar format
 Input format.  Input format.
 See  See
Line 57  See
Line 49  See
 for available formats.  for available formats.
 Defaults to  Defaults to
 .Fl m Ns Cm andoc .  .Fl m Ns Cm andoc .
 .  
 .It Fl O Ns Ar option  .It Fl O Ns Ar option
 Comma-separated output options.  Comma-separated output options.
 See  See
 .Sx Output Options  .Sx Output Options
 for details.  for details.
 .  
 .It Fl T Ns Ar output  .It Fl T Ns Ar output
 Output format.  Output format.
 See  See
Line 71  See
Line 61  See
 for available formats.  for available formats.
 Defaults to  Defaults to
 .Fl T Ns Cm ascii .  .Fl T Ns Cm ascii .
 .  
 .It Fl V  .It Fl V
 Print version and exit.  Print version and exit.
 .  
 .It Fl W Ns Ar err  .It Fl W Ns Ar err
 Comma-separated warning options.  Comma-separated warning options.
 Use  Use
Line 87  Multiple
Line 75  Multiple
 .Fl W  .Fl W
 arguments may be comma-separated, such as  arguments may be comma-separated, such as
 .Fl W Ns Cm error , Ns Cm all .  .Fl W Ns Cm error , Ns Cm all .
 .  
 .It Ar file  .It Ar file
 Read input from zero or more files.  Read input from zero or more files.
 If unspecified, reads from stdin.  If unspecified, reads from stdin.
Line 95  If multiple files are specified,
Line 82  If multiple files are specified,
 .Nm  .Nm
 will halt with the first failed parse.  will halt with the first failed parse.
 .El  .El
 .  
 .Pp  .Pp
 By default,  By default,
 .Nm  .Nm
Line 108  text from stdin, implying
Line 94  text from stdin, implying
 and produces  and produces
 .Fl T Ns Cm ascii  .Fl T Ns Cm ascii
 output.  output.
 .  
 .Pp  .Pp
 .Ex -std mandoc  .Ex -std mandoc
 .  
 .  
 .Ss Input Formats  .Ss Input Formats
 The  The
 .Nm  .Nm
Line 132  format is
Line 115  format is
 recommended;  recommended;
 .Xr man 7  .Xr man 7
 should only be used for legacy manuals.  should only be used for legacy manuals.
 .  
 .Pp  .Pp
 A third option,  A third option,
 .Fl m Ns Cm andoc ,  .Fl m Ns Cm andoc ,
Line 146  the
Line 128  the
 parser is used; otherwise, the  parser is used; otherwise, the
 .Xr man 7  .Xr man 7
 parser is used.  parser is used.
 .  
 .Pp  .Pp
 If multiple  If multiple
 files are specified with  files are specified with
Line 158  specified and
Line 139  specified and
 or  or
 .Fl m Ns Cm an  .Fl m Ns Cm an
 is specified, then this format is used exclusively.  is specified, then this format is used exclusively.
 .  
 .  
 .Ss Output Formats  .Ss Output Formats
 The  The
 .Nm  .Nm
Line 167  utility accepts the following
Line 146  utility accepts the following
 .Fl T  .Fl T
 arguments (see  arguments (see
 .Sx OUTPUT ) :  .Sx OUTPUT ) :
 .  
 .Bl -tag -width Ds  .Bl -tag -width Ds
 .It Fl T Ns Cm ascii  .It Fl T Ns Cm ascii
 Produce 7-bit ASCII output, backspace-encoded for bold and underline  Produce 7-bit ASCII output, backspace-encoded for bold and underline
Line 175  styles.
Line 153  styles.
 This is the default.  This is the default.
 See  See
 .Sx ASCII Output .  .Sx ASCII Output .
 .  
 .It Fl T Ns Cm html  .It Fl T Ns Cm html
 Produce strict HTML-4.01 output, with a sane default style.  Produce strict HTML-4.01 output, with a sane default style.
 See  See
 .Sx HTML Output .  .Sx HTML Output .
 .  
 .It Fl T Ns Cm lint  .It Fl T Ns Cm lint
 Parse only: produce no output.  Parse only: produce no output.
 Implies  Implies
 .Fl W Ns Cm all  .Fl W Ns Cm all
 and  and
 .Fl f Ns Cm strict .  .Fl f Ns Cm strict .
 .  
 .It Fl T Ns Cm tree  .It Fl T Ns Cm tree
 Produce an indented parse tree.  Produce an indented parse tree.
 .  
 .It Fl T Ns Cm xhtml  .It Fl T Ns Cm xhtml
 Produce strict XHTML-1.0 output, with a sane default style.  Produce strict XHTML-1.0 output, with a sane default style.
 See  See
 .Sx XHTML Output .  .Sx XHTML Output .
 .El  .El
 .  
 .Pp  .Pp
 If multiple input files are specified, these will be processed by the  If multiple input files are specified, these will be processed by the
 corresponding filter in-order.  corresponding filter in-order.
 .  
 .  
 .Ss Compiler Options  .Ss Compiler Options
 Default compiler behaviour may be overridden with the  Default compiler behaviour may be overridden with the
 .Fl f  .Fl f
 flag.  flag.
 .  
 .Bl -tag -width Ds  .Bl -tag -width Ds
 .It Fl f Ns Cm ign-errors  .It Fl f Ns Cm ign-errors
 When parsing multiple files, don't halt when one errors out.  When parsing multiple files, don't halt when one errors out.
 Useful with  Useful with
 .Fl T Ns Cm lint  .Fl T Ns Cm lint
 over a large set of manuals passed on the command line.  over a large set of manuals passed on the command line.
 .  
 .It Fl f Ns Cm ign-escape  .It Fl f Ns Cm ign-escape
 Ignore invalid escape sequences.  Ignore invalid escape sequences.
 This is the default, but the option can be used to override an earlier  This is the default, but the option can be used to override an earlier
 .Fl f Ns Cm strict .  .Fl f Ns Cm strict .
 .  
 .It Fl f Ns Cm ign-scope  .It Fl f Ns Cm ign-scope
 When rewinding the scope of a block macro, forces the compiler to ignore  When rewinding the scope of a block macro, forces the compiler to ignore
 scope violations.  scope violations.
 This can seriously mangle the resulting tree.  This can seriously mangle the resulting tree.
 .Pq mdoc only  .Pq mdoc only
 .  
 .It Fl f Ns Cm no-ign-chars  .It Fl f Ns Cm no-ign-chars
 Do not ignore disallowed characters.  Do not ignore disallowed characters.
 .  
 .It Fl f Ns Cm no-ign-escape  .It Fl f Ns Cm no-ign-escape
 Do not ignore invalid escape sequences.  Do not ignore invalid escape sequences.
 .  
 .It Fl f Ns Cm no-ign-macro  .It Fl f Ns Cm no-ign-macro
 Do not ignore unknown macros at the start of input lines.  Do not ignore unknown macros at the start of input lines.
 .  
 .It Fl f Ns Cm strict  .It Fl f Ns Cm strict
 Implies  Implies
 .Fl f Ns Cm no-ign-escape ,  .Fl f Ns Cm no-ign-escape ,
Line 241  Implies
Line 205  Implies
 and  and
 .Fl f Ns Cm no-ign-chars .  .Fl f Ns Cm no-ign-chars .
 .El  .El
 .  
 .  
 .Ss Output Options  .Ss Output Options
 For the time being, only  For the time being, only
 .Fl T Ns Ar html  .Fl T Ns Ar html
Line 286  is used for an external style-sheet.
Line 248  is used for an external style-sheet.
 This must be a valid absolute or  This must be a valid absolute or
 relative URI.  relative URI.
 .El  .El
 .  
 .  
 .Sh OUTPUT  .Sh OUTPUT
 This section documents output details of  This section documents output details of
 .Nm .  .Nm .
Line 332  and
Line 292  and
 .Sq \&}  .Sq \&}
 .Pc  .Pc
 is not preceded by white-space.  is not preceded by white-space.
 .  
 .Pp  .Pp
 If the input is  If the input is
 .Xr mdoc 7 ,  .Xr mdoc 7 ,
 however, these rules are also applied to macro arguments when appropriate.  however, these rules are also applied to macro arguments when appropriate.
 .  
 .  
 .Ss ASCII Output  .Ss ASCII Output
 Output produced by  Output produced by
 .Fl T Ns Cm ascii ,  .Fl T Ns Cm ascii ,
Line 362  are rendered best-effort in an ASCII equivalent.
Line 319  are rendered best-effort in an ASCII equivalent.
 .Pp  .Pp
 Output width is limited to 78 visible columns unless literal input lines  Output width is limited to 78 visible columns unless literal input lines
 exceed this limit.  exceed this limit.
 .  
 .  
 .Ss HTML Output  .Ss HTML Output
 Output produced by  Output produced by
 .Fl T Ns Cm html  .Fl T Ns Cm html
Line 381  cause rendered documents to appear as they do in
Line 336  cause rendered documents to appear as they do in
 .Fl T Ns Cm ascii .  .Fl T Ns Cm ascii .
 .Pp  .Pp
 Special characters are rendered in decimal-encoded UTF-8.  Special characters are rendered in decimal-encoded UTF-8.
 .  
 .  
 .Ss XHTML Output  .Ss XHTML Output
 Output produced by  Output produced by
 .Fl T Ns Cm xhtml  .Fl T Ns Cm xhtml
Line 392  See
Line 345  See
 .Sx HTML Output  .Sx HTML Output
 for details; beyond generating XHTML tags instead of HTML tags, these  for details; beyond generating XHTML tags instead of HTML tags, these
 output modes are identical.  output modes are identical.
 .  
 .  
 .Sh EXAMPLES  .Sh EXAMPLES
 To page manuals to the terminal:  To page manuals to the terminal:
 .  
 .Pp  .Pp
 .D1 $ mandoc \-Wall,error \-fstrict mandoc.1 2\*(Gt&1 | less  .D1 $ mandoc \-Wall,error \-fstrict mandoc.1 2\*(Gt&1 | less
 .D1 $ mandoc mandoc.1 mdoc.3 mdoc.7 | less  .D1 $ mandoc mandoc.1 mdoc.3 mdoc.7 | less
 .  
 .Pp  .Pp
 To produce HTML manuals with  To produce HTML manuals with
 .Ar style.css  .Ar style.css
Line 409  as the style-sheet:
Line 358  as the style-sheet:
 .D1 $ mandoc \-Thtml -Ostyle=style.css mdoc.7 \*(Gt mdoc.7.html  .D1 $ mandoc \-Thtml -Ostyle=style.css mdoc.7 \*(Gt mdoc.7.html
 .Pp  .Pp
 To check over a large set of manuals:  To check over a large set of manuals:
 .  
 .Pp  .Pp
 .Dl $ mandoc \-Tlint \-fign-errors `find /usr/src -name \e*\e.[1-9]`  .Dl $ mandoc \-Tlint \-fign-errors `find /usr/src -name \e*\e.[1-9]`
 .  
 .  
 .Sh COMPATIBILITY  .Sh COMPATIBILITY
 This section summarises  This section summarises
 .Nm  .Nm
 compatibility with  compatibility with
 .Xr groff 1 .  .Xr groff 1 .
 Each input and output format is separately noted.  Each input and output format is separately noted.
 .  
 .  
 .Ss ASCII Compatibility  .Ss ASCII Compatibility
 .Bl -bullet -compact  .Bl -bullet -compact
 .It  .It
Line 429  The
Line 373  The
 .Sq \e~  .Sq \e~
 special character doesn't produce expected behaviour in  special character doesn't produce expected behaviour in
 .Fl T Ns Cm ascii .  .Fl T Ns Cm ascii .
 .  
 .It  .It
 The  The
 .Sq \&Bd \-literal  .Sq \&Bd \-literal
Line 440  macros of
Line 383  macros of
 in  in
 .Fl T Ns Cm ascii  .Fl T Ns Cm ascii
 are synonyms, as are \-filled and \-ragged.  are synonyms, as are \-filled and \-ragged.
 .  
 .It  .It
 In  In
 .Xr groff 1 ,  .Xr groff 1 ,
Line 452  macro does not underline when scoped under an
Line 394  macro does not underline when scoped under an
 in the FILES section.  in the FILES section.
 This behaves correctly in  This behaves correctly in
 .Nm .  .Nm .
 .  
 .It  .It
 A list or display following the  A list or display following the
 .Sq \&Ss  .Sq \&Ss
Line 461  macro in
Line 402  macro in
 .Fl T Ns Cm ascii  .Fl T Ns Cm ascii
 does not assert a prior vertical break, just as it doesn't with  does not assert a prior vertical break, just as it doesn't with
 .Sq \&Sh .  .Sq \&Sh .
 .  
 .It  .It
 The  The
 .Sq \&na  .Sq \&na
Line 469  The
Line 409  The
 macro in  macro in
 .Fl T Ns Cm ascii  .Fl T Ns Cm ascii
 has no effect.  has no effect.
 .  
 .It  .It
 Words aren't hyphenated.  Words aren't hyphenated.
 .  
 .It  .It
 In normal mode (not a literal block), blocks of spaces aren't preserved,  In normal mode (not a literal block), blocks of spaces aren't preserved,
 so double spaces following sentence closure are reduced to a single space;  so double spaces following sentence closure are reduced to a single space;
 .Xr groff 1  .Xr groff 1
 retains spaces.  retains spaces.
 .  
 .It  .It
 Sentences are unilaterally monospaced.  Sentences are unilaterally monospaced.
 .El  .El
 .  
 .  
 .Ss HTML/XHTML Compatibility  .Ss HTML/XHTML Compatibility
 .Bl -bullet -compact  .Bl -bullet -compact
 .It  .It
Line 506  and
Line 441  and
 .Sq \&Bl \-tag  .Sq \&Bl \-tag
 list types render similarly (no break following overreached left-hand  list types render similarly (no break following overreached left-hand
 side) due to the expressive constraints of HTML.  side) due to the expressive constraints of HTML.
 .  
 .It  .It
 The  The
 .Xr man 7  .Xr man 7
Line 515  and
Line 449  and
 .Sq TP  .Sq TP
 lists render similarly.  lists render similarly.
 .El  .El
 .  
 .  
 .Sh SEE ALSO  .Sh SEE ALSO
 .Xr man 7 ,  .Xr man 7 ,
 .Xr mandoc_char 7 ,  .Xr mandoc_char 7 ,
 .Xr mdoc 7  .Xr mdoc 7
 .  
 .Sh AUTHORS  .Sh AUTHORS
 The  The
 .Nm  .Nm
 utility was written by  utility was written by
 .An Kristaps Dzonsons Aq kristaps@kth.se .  .An Kristaps Dzonsons Aq kristaps@bsd.lv .
 .  
 .  
 .Sh CAVEATS  .Sh CAVEATS
 The  The
 .Fl T Ns Cm html  .Fl T Ns Cm html
Line 538  CSS2 styling used for
Line 467  CSS2 styling used for
 .Fl m Ns Cm doc  .Fl m Ns Cm doc
 input lists does not render properly in older browsers, such as Internet  input lists does not render properly in older browsers, such as Internet
 Explorer 6 and earlier.  Explorer 6 and earlier.
 .  
 .Pp  .Pp
 In  In
 .Fl T Ns Cm html  .Fl T Ns Cm html
Line 550  which is usually 1024 bytes.
Line 478  which is usually 1024 bytes.
 Be aware of this when setting long link  Be aware of this when setting long link
 formats such as  formats such as
 .Fl O Ns Cm style Ns = Ns Ar really/long/link .  .Fl O Ns Cm style Ns = Ns Ar really/long/link .
 .  
 .Pp  .Pp
 The  The
 .Fl T Ns Cm html  .Fl T Ns Cm html
Line 562  font size escape documented in
Line 489  font size escape documented in
 .Xr mdoc 7  .Xr mdoc 7
 and  and
 .Xr man 7 .  .Xr man 7 .
 .  
 .Pp  .Pp
 Nesting elements within next-line element scopes of  Nesting elements within next-line element scopes of
 .Fl m Ns Cm an ,  .Fl m Ns Cm an ,
Line 575  will confuse
Line 501  will confuse
 and  and
 .Fl T Ns Cm xhtml  .Fl T Ns Cm xhtml
 and cause them to forget the formatting of the prior next-line scope.  and cause them to forget the formatting of the prior next-line scope.
 .  
 .Pp  .Pp
 The  The
 .Sq i  .Sq i
Line 583  macro in
Line 508  macro in
 .Fl m Ns Cm an  .Fl m Ns Cm an
 should italicise all subsequent text if a line argument is not provided.  should italicise all subsequent text if a line argument is not provided.
 This behaviour is not implemented.  This behaviour is not implemented.
 .  
 The  The
 .Sq \(aq  .Sq \(aq
 control character is an alias for the standard macro control character  control character is an alias for the standard macro control character

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59

CVSweb