# grotty(1) - man - phpman

[GROTTY(1)](https://www.chedong.com/phpMan.php/man/GROTTY/1/markdown)                              General Commands Manual                             [GROTTY(1)](https://www.chedong.com/phpMan.php/man/GROTTY/1/markdown)



## NAME
       grotty - groff driver for typewriter-like devices

## SYNOPSIS
       **grotty** [**-bBcdfhioruUv**] [**-F** _dir_] [_file_ ...]

## DESCRIPTION
       **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 -Tcp1047 -Tutf8
       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  dif‐
       ferent background and foreground colors; additionally, bold and italic attributes can be used
       _a_a_t_t _t_t_h_h_e_e _s_s_a_a_m_m_e_e _t_t_i_i_m_m_e_e (by using the BI font).

       The following colors are defined in **tty.tmac**: black, white, red,  green,  blue,  yellow,  ma‐
       genta,  cyan.  Unknown colors are mapped to the default color (which is dependent on the set‐
       tings 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 se‐
       quence “_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).

       (Debian-specific: The old behaviour is the default when using the **man** and  **mdoc**  macro  pack‐
       ages,  because  most pagers either fail to cope with SGR escape sequences or need special op‐
       tions to do so.  SGR output can be re-enabled permanently by editing _/etc/groff/man.local_ and
       _/etc/groff/mdoc.local_,  or temporarily by setting the _GROFF_SGR_ environment variable to some‐
       thing non-empty.)

       For SGR support, it is necessary to use the **-R** option of [**less**(1)](https://www.chedong.com/phpMan.php/man/less/1/markdown) to disable  the  interpreta‐
       tion  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)](https://www.chedong.com/phpMan.php/man/man/1/markdown) 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 con‐
       figuration file of **man** in a similar fashion.  Note that with some [**man**(1)](https://www.chedong.com/phpMan.php/man/man/1/markdown) 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)](https://www.chedong.com/phpMan.php/man/ul/1/markdown).  Pagers
       such as [**more**(1)](https://www.chedong.com/phpMan.php/man/more/1/markdown) or [**less**(1)](https://www.chedong.com/phpMan.php/man/less/1/markdown) are also able to display these sequences.  Use  either  **-B**  or  **-U**
       when  piping  into  [**less**(1)](https://www.chedong.com/phpMan.php/man/less/1/markdown); use **-b** when piping into [**more**(1)](https://www.chedong.com/phpMan.php/man/more/1/markdown).  There is no need to filter the
       output through [**col**(1)](https://www.chedong.com/phpMan.php/man/col/1/markdown) since **grotty** never outputs reverse line feeds.

       The font description file may contain a command

              **internalname** _n_

       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 en‐
       coding.  Otherwise, it emits characters in a single-byte encoding depending on  the  data  in
       the font description files.  See the **groff**___**[font**(5)](https://www.chedong.com/phpMan.php/man/font/5/markdown) man page for more details.

## OPTIONS
       Whitespace is permitted between a command-line option and its argument.

### -b -c

### -B -c

### -c
              bian-specific: This option is enabled by default when using the  **man**  and  **mdoc**  macro
              packages.   It  can be disabled by default permanently by editing _/etc/groff/man.local_
              and _/etc/groff/mdoc.local_, or temporarily by setting the _GROFF_SGR_  environment  vari‐
              able to something non-empty.)

### -d
              least one zero argument (and so are either horizontal or vertical) using **-**, **|**,  and  **+**
              characters.  In a similar way, **grotty** handles **\D'p...'** commands which consist entirely
              of horizontal and vertical lines.

### -f
              no output on its last line.

### -F
              files; _name_ is the name of the device, usually **ascii**, **latin1**, **utf8**, or **cp1047**.

### -h

### -i
              bute  for  italic  fonts  (‘I’  and ‘BI’).  Note that most terminals (including xterm)
              don't support this.  Ignored if **-c** is active.

### -o
              output format has been activated with **-c**).

### -r
              bute for italic fonts (‘I’ and ‘BI’).  Ignored if **-c** is active.

### -u -c

### -U -c

### -v

## USAGE
       **grotty** understands a single X command produced using the **\X** escape sequence.

       **\X'tty:** **sgr** _n_**'**
              If _n_ is non-zero or missing, enable SGR output (this is the  default),  otherwise  use
              the old drawing scheme for bold and underline.

## ENVIRONMENT
       _GROFF_NO_SGR_
              If  set, the old drawing scheme for bold and underline (using the backspace character)
              is active.  Colors are disabled.

       _GROFF_FONT_PATH_
              A list of directories in which to search for the _dev_name directory in addition to  the
              default ones.  See [**troff**(1)](https://www.chedong.com/phpMan.php/man/troff/1/markdown) and **groff**___**[font**(5)](https://www.chedong.com/phpMan.php/man/font/5/markdown) for more details.

## FILES
       _/usr/share/groff/1.22.4/font/devascii/DESC_
              Device description file for the **ascii** device.

       _/usr/share/groff/1.22.4/font/devascii/_F
              Font description file for font _F_ of the **ascii** device.

       _/usr/share/groff/1.22.4/font/devlatin1/DESC_
              Device description file for the **latin1** device.

       _/usr/share/groff/1.22.4/font/devlatin1/_F
              Font description file for font _F_ of the **latin1** device.

       _/usr/share/groff/1.22.4/font/devutf8/DESC_
              Device description file for the **utf8** device.

       _/usr/share/groff/1.22.4/font/devutf8/_F
              Font description file for font _F_ of the **utf8** device.

       _/usr/share/groff/1.22.4/font/devcp1047/DESC_
              Device description file for the **cp1047** device.

       _/usr/share/groff/1.22.4/font/devcp1047/_F
              Font description file for font _F_ of the **cp1047** device.

       _/usr/share/groff/1.22.4/tmac/tty.tmac_
              Macros for use with **grotty**.

       _/usr/share/groff/1.22.4/tmac/tty-char.tmac_
              Additional character definitions for use with **grotty**.

       Note that on EBCDIC hosts, only files for the **cp1047** device is installed.

## BUGS
       **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)](https://www.chedong.com/phpMan.php/man/grops/1/markdown).  **\M** doesn't set the fill color for closed graphic ob‐
       jects (which **grotty** doesn't support anyway) but changes the background color of the character
       cell, affecting all subsequent operations.

## SEE ALSO
       [**groff**(1)](https://www.chedong.com/phpMan.php/man/groff/1/markdown),  [**troff**(1)](https://www.chedong.com/phpMan.php/man/troff/1/markdown),  **groff**___**[out**(5)](https://www.chedong.com/phpMan.php/man/out/5/markdown),  **groff**___**[font**(5)](https://www.chedong.com/phpMan.php/man/font/5/markdown),  **groff**___**[char**(7)](https://www.chedong.com/phpMan.php/man/char/7/markdown),  [**ul**(1)](https://www.chedong.com/phpMan.php/man/ul/1/markdown),  [**more**(1)](https://www.chedong.com/phpMan.php/man/more/1/markdown), [**man**(1)](https://www.chedong.com/phpMan.php/man/man/1/markdown),
       [**less**(1)](https://www.chedong.com/phpMan.php/man/less/1/markdown)



groff 1.22.4                                23 March 2022                                  [GROTTY(1)](https://www.chedong.com/phpMan.php/man/GROTTY/1/markdown)
