Print this page
feedback from Hans
   1 .\"
   2 .\" Permission to use, copy, modify, and distribute this software for any
   3 .\" purpose with or without fee is hereby granted, provided that the above
   4 .\" copyright notice and this permission notice appear in all copies.
   5 .\"
   6 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
   7 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
   8 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
   9 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  10 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  11 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  12 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  13 .\"
  14 .\"
  15 .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  16 .\" Copyright 2012 Nexenta Systems, Inc. All rights reserved.
  17 .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
  18 .\"
  19 .Dd Jul 13, 2014
  20 .Dt MANDOC 1
  21 .Os
  22 .Sh NAME
  23 .Nm mandoc
  24 .Nd format and display UNIX manuals
  25 .Sh SYNOPSIS
  26 .Nm mandoc
  27 .Op Fl V
  28 .Op Fl m Ns Ar format
  29 .Op Fl O Ns Ar option
  30 .Op Fl T Ns Ar output
  31 .Op Fl W Ns Ar level
  32 .Op Ar
  33 .Sh DESCRIPTION
  34 The
  35 .Nm
  36 utility formats
  37 .Ux
  38 manual pages for display.
  39 .Pp


 442 A fatal parsing error occurred.
 443 .It 5
 444 Invalid command line arguments were specified.
 445 No input files have been read.
 446 .It 6
 447 An operating system error occurred, for example memory exhaustion or an
 448 error accessing input files.
 449 Such errors cause
 450 .Nm
 451 to exit at once, possibly in the middle of parsing or formatting a file.
 452 .El
 453 .Pp
 454 Note that selecting
 455 .Fl T Ns Cm lint
 456 output mode implies
 457 .Fl W Ns Cm warning .
 458 .Sh EXAMPLES
 459 To page manuals to the terminal:
 460 .Pp
 461 .Dl $ mandoc \-Wall,stop mandoc.1 2\*(Gt&1 | less
 462 .Dl $ mandoc mandoc.1 mdoc.3 mdoc.7 | less
 463 .Pp
 464 To produce HTML manuals with
 465 .Ar style.css
 466 as the style-sheet:
 467 .Pp
 468 .Dl $ mandoc \-Thtml -Ostyle=style.css mdoc.7 \*(Gt mdoc.7.html
 469 .Pp
 470 To check over a large set of manuals:
 471 .Pp
 472 .Dl $ mandoc \-Tlint `find /usr/src -name \e*\e.[1-9]`
 473 .Pp
 474 To produce a series of PostScript manuals for A4 paper:
 475 .Pp
 476 .Dl $ mandoc \-Tps \-Opaper=a4 mdoc.7 man.7 \*(Gt manuals.ps
 477 .Pp
 478 Convert a modern
 479 .Xr mdoc 5
 480 manual to the older
 481 .Xr man 5
 482 format, for use on systems lacking an
 483 .Xr mdoc 5
 484 parser:
 485 .Pp
 486 .Dl $ mandoc \-Tman foo.mdoc \*(Gt foo.man
 487 .Sh DIAGNOSTICS
 488 Standard error messages reporting parsing errors are prefixed by
 489 .Pp
 490 .Sm off
 491 .D1 Ar file : line : column : \ level :
 492 .Sm on
 493 .Pp
 494 where the fields have the following meanings:
 495 .Bl -tag -width "column"
 496 .It Ar file


 614 mode, this will work fine.
 615 .It
 616 The
 617 .Xr mdoc 5
 618 .Sq \&Bl \-hang
 619 and
 620 .Sq \&Bl \-tag
 621 list types render similarly (no break following overreached left-hand
 622 side) due to the expressive constraints of HTML.
 623 .It
 624 The
 625 .Xr man 5
 626 .Sq IP
 627 and
 628 .Sq TP
 629 lists render similarly.
 630 .El
 631 .Sh INTERFACE STABILITY
 632 The
 633 .Nm 
 634 utility is Committed, but the details of specific output formats other than
 635 ASCII are Uncommitted.


 636 .Sh SEE ALSO
 637 .Xr eqn 5 ,
 638 .Xr man 5 ,
 639 .Xr mandoc_char 5 ,
 640 .Xr mdoc 5 ,
 641 .Xr mandoc_roff 5 ,
 642 .Xr tbl 5
 643 .Sh AUTHORS
 644 The
 645 .Nm
 646 utility was written by
 647 .An Kristaps Dzonsons ,
 648 .Mt kristaps@bsd.lv .
 649 .Sh CAVEATS
 650 In
 651 .Fl T Ns Cm html
 652 and
 653 .Fl T Ns Cm xhtml ,
 654 the maximum size of an element attribute is determined by
 655 .Dv BUFSIZ ,


   1 .\"
   2 .\" Permission to use, copy, modify, and distribute this software for any
   3 .\" purpose with or without fee is hereby granted, provided that the above
   4 .\" copyright notice and this permission notice appear in all copies.
   5 .\"
   6 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
   7 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
   8 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
   9 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  10 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  11 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  12 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  13 .\"
  14 .\"
  15 .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  16 .\" Copyright 2012 Nexenta Systems, Inc. All rights reserved.
  17 .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
  18 .\"
  19 .Dd Jul 16, 2014
  20 .Dt MANDOC 1
  21 .Os
  22 .Sh NAME
  23 .Nm mandoc
  24 .Nd format and display UNIX manuals
  25 .Sh SYNOPSIS
  26 .Nm mandoc
  27 .Op Fl V
  28 .Op Fl m Ns Ar format
  29 .Op Fl O Ns Ar option
  30 .Op Fl T Ns Ar output
  31 .Op Fl W Ns Ar level
  32 .Op Ar
  33 .Sh DESCRIPTION
  34 The
  35 .Nm
  36 utility formats
  37 .Ux
  38 manual pages for display.
  39 .Pp


 442 A fatal parsing error occurred.
 443 .It 5
 444 Invalid command line arguments were specified.
 445 No input files have been read.
 446 .It 6
 447 An operating system error occurred, for example memory exhaustion or an
 448 error accessing input files.
 449 Such errors cause
 450 .Nm
 451 to exit at once, possibly in the middle of parsing or formatting a file.
 452 .El
 453 .Pp
 454 Note that selecting
 455 .Fl T Ns Cm lint
 456 output mode implies
 457 .Fl W Ns Cm warning .
 458 .Sh EXAMPLES
 459 To page manuals to the terminal:
 460 .Pp
 461 .Dl $ mandoc \-Wall,stop mandoc.1 2\*(Gt&1 | less
 462 .Dl $ mandoc mandoc.1 mdoc.5 | less
 463 .Pp
 464 To produce HTML manuals with
 465 .Ar style.css
 466 as the style-sheet:
 467 .Pp
 468 .Dl $ mandoc \-Thtml -Ostyle=style.css mdoc.5 \*(Gt mdoc.5.html
 469 .Pp
 470 To check over a large set of manuals:
 471 .Pp
 472 .Dl $ mandoc \-Tlint `find /usr/src -name \e*\e.[1-9]`
 473 .Pp
 474 To produce a series of PostScript manuals for A4 paper:
 475 .Pp
 476 .Dl $ mandoc \-Tps \-Opaper=a4 mdoc.5 man.5 \*(Gt manuals.ps
 477 .Pp
 478 Convert a modern
 479 .Xr mdoc 5
 480 manual to the older
 481 .Xr man 5
 482 format, for use on systems lacking an
 483 .Xr mdoc 5
 484 parser:
 485 .Pp
 486 .Dl $ mandoc \-Tman foo.mdoc \*(Gt foo.man
 487 .Sh DIAGNOSTICS
 488 Standard error messages reporting parsing errors are prefixed by
 489 .Pp
 490 .Sm off
 491 .D1 Ar file : line : column : \ level :
 492 .Sm on
 493 .Pp
 494 where the fields have the following meanings:
 495 .Bl -tag -width "column"
 496 .It Ar file


 614 mode, this will work fine.
 615 .It
 616 The
 617 .Xr mdoc 5
 618 .Sq \&Bl \-hang
 619 and
 620 .Sq \&Bl \-tag
 621 list types render similarly (no break following overreached left-hand
 622 side) due to the expressive constraints of HTML.
 623 .It
 624 The
 625 .Xr man 5
 626 .Sq IP
 627 and
 628 .Sq TP
 629 lists render similarly.
 630 .El
 631 .Sh INTERFACE STABILITY
 632 The
 633 .Nm 
 634 utility is
 635 .Nm Committed ,
 636 but the details of specific output formats other than ASCII are
 637 .Nm Uncommitted .
 638 .Sh SEE ALSO
 639 .Xr eqn 5 ,
 640 .Xr man 5 ,
 641 .Xr mandoc_char 5 ,
 642 .Xr mdoc 5 ,
 643 .Xr mandoc_roff 5 ,
 644 .Xr tbl 5
 645 .Sh AUTHORS
 646 The
 647 .Nm
 648 utility was written by
 649 .An Kristaps Dzonsons ,
 650 .Mt kristaps@bsd.lv .
 651 .Sh CAVEATS
 652 In
 653 .Fl T Ns Cm html
 654 and
 655 .Fl T Ns Cm xhtml ,
 656 the maximum size of an element attribute is determined by
 657 .Dv BUFSIZ ,