GROTTY(1) | General Commands Manual | GROTTY(1) |
grotty - groff driver for typewriter-like devices
grotty |
[-bBcdfhioruUv] [-F dir] [file ...] |
grotty translates the output of GNU troff into a form suitable for typewriter-like devices. Normally grotty should be invoked by using the groff command with a -Tascii, -Tlatin1 or -Tutf8 option on ASCII based systems, and with -Tcp1047 and -Tutf8 on EBCDIC based hosts. If no files are given, grotty reads the standard input. A filename of - also causes grotty to read the standard input. Output is written to the standard output.
By default, 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 background and foreground colors; additionally, bold and italic attributes can be used 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).
Use the -c switch to revert to the old behaviour, printing a bold character c with the sequence “c BACKSPACE c” and an italic character c by the sequence “_ BACKSPACE 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 less(1) to disable the interpretation of grotty's old output format. Consequently, all programs which use less as the pager program have to pass this option to it. For man(1) in particular, either add -R to the PAGER environment variable, e.g.
PAGER="/usr/bin/less -R"
export PAGER
or use the -P option of man to set the pager executable and its options, or modify the configuration file of man in a similar fashion. Note that with some man(1) versions, you have to use the MANPAGER environment variable instead.
grotty's old output format can be displayed on a terminal by piping through ul(1). Pagers such as more(1) or less(1) are also able to display these sequences. Use either -B or -U when piping into less(1); use -b when piping into more(1). There is no need to filter the output through col(1) since grotty never outputs reverse line feeds.
The font description file may contain a command
where n is a decimal integer. If the 01 bit in n is set, then the font is treated as an italic font; if the 02 bit is set, then it is treated as a bold font. The code field in the font description field gives the code which is used to output the character. This code can also be used in the \N escape sequence in troff.
If the DESC file contains the keyword unicode, grotty emits Unicode characters in UTF-8 encoding. Otherwise, it emits characters in a single-byte encoding depending on the data in the font description files. See the groff_font(5) man page for more details.
Whitespace is permitted between a command-line option and its argument.
grotty understands a single X command produced using the \X escape sequence.
Note that on EBCDIC hosts, only files for the cp1047 device is installed.
grotty is intended only for simple documents.
There is no support for fractional horizontal or vertical motions.
There is no support for \D commands other than horizontal and vertical lines.
Characters above the first line (i.e. with a vertical position of 0) cannot be printed.
Color handling differs from grops(1). \M doesn't set the fill color for closed graphic objects (which grotty doesn't support anyway) but changes the background color of the character cell, affecting all subsequent operations.
groff(1), troff(1), groff_out(5), groff_font(5), groff_char(7), ul(1), more(1), man(1), less(1)
19 March 2021 | groff 1.22.4 |