[an error occurred while processing this directive]
Groff (GNU ditroff) usage on Sun and SGI machines at the Lab
groff is the front end for the groff document
formatting system. (GNU ditroff).
groff's default device is ps (PostScript).
(You may need to use "module load groff" to make groff available.)
Sample usage
Write groff output to a PostScript file
- me macros:
groff -set -me myfile.me > myfile.ps
- ms macros:
groff -set -mgs myfile.ms > myfile.ps
Note well: "-mgs" uses the groff version of the MS ("gs") macros.
Send groff output to a PostScript printer
- me macros:
groff -set -me myfile.me | lpr -P someprinter
- ms macros:
groff -set -mgs myfile.ms | lpr -P someprinter
"someprinter" is some PostScript printer on distributed printing.
Some common flags (from "man groff")
-h Print a help message.
-e Preprocess with geqn.
-t Preprocess with gtbl.
-s Preprocess with gsoelim.
Hence, the above usage of "-set".
Landscape mode
groff -set -P-l -mgs table.ms > table-rotated.ps
N.B. "-P-l" passes the "-l" (landscape mode) flag to grops, the
PostScript driver for groff.
Helvetica fonts
-fH uses Helvetica as the default font family.
Including EPS
Include the EPS file myfile.eps where you want it to appear by
.PSPIC myfile.eps
Compatibility mode
The '-C' means "compatibility" mode.
Under "man gtroff", section "Incompatibilities", we read
"Also Unix troff will interpret \*[ or \n[ as references to a
string or number register called [. In GNU troff, however,
this will normally be interpreted as the start of a long name.
In compatibility mode GNU troff will interpret these
things in the traditional way."
Thus,
groff -set -P-l -me -fH -C abc.me > xyz
will format abc with the me macros, landscape mode,
using the Helvetica font, compatibility mode.
man page formatting
module load groff RosettaMan
man basename | rman -f roff | groff -man - | lpr -P someprinter
will print the formatted version of basename on the printer someprinter
Distributed Printing Home Page
Questions and Comments on Distributed Printing
Last modified Tue May 27 15:16:29 PDT 2003