# nroff

## Name



           nroff - format documents with _groff_ for terminal (“TTY”) devices
    


## Synopsis



           **nroff**[**-abcCEhikpRStUVzZ**] [**-d** _ctext_] [**-d** _string_**=**_text_]
                 [**-D** _fallback-input-encoding_] [**-I** _inclusion-directory_]
                 [**-K** _input-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**[_other-nroff-option_ ...]
    
           **nroff --version**[_other-nroff-option_ ...]
    


## Description



           _nroff_ formats documents written in the _groff_(7) language for
           typewriter-like devices such as terminal emulators.  GNU _nroff_
           emulates the AT&T _nroff_ command using _groff_(1).  _nroff_ generates
           output via _grotty_(1), _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** , and **utf8** ; any others are ignored.  If neither the
           _GROFF_TYPESETTER_ environment 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) program, then checks
           several locale-related environment variables; see section
           “Environment” below.  If all of the foregoing fail, _nroff_ assumes
           “**-T ascii** ”.
    
           The **-a** , **-b** , **-c** , **-C** , **-d** , **-E** , **-i** , **-I** , **-m** , **-M** , **-n** , **-o** , **-r** , **-U** , **-w** ,
           **-W** , and **-z** options have the effects described in _troff_(1).  **-c** and
           **-h** imply “**-P -c** ” and “**-P -h** ”, respectively; **-c** is also meaningful
           to _troff_ itself.  Further, GNU _nroff_ ignores the AT&T _nroff_
           options **-e** , **-q** , and **-s**.  _groff_(1) documents options **-D** , **-k** , **-K** ,
           **-p** , **-P** , **-R** , **-t** , **-S** , and **-Z**.  **-V** causes _nroff_ to display the
           constructed _groff_ command on the standard output stream, but does
           not execute it.  **-v** and **--version** show version information about
           _nroff_ and the programs it runs, while **--help** displays a usage
           message; all exit afterward.
    


## Exit status



           _nroff_ exits with 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_
                  Locate _groff_ commands in these directories, followed by
                  those in _PATH_.  If not set, the installation directory of
                  GNU _roff_ executables, _/usr/local/bin_ , is searched before
                  _PATH_.
    
           _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/local/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 communicating
                  semantic information.  _nroff_ loads it automatically.
    


## Notes



           Pager programs like _more_(1) and _less_(1) may require command-line
           options to correctly handle some output sequences; see _grotty_(1).
    


## See also



           _groff_(1), _troff_(1), _grotty_(1), _locale_(1), _roff_(7)
    


* * *