# nroff - format documents with groff for TTY (terminal) devices - man(1) - [phpMan]

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

## Name
       nroff - format documents with _groff_ for TTY (terminal) devices

## Synopsis
       **nroff **[**-bcCEhikpRStUVz**] [**-d _**ctext_] [**-d _**string_**=_**text_] [**-K _**fallback-encoding_] [**-m _**macro-package_]
             [**-M _**macro-directory_] [**-n _**page-number_] [**-o _**page-list_] [**-P _**postprocessor-argument_]
             [**-r _**cnumeric-expression_] [**-r _**register_**=_**numeric-expression_] [**-T _**output-device_]
             [**-w _**warning-category_] [**-W _**warning-category_] [_file_ ...]

### nroff --help

### nroff -v
### nroff --version

## Description
       _nroff_  formats documents written in the [_groff_(7)](https://www.chedong.com/phpMan.php/man/groff/7/markdown) language for typewriter-like devices such as
       terminal emulators.  GNU _nroff_ emulates the AT&T _nroff_ command using [_groff_(1)](https://www.chedong.com/phpMan.php/man/groff/1/markdown).  _nroff_  gener‐
       ates  output via [_grotty_(1)](https://www.chedong.com/phpMan.php/man/grotty/1/markdown), _groff_'s terminal output driver, which needs to know the character
       encoding scheme used by the device.  Consequently, acceptable arguments to the **-T **option  are
       **ascii**, **latin1**, **utf8**, and **cp1047**; any others are ignored.  If neither the _GROFF_TYPESETTER_ en‐
       vironment  variable nor the **-T **command-line option (which overrides the environment variable)
       specifies a (valid) device, _nroff_ consults the locale to select an appropriate output device.
       It first tries the [_locale_(1)](https://www.chedong.com/phpMan.php/man/locale/1/markdown) program, then checks several  locale-related  environment  vari‐
       ables; see section “Environment” below.  If all of the foregoing fail, **-Tascii **is implied.

       The  **-b**,  **-c**, **-C**, **-d**, **-E**, **-i**, **-m**, **-M**, **-n**, **-o**, **-r**, **-U**, **-w**, **-W**, and **-z **options have the effects
       described in [_troff_(1)](https://www.chedong.com/phpMan.php/man/troff/1/markdown).  **-c **and **-h **imply “**-P-c**” and “**-P-h**”, respectively; **-c  **is  also  inter‐
       preted  directly  by  _troff_.  In addition, this implementation ignores the AT&T _nroff_ options
### -e -q -s  -k -K -p -P -R -t
### -S  -V 
       the  standard output stream, but does not execute it.  **-v **and **--version **show version informa‐
       tion about _nroff_ and the programs it runs, while **--help **displays a usage  message;  all  exit
       afterward.

## Exit status
       _nroff_  exits  with error status **2 **if there was a problem parsing its arguments, with status **0**
       if any of the options **-V**, **-v**, **--version**, or **--help **were specified, and  with  the  status  of
       _groff_ otherwise.

## Environment
       Normally, the path separator in environment variables ending with _PATH_ is the colon; this may
       vary depending on the operating system.  For example, Windows uses a semicolon instead.

       _GROFF_BIN_PATH_
              is  a  colon-separated list of directories in which to search for the _groff_ executable
              before searching in _PATH_.  If unset, _/usr/bin_ is used.

       _GROFF_TYPESETTER_
              specifies the default output device for _groff_.

       _LC_ALL_
       _LC_CTYPE_
       _LANG_
       _LESSCHARSET_
              are pattern-matched in this order for contents matching standard  character  encodings
              supported  by  _groff_ in the event no **-T **option is given and _GROFF_TYPESETTER_ is unset,
              or the values specified are invalid.

## Files
       _/usr/share/groff/1.23.0/tmac/tty-char.tmac_
              defines fallback definitions of  _roff_  special  characters.   These  definitions  more
              poorly  optically approximate typeset output than those of _tty.tmac_ in favor of commu‐
              nicating semantic information.  _nroff_ loads it automatically.

## Notes
       Pager programs like [_more_(1)](https://www.chedong.com/phpMan.php/man/more/1/markdown) and [_less_(1)](https://www.chedong.com/phpMan.php/man/less/1/markdown) may require command-line options to correctly  handle
       some output sequences; see [_grotty_(1)](https://www.chedong.com/phpMan.php/man/grotty/1/markdown).

**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), [_grotty_(1)](https://www.chedong.com/phpMan.php/man/grotty/1/markdown), [_locale_(1)](https://www.chedong.com/phpMan.php/man/locale/1/markdown), [_roff_(7)](https://www.chedong.com/phpMan.php/man/roff/7/markdown)

groff 1.23.0                                31 March 2024                                   [_nroff_(1)](https://www.chedong.com/phpMan.php/man/nroff/1/markdown)
