grotty translates the output of GNU
troff into a form suitable for typewriter-like devices.
grotty should be invoked by using the
-Tutf8 option on ASCII based systems, and with
-Tutf8 on EBCDIC based hosts.
If no files are given,
grotty will read the standard input.
A filename of
- will also cause
grotty to read the standard input.
Output is written to the standard output.
grotty emits SGR escape sequences (from ISO 6429, also called ANSI color escapes)
to change text attributes (bold, italic, colors).
This makes it possible to have eight different [green]background
and [red]foreground colors; additionally, bold and italic
attributes can be used BI]at the same time] (by using the BI font).
The following colors are defined in
tty.tmac: black, white, red, green, blue, yellow, magenta, cyan.
Unknown colors are mapped to the default color (which is dependent on the
settings of the terminal; in most cases, this is black for the foreground
and white for the background).
-c switch to revert to the old behaviour, printing a bold character
c with the sequence
c and an italic character
c by the sequence
c. At the same time, color output is disabled.
The same effect can be achieved by setting either the
GROFF_NO_SGR environment variable or using the sgr X command (see below).
For SGR support, it is necessary to use the
-R option of
to disable the interpretation of
grottys old output format.
Consequently, all programs which use
less as the pager program have to pass this option to it.
in particular, either add
-R to the
$PAGER environment variable, e.g.
PAGER= /usr/bin/less -R
or use the
-P option of
man to set the pager executable and its options, or modify the configuration
man in a similar fashion.
grottys old output format can be displayed on a terminal
by piping through
Pagers such as
are also able to display these sequences.
-U when piping into
-b when piping into
There is no need to filter the output through
grotty never outputs reverse line feeds.
The font description file may contain a command
n is a decimal integer.
If the 01 bit in
n is set,
then the font will be treated as an italic font;
if the 02 bit is set,
then it will be treated as a bold font.
The code field in the font description field gives the
code which will be used to output the character.
This code can also be used in the
[rs]N escape sequence in
grotty is intended only for simple documents.
There is no support for fractional horizontal or vertical motions.
There is no support for
other than horizontal and vertical lines.
Characters above the first line (ie with a vertical position of~0)
cannot be printed.
Color handling is different compared to
[rs]M doesnt set the fill color for closed graphic objects (which
grotty doesnt support anyway) but changes the background color of the character
cell, affecting all subsequent operations.