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

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

version 1.57, 2010/04/08 07:40:03 version 1.58, 2010/04/12 19:27:22
Line 26 
Line 26 
 .  .
 .Sh SYNOPSIS  .Sh SYNOPSIS
 .Nm mandoc  .Nm mandoc
 .Op Fl f Ns Ar option...  .Op Fl V
   .Op Fl f Ns Ar option
 .Op Fl m Ns Ar format  .Op Fl m Ns Ar format
 .Op Fl O Ns Ar option...  .Op Fl O Ns Ar option
 .Op Fl T Ns Ar output  .Op Fl T Ns Ar output
 .Op Fl V  .Op Fl W Ns Ar err
 .Op Fl W Ns Ar err...  .Op Ar file...
 .Op Ar infile...  
 .  .
 .  .
 .Sh DESCRIPTION  .Sh DESCRIPTION
Line 44  manual pages for display.
Line 44  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
Line 56  See
Line 56  See
 .Sx Input Formats  .Sx Input Formats
 for available formats.  for available formats.
 Defaults to  Defaults to
 .Fl m Ns Ar 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
Line 70  See
Line 70  See
 .Sx Output Formats  .Sx Output Formats
 for available formats.  for available formats.
 Defaults to  Defaults to
 .Fl T Ns Ar 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
 .Fl W Ns Ar all  .Fl W Ns Cm all
 to print warnings,  to print warnings,
 .Fl W Ns Ar error  .Fl W Ns Cm error
 for warnings to be considered errors and cause utility  for warnings to be considered errors and cause utility
 termination.  termination.
 Multiple  Multiple
 .Fl W  .Fl W
 arguments may be comma-separated, such as  arguments may be comma-separated, such as
 .Fl W Ns Ar error,all .  .Fl W Ns Cm error , Ns Cm all .
 .  .
 .It Ar infile...  .It Ar file
 Read input from zero or more  Read input from zero or more files.
 .Ar infile .  
 If unspecified, reads from stdin.  If unspecified, reads from stdin.
 If multiple files are specified,  If multiple files are specified,
 .Nm  .Nm
Line 105  reads
Line 104  reads
 or  or
 .Xr man 7  .Xr man 7
 text from stdin, implying  text from stdin, implying
 .Fl m Ns Ar andoc ,  .Fl m Ns Cm andoc ,
 and produces  and produces
 .Fl T Ns Ar ascii  .Fl T Ns Cm ascii
 output.  output.
 .  .
 .Pp  .Pp
Line 122  utility accepts
Line 121  utility accepts
 and  and
 .Xr man 7  .Xr man 7
 input with  input with
 .Fl m Ns Ar doc  .Fl m Ns Cm doc
 and  and
 .Fl m Ns Ar an ,  .Fl m Ns Cm an ,
 respectively.  respectively.
 The  The
 .Xr mdoc 7  .Xr mdoc 7
Line 136  should only be used for legacy manuals.
Line 135  should only be used for legacy manuals.
 .  .
 .Pp  .Pp
 A third option,  A third option,
 .Fl m Ns Ar andoc ,  .Fl m Ns Cm andoc ,
 which is also the default, determines encoding on-the-fly: if the first  which is also the default, determines encoding on-the-fly: if the first
 non-comment macro is  non-comment macro is
 .Sq \&Dd  .Sq \&Dd
Line 151  parser is used.
Line 150  parser is used.
 .Pp  .Pp
 If multiple  If multiple
 files are specified with  files are specified with
 .Fl m Ns Ar andoc ,  .Fl m Ns Cm andoc ,
 each has its file-type determined this way.  each has its file-type determined this way.
 If multiple files are  If multiple files are
 specified and  specified and
 .Fl m Ns Ar doc  .Fl m Ns Cm doc
 or  or
 .Fl m Ns Ar an  .Fl m Ns Cm an
 is specified, then this format is used exclusively.  is specified, then this format is used exclusively.
 .  .
 .  .
Line 170  arguments (see
Line 169  arguments (see
 .Sx OUTPUT ) :  .Sx OUTPUT ) :
 .  .
 .Bl -tag -width Ds  .Bl -tag -width Ds
 .It Fl T Ns Ar 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
 styles.  styles.
 This is the default.  This is the default.
 See  See
 .Sx ASCII Output .  .Sx ASCII Output .
 .  .
 .It Fl T Ns Ar 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 Ar xhtml  .It Fl T Ns Cm lint
 Produce strict XHTML-1.0 output, with a sane default style.  
 See  
 .Sx XHTML Output .  
 .  
 .It Fl T Ns Ar tree  
 Produce an indented parse tree.  
 .  
 .It Fl T Ns Ar lint  
 Parse only: produce no output.  Parse only: produce no output.
 Implies  Implies
 .Fl W Ns Ar all  .Fl W Ns Cm all
 and  and
 .Fl f Ns Ar strict .  .Fl f Ns Cm strict .
   .
   .It Fl T Ns Cm tree
   Produce an indented parse tree.
   .
   .It Fl T Ns Cm xhtml
   Produce strict XHTML-1.0 output, with a sane default style.
   See
   .Sx XHTML Output .
 .El  .El
 .  .
 .Pp  .Pp
Line 209  Default compiler behaviour may be overridden with the
Line 208  Default compiler behaviour may be overridden with the
 flag.  flag.
 .  .
 .Bl -tag -width Ds  .Bl -tag -width Ds
 .It Fl f Ns Ar ign-scope  .It Fl f Ns Cm ign-errors
   When parsing multiple files, don't halt when one errors out.
   Useful with
   .Fl T Ns Cm lint
   over a large set of manuals passed on the command line.
   .
   .It Fl f Ns Cm ign-escape
   Ignore invalid escape sequences.
   This is the default, but the option can be used to override an earlier
   .Fl f Ns Cm strict .
   .
   .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 Ar ign-escape  .It Fl f Ns Cm no-ign-chars
 Ignore invalid escape sequences.  Do not ignore disallowed characters.
 This is the default, but the option can be used to override an earlier  
 .Fl f Ns Ar strict .  
 .  .
 .It Fl f Ns Ar no-ign-escape  .It Fl f Ns Cm no-ign-escape
 Don't ignore invalid escape sequences.  Do not ignore invalid escape sequences.
 .  .
 .It Fl f Ns Ar 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 Ar no-ign-chars  .It Fl f Ns Cm strict
 Do not ignore disallowed characters.  
 .  
 .It Fl f Ns Ar strict  
 Implies  Implies
 .Fl f Ns Ar no-ign-escape ,  .Fl f Ns Cm no-ign-escape ,
 .Fl f Ns Ar no-ign-macro  .Fl f Ns Cm no-ign-macro ,
 and  and
 .Fl f Ns Ar no-ign-chars .  .Fl f Ns Cm no-ign-chars .
 .  
 .It Fl f Ns Ar ign-errors  
 When parsing multiple files, don't halt when one errors out.  
 Useful with  
 .Fl T Ns Ar lint  
 over a large set of manuals passed on the command line.  
 .El  .El
 .  .
 .  .
Line 249  For the time being, only
Line 248  For the time being, only
 .Fl T Ns Ar html  .Fl T Ns Ar html
 and  and
 .Fl T Ns Ar xhtml  .Fl T Ns Ar xhtml
 accepts output options:  accept output options:
 .Bl -tag -width Ds  .Bl -tag -width Ds
 .It Fl O Ns Ar style=style.css  .It Fl O Ns Cm includes Ns = Ns Ar fmt
 The file  
 .Ar style.css  
 is used for an external style-sheet.  
 This must be a valid absolute or  
 relative URI.  
 .It Fl O Ns Ar includes=fmt  
 The string  The string
 .Ar fmt ,  .Ar fmt ,
 for example,  for example,
Line 270  Instances of
Line 263  Instances of
 are replaced with the include filename.  are replaced with the include filename.
 The default is not to present a  The default is not to present a
 hyperlink.  hyperlink.
 .It Fl O Ns Ar man=fmt  .It Fl O Ns Cm man Ns = Ns Ar fmt
 The string  The string
 .Ar fmt ,  .Ar fmt ,
 for example,  for example,
Line 286  are replaced with the linked manual's name and section
Line 279  are replaced with the linked manual's name and section
 If no section is included, section 1 is assumed.  If no section is included, section 1 is assumed.
 The default is not to  The default is not to
 present a hyperlink.  present a hyperlink.
   .It Fl O Ns Cm style Ns = Ns Ar style.css
   The file
   .Ar style.css
   is used for an external style-sheet.
   This must be a valid absolute or
   relative URI.
 .El  .El
 .  .
 .  .
Line 342  however, these rules are also applied to macro argumen
Line 341  however, these rules are also applied to macro argumen
 .  .
 .Ss ASCII Output  .Ss ASCII Output
 Output produced by  Output produced by
 .Fl T Ns Ar ascii ,  .Fl T Ns Cm ascii ,
 which is the default, is rendered in standard 7-bit ASCII documented in  which is the default, is rendered in standard 7-bit ASCII documented in
 .Xr ascii 7 .  .Xr ascii 7 .
 .Pp  .Pp
Line 367  exceed this limit.
Line 366  exceed this limit.
 .  .
 .Ss HTML Output  .Ss HTML Output
 Output produced by  Output produced by
 .Fl T Ns Ar html  .Fl T Ns Cm html
 conforms to HTML-4.01 strict.  conforms to HTML-4.01 strict.
 .Pp  .Pp
 Font styles and page structure are applied using CSS2.  Font styles and page structure are applied using CSS2.
Line 379  The
Line 378  The
 .Pa example.style.css  .Pa example.style.css
 file documents the range of styles applied to output and, if used, will  file documents the range of styles applied to output and, if used, will
 cause rendered documents to appear as they do in  cause rendered documents to appear as they do in
 .Fl T Ns Ar 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 Ar xhtml  .Fl T Ns Cm xhtml
 conforms to XHTML-1.0 strict.  conforms to XHTML-1.0 strict.
 .Pp  .Pp
 See  See
Line 399  output modes are identical.
Line 398  output modes are identical.
 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
 as the style-sheet:  as the style-sheet:
 .Pp  .Pp
 .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
Line 429  Each input and output format is separately noted.
Line 428  Each input and output format is separately noted.
 The  The
 .Sq \e~  .Sq \e~
 special character doesn't produce expected behaviour in  special character doesn't produce expected behaviour in
 .Fl T Ns Ar ascii .  .Fl T Ns Cm ascii .
 .  .
 .It  .It
 The  The
Line 439  and
Line 438  and
 macros of  macros of
 .Xr mdoc 7  .Xr mdoc 7
 in  in
 .Fl T Ns Ar ascii  .Fl T Ns Cm ascii
 are synonyms, as are \-filled and \-ragged.  are synonyms, as are \-filled and \-ragged.
 .  .
 .It  .It
Line 455  This behaves correctly in
Line 454  This behaves correctly in
 .Nm .  .Nm .
 .  .
 .It  .It
 A list or display following  A list or display following the
 .Sq \&Ss  .Sq \&Ss
 .Xr mdoc 7  .Xr mdoc 7
 macro in  macro in
 .Fl T Ns Ar 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 .
 .  .
Line 468  The
Line 467  The
 .Sq \&na  .Sq \&na
 .Xr man 7  .Xr man 7
 macro in  macro in
 .Fl T Ns Ar ascii  .Fl T Ns Cm ascii
 has no effect.  has no effect.
 .  .
 .It  .It
Line 532  utility was written by
Line 531  utility was written by
 .  .
 .Sh CAVEATS  .Sh CAVEATS
 The  The
 .Fl T Ns Ar html  .Fl T Ns Cm html
 and  and
 .Fl T Ns Ar xhtml  .Fl T Ns Cm xhtml
 CSS2 styling used for  CSS2 styling used for
 .Fl m Ns Ar 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 Ar html  .Fl T Ns Cm html
 and  and
 .Fl T Ns Ar xhtml ,  .Fl T Ns Cm xhtml ,
 the maximum size of an element attribute is determined by  the maximum size of an element attribute is determined by
 .Dv BUFSIZ ,  .Dv BUFSIZ ,
 which is usually 1024 bytes.  which is usually 1024 bytes.
 Be aware of this when setting long link  Be aware of this when setting long link
 formats, e.g.,  formats such as
 .Fl O Ns Ar style=really/long/link .  .Fl O Ns Cm style Ns = Ns Ar really/long/link .
 .  .
 .Pp  .Pp
 The  The
 .Fl T Ns Ar html  .Fl T Ns Cm html
 and  and
 .Fl T Ns Ar xhtml  .Fl T Ns Cm xhtml
 output modes don't render the  output modes don't render the
 .Sq \es  .Sq \es
 font size escape documented in  font size escape documented in
Line 566  and
Line 565  and
 .  .
 .Pp  .Pp
 Nesting elements within next-line element scopes of  Nesting elements within next-line element scopes of
 .Fl m Ns Ar an ,  .Fl m Ns Cm an ,
 such as  such as
 .Sq br  .Sq br
 within an empty  within an empty
 .Sq B ,  .Sq B ,
 will confuse  will confuse
 .Fl T Ns Ar html  .Fl T Ns Cm html
 and  and
 .Fl T Ns Ar 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
 macro in  macro in
 .Fl m Ns Ar 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.
 .  .

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

CVSweb