man.rst
changeset 1894 2e3bc2435d68
parent 1893 da0024f4f068
child 1895 91e537a35a34
equal deleted inserted replaced
1893:da0024f4f068 1894:2e3bc2435d68
     1 -*- mode: outline; coding: utf-8; -*-
       
     2 
       
     3 * Man sections.
       
     4 
       
     5   1 Executable programs or shell commands.
       
     6   2 System calls (functions provided by the kernel).
       
     7   3 Library calls (functions within program libraries).
       
     8   4 Special files (usually found in /dev).
       
     9   5 File formats and conventions eg /etc/passwd.
       
    10   6 Games.
       
    11   7 Miscellaneous (including macro  packages  and  conventions).
       
    12   8 System administration commands (usually only for root).
       
    13 
       
    14 * Invoking man.
       
    15 
       
    16 ** Search for prog, func, conf file.
       
    17 
       
    18   $ man [<section>] <item>
       
    19 
       
    20 ** Search by specific keywords.
       
    21 
       
    22   $ man -k <keywords>
       
    23 
       
    24 ** Throw Emacs.
       
    25 
       
    26   M-x man RET [<section>] <item>
       
    27 
       
    28   M-x man RET -k SPACE <keywords>
       
    29 
       
    30 * Sections order.
       
    31 
       
    32 NAME                - brief prog description
       
    33 SYNOPSIS (USAGE)    - command line options in BNF
       
    34 DESCRIPTION         - long prog description
       
    35 OPTIONS             - long option descriptions
       
    36 ... misc sections ...
       
    37 EXAMPLES
       
    38 EXIT STATUS
       
    39 ENVIRONMENT
       
    40 AVAILABILITY        - whare search source, where home page
       
    41 FILES               - list of files that has effect on program working
       
    42 AUTHORS
       
    43 COPYRIGHT
       
    44 SEE ALSO
       
    45 BUGS                - know issue, how report bug
       
    46 HISTORY
       
    47 
       
    48 * Man page showing.
       
    49 
       
    50 TODO
       
    51 Bolt by print char, back one char and print same char.
       
    52 Underscore by printing undescore, back one char and print char.
       
    53 
       
    54 * Development tools.
       
    55 
       
    56 To preview local man page:
       
    57 
       
    58   $ groff -man -Tascii foo.1            # 7-bit char
       
    59   $ groff -man -Tlatin1 foo.1           # 8-bit char
       
    60   $ groff -man -Tlatin1 foo.1 | less
       
    61   $ groff -a -mandoc -Tlatin1 e.1
       
    62   $ groff -man -Tutf8 foo.1
       
    63 
       
    64   $ man ./foo.1                         # if slashes in path - use file
       
    65 
       
    66   $ mkdir man1
       
    67   $ cp foo.1 man1
       
    68   $ man -M . 1 foo                      # without slashes search in MANPATH item
       
    69                                         # and add /man1 to each item
       
    70 
       
    71 * Output format.
       
    72 
       
    73 ** .txt.
       
    74 
       
    75   $ man foo | col -b >.foo.txt
       
    76 
       
    77 ** .ps.
       
    78 
       
    79   $ groff -Tps foo >foo.ps
       
    80 
       
    81 ** .ps.
       
    82 
       
    83   $ groff -Tps foo >foo.ps
       
    84 
       
    85 ** .dvi.
       
    86 
       
    87   $ groff -Tdvi foo >foo.dvi
       
    88