Previous: , Up: Invoking groff   [Contents][Index]


2.6 Invocation Examples

This section lists several common uses of groff and the corresponding command lines.

groff file

This command processes file without a macro package or a preprocessor. The output device is the default, ‘ps’, and the output is sent to stdout.

groff -t -mandoc -Tascii file | less

This is basically what a call to the man program does. gtroff processes the manual page file with the mandoc macro file (which in turn either calls the man or the mdoc macro package), using the tbl preprocessor and the ASCII output device. Finally, the less pager displays the result.

groff -X -m me file

Preview file with gxditview, using the me macro package. Since no -T option is specified, use the default device (‘ps’). Note that you can either say ‘-m me or ‘-me; the latter is an anachronism from the early days of UNIX.3

groff -man -rD1 -z file

Check file with the man macro package, forcing double-sided printing – don’t produce any output.