groff command examples

groff command examples

groff – front-end for the groff document formatting system

The following example illustrates the power of the groff program as a wrapper around troff.

To process a roff file using the preprocessors tbl and pic and the me macro set, classical troff had to be called by

pic foo.me | tbl | troff -me -Tlatin1 | grotty

Using groff, this pipe can be shortened to the equivalent command

 groff -p -t -me -T latin1 foo.me

An even easier way to call this is to use grog(1) to guess the preprocessor and macro options and execute the generated command (by using backquotes to specify shell command substitution)

`grog -Tlatin1 foo.me`

The simplest way is to view the contents in an automated way by calling

groffer foo.me

 

Leave a Reply

Your email address will not be published. Required fields are marked *