{
    "mode": "man",
    "parameter": "nroff",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/nroff/1/json",
    "generated": "2026-10-09T13:03:25Z",
    "sections": {
        "Name": {
            "content": "nroff - format documents with groff for TTY (terminal) devices\n",
            "subsections": []
        },
        "Synopsis": {
            "content": "nroff [-bcCEhikpRStUVz] [-d ctext] [-d string=text] [-K fallback-encoding] [-m macro-package]\n[-M macro-directory] [-n page-number] [-o page-list] [-P postprocessor-argument]\n[-r cnumeric-expression] [-r register=numeric-expression] [-T output-device]\n[-w warning-category] [-W warning-category] [file ...]\n",
            "subsections": [
                {
                    "name": "nroff --help",
                    "content": ""
                },
                {
                    "name": "nroff -v",
                    "content": ""
                },
                {
                    "name": "nroff --version",
                    "content": ""
                }
            ]
        },
        "Description": {
            "content": "nroff  formats documents written in the groff(7) language for typewriter-like devices such as\nterminal emulators.  GNU nroff emulates the AT&T nroff command using groff(1).  nroff  gener‐\nates  output via grotty(1), groff's terminal output driver, which needs to know the character\nencoding scheme used by the device.  Consequently, acceptable arguments to the -T option  are\nascii, latin1, utf8, and cp1047; any others are ignored.  If neither the GROFFTYPESETTER en‐\nvironment  variable nor the -T command-line option (which overrides the environment variable)\nspecifies a (valid) device, nroff consults the locale to select an appropriate output device.\nIt first tries the locale(1) program, then checks several  locale-related  environment  vari‐\nables; see section “Environment” below.  If all of the foregoing fail, -Tascii is implied.\n\nThe  -b,  -c, -C, -d, -E, -i, -m, -M, -n, -o, -r, -U, -w, -W, and -z options have the effects\ndescribed in troff(1).  -c and -h imply “-P-c” and “-P-h”, respectively; -c  is  also  inter‐\npreted  directly  by  troff.  In addition, this implementation ignores the AT&T nroff options",
            "subsections": [
                {
                    "name": "-e -q -s  -k -K -p -P -R -t",
                    "content": "",
                    "flag": "-t"
                },
                {
                    "name": "-S  -V",
                    "content": "the  standard output stream, but does not execute it.  -v and --version show version informa‐\ntion about nroff and the programs it runs, while --help displays a usage  message;  all  exit\nafterward.\n",
                    "flag": "-V"
                }
            ]
        },
        "Exit status": {
            "content": "nroff  exits  with error status 2 if there was a problem parsing its arguments, with status 0\nif any of the options -V, -v, --version, or --help were specified, and  with  the  status  of\ngroff otherwise.\n",
            "subsections": []
        },
        "Environment": {
            "content": "Normally, the path separator in environment variables ending with PATH is the colon; this may\nvary depending on the operating system.  For example, Windows uses a semicolon instead.\n\nGROFFBINPATH\nis  a  colon-separated list of directories in which to search for the groff executable\nbefore searching in PATH.  If unset, /usr/bin is used.\n\nGROFFTYPESETTER\nspecifies the default output device for groff.\n\nLCALL\nLCCTYPE\nLANG\nLESSCHARSET\nare pattern-matched in this order for contents matching standard  character  encodings\nsupported  by  groff in the event no -T option is given and GROFFTYPESETTER is unset,\nor the values specified are invalid.\n",
            "subsections": []
        },
        "Files": {
            "content": "/usr/share/groff/1.23.0/tmac/tty-char.tmac\ndefines fallback definitions of  roff  special  characters.   These  definitions  more\npoorly  optically approximate typeset output than those of tty.tmac in favor of commu‐\nnicating semantic information.  nroff loads it automatically.\n",
            "subsections": []
        },
        "Notes": {
            "content": "Pager programs like more(1) and less(1) may require command-line options to correctly  handle\nsome output sequences; see grotty(1).\n\nSee also\ngroff(1), troff(1), grotty(1), locale(1), roff(7)\n\ngroff 1.23.0                                31 March 2024                                   nroff(1)",
            "subsections": []
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}