manpages.info - online man pages   

Linux man pages : groffer (1)
GROFFER(1)							    GROFFER(1)

NAME

groffer - display groff files and man pages on X and tty

SYNOPSIS

groffer [viewing_options] [man_options] [groff_options] [--] [file- spec...] groffer -h|--help groffer -v|--version viewing_options These options determine and configure the display mode. They were synchronized with the options of both groff(1) and GNU man(1). As groff uses almost any letter in its option set, only long option names are available for most features. If none of these options is used groffer tries to find a suitable display mode automatically. [-Q|--source] [-T|--device device] [--auto-modes mode1,mode2,...] [--debug] [--default] [--dvi] [--dvi-viewer prog] [--groff] [--location] [--mode display_mode] [--pager program] [--pdf] [--pdf-viewer prog] [--ps] [--ps-viewer prog] [--shell] [--tty] [--www] [--www-viewer prog] [--x] [--x-viewer prog] The following long options were adapted from the corresponding X Toolkit options with a single leading minus; see X(1). [--bd] [--bg|--background] [--bw] [--display] [--fg|--foreground ] [--ft|--font] [--geometry size_pos] [--resolution value] [--rv ] [--title string] [--xrm X_resource] groff_options Any combination of (short) options from the groff(1) program is accepted; the options that are not explicitly handled by groffer are transparently passed to groff. Due to the automatism in groffer, none of these groff options should be necessary, except for advanced usage. Because of the special outputting behavior of the groff options -V, -X, and -Z, groffer was designed to be switched into groff mode by each of these options; in this mode, the groffer viewing features are disabled. The other groff options do not switch the mode, but allow to customize the formatting process. Useful groff formatting op- tions include -m (to add macro files that cannot be recognized by grog), and -T (to specify an alternative device for the modes tty and x). man_options These options regulate whether and how man pages are searched. They are compatible with the long options of the GNU man pro- gram. [--all] [--ascii] [--apropos] [--ditroff] [--extension suffix] [--locale language] [--local-file] [--man] [--manpath dir1:dir2:...] [--no-location] [--no-man] [--sections sec1:sec2:...] [--systems sys1,sys2,...] [--troff-device device] [--whatis] The GNU man long options that are not mentioned are recognized, but they are just ignored because of alternative implementa- tions. The full set of long and short options of the GNU man program can be passed via the environment variable $MANOPT; see man(1) if your system has GNU man installed. filespec is a sequence of file names or templates for searching man pages, see man(1). A filespec can have one of the following forms. filename the path name of an existing file. - stands for standard input (can occur several times). man:name(section) search the man page name in section section. man:name.section search the man page name in section section. man:name search the man page name in the lowest available sec- tion. name(section) search the man page name in section section. name.section search the man page name in section section. standard_section if this is `1', ..., `9', `o', or `n' try to retrieve the next argument as a man page in this section. name search for the man page name in the lowest available section. No filespec parameters means standard input. For details on the options, see section OPTIONS.

DESCRIPTION

The groffer program is part of groff(7). It can be used to display ar- bitrary documents written in the roff(7) formatting language in several different ways, in an X window viewer program or in a text terminal. The viewer programs can be chosen as the groff native viewer gxditview(1), a Postcript or dvi display program, or a web browser. A search facility for manual pages ( man pages) is provided. Almost the whole functionality of the GNU man program was provided or suitably adapted. This makes the groffer program a valuable tool on systems with a poor man system. The program always concatenates all input specified by the non-option parameters of the calling command line or standard input. Compressed standard input or files are decompressed on-the-fly. Normally, the input is run through the groff(1) text processor before being displayed. By using the option -Q, the roff source code is dis- played without formatting. The formatting process can be regulated by all options that are avail- able groff. By using the -T option, groffer can be switched to behave exactly like groff without using its viewer facilities, but additional- ly with the search and decompression features. All necessary options can be determined automatically. For example, the groffer program internally uses the grog(1) program to determine from the unformatted document which preprocessors should be run and which macro files should be included. But all parts of the program can be controlled manually by suitable options.

OPTIONS

The groffer program provides its own parser for command line options that is compatible to both POSIX getopts(1) and GNU getopt(1). The command line behaves as usually. For completeness, the details are provided here. Option Parsing The following types of options are supported, equally on all systems that are able to run the groffer program: o single character options are always preceded by a single minus char- acter, for example, -c. o the argument for a single character option is the next command line argument, for example, -o arg, or can be appended to the option character within the same argument -o arg. o clusters of such single character options without an argument, even- tually terminated by a single character option with an argument; for example, -abo arg is equivalent to -a -b -o arg . o Long options, that means option with names longer than one character are always prededed by a double minus; an option argument can either go to the next command line argument or be appended with an equal sign to the argument; for example, --long= arg is equivalent to --long arg. o An argument of -- ends option parsing; all further command line argu- ments are interpreted as filespec arguments. o By default, all command line arguments that are neither options nor option arguments are interpreted as filespec parameters and stored until option parsing has finished. For example, the command line sh# groffer file1 -a -o arg file 2 is, by default, equivalent to sh# groffer -a -o arg -- file1 file 2 o This behavior can be changed by setting the environment variable $POSIXLY_CORRECT to a non-empty value; in this case, option process- ing is stopped as soon as the first non-option argument is found. For example, in posixly correct mode, the command line sh# groffer file1 -a -o arg file 2 is equivalent to sh# groffer -- file1 -a -o arg file 2 As this leads to unwanted behavior in most cases, most people do not want to set $POSIXLY_CORRECT. Compatibility with Options from other Programs All short options of groffer are compatible with the short options of groff(1). Some of the groff options were given a special meaning with- in groffer. All other groff options are supported by groffer, but they are just transparently transferred to groff without any intervention. Therefore these transparent options are not documented here, but in groff(1). All long options of groffer are compatible with the long options of man(1). Most of the man long options were implemented as native op- tions into groffer. These options are documented in the following; the other man options are recognized, but ignored. Native groffer Options -h Print usage message to standard error and exit. -Q Output the roff source code of the input files unprocessed. This is the equivalent --mode source. -T devname Switch to --mode device, thus disabling the groffer viewing. Instead, the input is formatted and postprocessed using plain groff with devname as the output device. The allowed device names are listed in groff(1). Note that this forces all device names that begin with the letter X to be displayed with gxditview(1); all other device names generate output for the specified device; this is printed onto standard output without a pager. -v Print version information onto standard error. -V Switch into groff mode and format the input with groff option -V ; this produces the groff calling pipe without formatting the input. This an advanced option from groff(1), only useful for debugging. -X Switch into groff mode and format the input with groff option -X ; actually, this formats the input and displays it with gxditview(1). This differs from groffer's mode x because grof- fer's viewer options are not used, but the viewer is configured like in groff with the groff option -P. This option is in- hereted from groff(1). -Z Switch into groff mode and format the input with groff option -Z ; this produces the groff intermediate output without postpro- cessing; see groff_out(1). This an advanced option from groff(1), useful for debugging. --all In searching man pages, retrieve all suitable ones instead of only one. --apropos Instead of displaying, start the `apropos' command for searching within man page descriptions; only kept for compatibility with `man'. --auto-modes mode1,mode2,... Set the sequence of modes for default mode to the comma separat- ed list given in the argument. --background color This is equivalent to --bg. --bd pixels Specifies the color of the border surrounding the viewer window. This is an adaption of the X Toolkit option -bd. The argument is an X color name, see (1) for details. --bg color Set the background color of the viewer window. This is an adap- tion of the X Toolkit option -bg. The argument is an X color name, see (1) for details. --bw pixels Specifies the width in pixels of the border surrounding the viewer window (not available for all viewers). This is an adap- tion of the X Toolkit option -bw. --debug Print debugging information. Actually, a function call stack is printed if an error occurs. --default Reset all configuration from previously processed command line options to the default values. This is useful to wipe out all effects of former options and restart option processing using only the rest of the command line. --device Eqivalent to -T. --display X-display Set the X display on which the viewer program shall be started, see X(1) for the syntax of the argument. --ditroff Eqivalent to -Z. This is kept for compatibiliy with GNU man(1). --dvi Choose dvi mode; the formatted input is displayed with the by default, the formatted input is displayed with the xdvi(1) pro- gram. --dvi-viewer prog Set the viewer program for dvi mode. This can be a file name or a program to be searched in $PATH. Known dvi viewers inlude xd- vi(1) and dvilx(1) In each case, arguments can be provided addi- tionally. --extension suffix Restrict man page search to file names that have suffix appended to their section element. For example, in the file name /usr/share/man/man3/terminfo.3ncurses.gz the man page extension is ncurses. Originates from GNU man. --foreground color This is equivalent to -fg. --fg color Set the foreground color of the viewer window. This is an adap- tion of the X Toolkit option -bg. The argument is an X color name, see (1) for details. --font font_name This is equivalent to -ft. --ft font_name Set the font used by the viewer window. This is an adaption of the X Toolkit option -ft. The argument is an X font name, see (1) for details. --geometry size_pos Set the geometry of the display window, that means its size and its starting position. See X(1) for details on the syntax of the argument. If the actual display mode is not X then this op- tion is ignored. --groff Set groff mode. Switch groffer to process the input like groff(1). This disables the groffer viewing features, all grof- fer viewing options are ignored. --help Eqivalent to -h. --location Print the location of the retrieved files to standard error. --locale language Set the language for man pages. This option originates from GNU man(1). --man Check the non-option command line arguments (filespecs) first on being man pages, then whether they represent an existing file. By default, a filespec is first tested if it is an existing file. --manpath 'dir1:dir2:...' Use the specified search path for retrieving man pages instead of the program defaults. If the argument is set to the empty string "" the search for man page is disabled. --mode value Set the display mode. The following mode values are recognized: auto Display in the default manner; this actually means to try the modes ps, x, and tty in this sequence. Useful for restoring default mode when a different mode was speci- fied with $GROFFER_OPT. dvi Display formatted input in a dvi viewer program; equiva- lent to --dvi. pdf Display formatted input in a PDF (Portable Document For- mat) viewer program; equivalent to --pdf. ps Display formatted input in a Postscript viewer program; equivalent to --ps. tty Display formatted input in a text terminal; equivalent to --tty. www Display formatted input in a internet browser program; equivalent to --www. x Display formatted input in a native roff viewer such as gxditview(1);equivalentto --x. The following modes do not use the groffer viewing features. They are only interesting for advanced applications. groff Generate device output with plain groff without using the special viewing features of groffer. If no device was specified by option -T the groff default ps is assumed. source Display source code; same as -Q. --no-location Do not display the location of retireved files; this resets a former call to --location. --no-man Do not check for man pages. --pager Set the pager program in tty mode; default is less. --pdf Choose pdf mode (Portable Document Format). By default, the in- put is formatted by groff using the Postscript device, then it is transformed into the PDF file format using gs(1) (this is quite slow), and finally displayed either with the xpdf(1) or the acroread(1) program; this can be configured with option --viewer-pdf. PDF has a big advantage because the text is dis- played graphically and is searchable nevertheless; but as thtransformation into pdf takes a considerable amount of time, the pdf mode is not suitable as a default device for the auto mode. The only device that is compatible to this mode is ps, which is also the default when no device is specified. --pdf-viewer prog Set the viewer program for pdf mode. This can be a file name or a program to be searched in $PATH. In each case, arguments can be provided additionally. --ps Choose ps mode (Postscript). By default, the formatted input is displayed with the ghostview(1) program; this can be configured with option --viewer-ps. The only device that is compatible to this mode is ps, which is also the default when no device is specified. --ps-viewer prog Set the viewer program for ps mode. This can be a file name or a program to be searched in $PATH. Common Postscript viewers inlude gv(1), ghostview(1), and gs(1), In each case, arguments can be provided additionally. --resolution value Set X resolution in dpi (dots per inch) in some viewer programs. The only supported dpi values are 75 and 100. This is an adap- tion of the X Toolkit option -resolution. --rv Reverse foreground and background color of the viewer window. This is an adaption of the X Toolkit option -rv. This feature is not available in all viewer programs. --sections Restrict searching for man pages to the given sections, a colon- separated list. --shell shell_program Specify the shell under which the groffer script should be run. The script first tests whether this option is set (either within $GROFF_OPT or as a command line option); if so, the script is rerun under the shell program specified with the option argu- ment. --source Equivalent to -Q. --systems Search for man pages for the given operating systems; the argu- ment systems is a comma-separated list. --title 'some text' Set the title for the viewer window. This feature is not avail- able in all viewer programs. --to-postproc opt_or_arg Eqivalent to -P. --troff-device Eqivalent to -T. This option is only kept for compatibility with GNU man(1). --tty Choose tty display mode, that means displaying in a text pager even when in X; eqivalent to --mode tty. --version Eqivalent to -v. --whatis Instead of displaying the content, get the one-liner description from the retrieved man page files