{
    "mode": "man",
    "parameter": "GROFF",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/GROFF/1/json",
    "generated": "2026-05-30T06:06:35Z",
    "synopsis": "groff [-abcegijklpstzCEGNRSUVXZ] [-d cs] [-D arg] [-f fam] [-F dir] [-I dir] [-K arg]\n[-L arg] [-m name] [-M dir] [-n num] [-o list] [-P arg] [-r cn] [-T dev] [-w name]\n[-W name] [file ...]",
    "sections": {
        "NAME": {
            "content": "groff - front-end for the groff document formatting system\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "groff [-abcegijklpstzCEGNRSUVXZ] [-d cs] [-D arg] [-f fam] [-F dir] [-I dir] [-K arg]\n[-L arg] [-m name] [-M dir] [-n num] [-o list] [-P arg] [-r cn] [-T dev] [-w name]\n[-W name] [file ...]\n",
            "subsections": [
                {
                    "name": "groff -h",
                    "content": ""
                },
                {
                    "name": "groff --help",
                    "content": "groff -v [option ...]\ngroff --version [option ...]\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "This  document describes the groff program, the main front-end for the groff document format‐\nting system.  The groff program and macro suite is the implementation  of  a  roff(7)  system\nwithin  the free software collection GNU ⟨http://www.gnu.org⟩.  The groff system has all fea‐\ntures of the classical roff, but adds many extensions.\n\nThe groff program allows control of the whole groff system by command-line options.  This  is\na great simplification in comparison to the classical case (which uses pipes only).\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "The  command  line  is parsed according to the usual GNU convention.  Whitespace is permitted\nbetween a command-line option and its argument.  Options can be grouped behind a  single  ‘-’\n(minus character).  A filename of - (minus character) denotes the standard input.\n\nAs  groff is a wrapper program for troff both programs share a set of options.  But the groff\nprogram has some additional, native options and gives a new meaning to  some  troff  options.\nOn the other hand, not all troff options can be fed into groff.\n",
            "subsections": [
                {
                    "name": "Native groff Options",
                    "content": "The following options either do not exist for troff or are differently interpreted by groff.\n"
                },
                {
                    "name": "-D -k",
                    "content": "",
                    "flag": "-k"
                },
                {
                    "name": "-e",
                    "content": "",
                    "flag": "-e"
                },
                {
                    "name": "-g",
                    "content": "",
                    "flag": "-g"
                },
                {
                    "name": "-G -p",
                    "content": "",
                    "flag": "-p"
                },
                {
                    "name": "-h",
                    "content": "--help Print a help message.\n",
                    "flag": "-h"
                },
                {
                    "name": "-I",
                    "content": "command line and those named in .psbb and .so requests, and \\X'ps:  import'  ,  \\X'ps:\nfile'  and  \\X'pdf: pdfpic' escapes).  The current directory is always searched first.\nThis option may be specified more than once; the directories are searched in the order\nspecified.   No  directory  search  is performed for files specified using an absolute\npath.  This option implies the -s option.\n",
                    "flag": "-I"
                },
                {
                    "name": "-j -p",
                    "content": "",
                    "flag": "-p"
                },
                {
                    "name": "-k",
                    "content": "preconv's manual page for its behaviour if no -K (or -D) option is specified.\n",
                    "flag": "-k"
                },
                {
                    "name": "-K -k",
                    "content": "",
                    "flag": "-k"
                },
                {
                    "name": "-l",
                    "content": "for this is specified by the  print  command  in  the  device  description  file,  see\ngrofffont(5).   If  this  command is not present, the output is piped into the lpr(1)\nprogram by default.  See options -L and -X.\n",
                    "flag": "-l"
                },
                {
                    "name": "-L",
                    "content": "-L  option  each.   Note  that groff does not prepend ‘-’ (a minus sign) to arg before\npassing it to the spooler program.\n",
                    "flag": "-L"
                },
                {
                    "name": "-N -N",
                    "content": "",
                    "flag": "-N"
                },
                {
                    "name": "-p",
                    "content": "",
                    "flag": "-p"
                },
                {
                    "name": "-P",
                    "content": "",
                    "flag": "-P"
                },
                {
                    "name": "-P -P",
                    "content": "Pass -option or -option arg to the postprocessor.  The option must be  specified  with\nthe  necessary  preceding minus sign(s) ‘-’ or ‘--’ because groff does not prepend any\ndashes before passing it to the postprocessor.  For example, to pass a  title  to  the\ngxditview postprocessor, the shell command\n\ngroff -X -P -title -P 'groff it' foo\n\nis equivalent to\n\ngroff -X -Z foo | gxditview -title 'groff it' -\n",
                    "flag": "-P"
                },
                {
                    "name": "-R",
                    "content": "cause most refer options have equivalent  language  elements  that  can  be  specified\nwithin the document.  See refer(1) for more details.\n",
                    "flag": "-R"
                },
                {
                    "name": "-s",
                    "content": "",
                    "flag": "-s"
                },
                {
                    "name": "-S -S",
                    "content": ".open, .opena, .pso, .sy, and .pi.  For security reasons, safer mode is enabled by de‐\nfault.\n",
                    "flag": "-S"
                },
                {
                    "name": "-t",
                    "content": "",
                    "flag": "-t"
                },
                {
                    "name": "-T",
                    "content": "see groffout(5).  Then groff calls a postprocessor to  convert  troff's  intermediate\noutput to its final format.  Real devices in groff are\n\ndvi    TeX DVI format (postprocessor is grodvi).\n\nhtml\nxhtml  HTML  and  XHTML output (preprocessors are soelim and pre-grohtml, post‐\nprocessor is post-grohtml).\n\nlbp    Canon CAPSL printers (LBP-4 and LBP-8 series laser printers; postproces‐\nsor is grolbp).\n\nlj4    HP LaserJet4 compatible (or other PCL5 compatible) printers (postproces‐\nsor is grolj4).\n\nps     PostScript output (postprocessor is grops).\n\npdf    Portable Document Format (PDF) output (postprocessor is gropdf).\n\nFor the following TTY output devices (postprocessor is always grotty), -T selects  the\noutput encoding:\n\nascii  7bit ASCII.\n\ncp1047 Latin-1 character set for EBCDIC hosts.\n\nlatin1 ISO 8859-1.\n\nutf8   Unicode  character set in UTF-8 encoding.  This mode has the most useful\nfonts for TTY mode, so it is the best mode for TTY output.\n\nThe following arguments select gxditview as the ‘postprocessor’ (it is rather a  view‐\ning program):\n\nX75    75dpi resolution, 10pt document base font.\n\nX75-12 75dpi resolution, 12pt document base font.\n\nX100   100dpi resolution, 10pt document base font.\n\nX100-12\n100dpi resolution, 12pt document base font.\n\nThe default device is ps.\n",
                    "flag": "-T"
                },
                {
                    "name": "-U -S",
                    "content": "",
                    "flag": "-S"
                },
                {
                    "name": "-v",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "--version",
                    "content": "Output  version  information of groff and of all programs that are run by it; that is,\nthe given command line is parsed in the usual way, passing -v to all subprograms.\n",
                    "long": "--version"
                },
                {
                    "name": "-V",
                    "content": "output, but do not execute it.  If given more than once, the commands are both printed\non the standard error and run.\n",
                    "flag": "-V"
                },
                {
                    "name": "-X",
                    "content": "printing  spooler  behavior  as  outlined  with  options  -l and -L is carried over to\ngxditview(1) by determining an argument for the -printCommand option of  gxditview(1).\nThis sets the default Print action and the corresponding menu entry to that value.  -X\nonly produces good results with -Tps, -TX75, -TX75-12, -TX100, and -TX100-12.  The de‐\nfault  resolution  for previewing -Tps output is 75dpi; this can be changed by passing\nthe -resolution option to gxditview, for example\n\ngroff -X -P-resolution -P100 -man foo.1\n",
                    "flag": "-X"
                },
                {
                    "name": "-z",
                    "content": "",
                    "flag": "-z"
                },
                {
                    "name": "-Z",
                    "content": "will cause the troff output to appear on standard output, replacing the usual postpro‐\ncessor output; see groffout(5).\n",
                    "flag": "-Z"
                },
                {
                    "name": "Transparent Options",
                    "content": "The following options are transparently handed over to the formatter program  troff  that  is\ncalled by groff subsequently.  These options are described in more detail in troff(1).\n"
                },
                {
                    "name": "-a",
                    "content": "",
                    "flag": "-a"
                },
                {
                    "name": "-b",
                    "content": "",
                    "flag": "-b"
                },
                {
                    "name": "-c",
                    "content": "",
                    "flag": "-c"
                },
                {
                    "name": "-C",
                    "content": "",
                    "flag": "-C"
                },
                {
                    "name": "-d",
                    "content": "",
                    "flag": "-d"
                },
                {
                    "name": "-d",
                    "content": "Define string.\n",
                    "flag": "-d"
                },
                {
                    "name": "-E",
                    "content": "",
                    "flag": "-E"
                },
                {
                    "name": "-f",
                    "content": "",
                    "flag": "-f"
                },
                {
                    "name": "-F",
                    "content": "",
                    "flag": "-F"
                },
                {
                    "name": "-i",
                    "content": "",
                    "flag": "-i"
                },
                {
                    "name": "-m",
                    "content": "Include macro file name.tmac (or tmac.name); see also grofftmac(5).\n",
                    "flag": "-m"
                },
                {
                    "name": "-M",
                    "content": "",
                    "flag": "-M"
                },
                {
                    "name": "-n",
                    "content": "",
                    "flag": "-n"
                },
                {
                    "name": "-o",
                    "content": "Output only pages in list.\n",
                    "flag": "-o"
                },
                {
                    "name": "-r",
                    "content": "",
                    "flag": "-r"
                },
                {
                    "name": "-r",
                    "content": "Set number register.\n",
                    "flag": "-r"
                },
                {
                    "name": "-w",
                    "content": "Enable warning name.  See troff(1) for names.\n",
                    "flag": "-w"
                },
                {
                    "name": "-W",
                    "content": "disable warning name.  See troff(1) for names.\n",
                    "flag": "-W"
                }
            ]
        },
        "USING GROFF": {
            "content": "The groff system implements the infrastructure of classical roff; see roff(7) for a survey on\nhow a roff system works in general.  Due to the front-end programs available within the groff\nsystem,  using  groff  is much easier than classical roff.  This section gives an overview of\nthe parts that constitute the groff system.  It complements roff(7) with groff-specific  fea‐\ntures.  This section can be regarded as a guide to the documentation around the groff system.\n",
            "subsections": [
                {
                    "name": "Paper Size",
                    "content": "The  virtual paper size used by troff to format the input is controlled globally with the re‐\nquests .po, .pl, and .ll.  See grofftmac(5) for the ‘papersize’ macro package which provides\na convenient interface.\n\nThe  physical  paper size, giving the actual dimensions of the paper sheets, is controlled by\noutput devices like grops with the command-line options -p and -l.  See grofffont(5) and the\nman  pages  of the output devices for more details.  groff uses the command-line option -P to\npass options to output devices; for example, the following selects A4 paper in landscape ori‐\nentation for the PS device:\n\ngroff -Tps -P-pa4 -P-l ...\n"
                },
                {
                    "name": "Front-ends",
                    "content": "The  groff  program  is  a wrapper around the troff(1) program.  It allows one to specify the\npreprocessors by command-line options and automatically runs the postprocessor that is appro‐\npriate  for the selected device.  Doing so, the sometimes tedious piping mechanism of classi‐\ncal roff(7) can be avoided.\n\nThe grog(1) program can be used for guessing the correct groff command line to format a file.\n\nThe groffer(1) program is an all-around viewer for groff files and man pages.\n"
                },
                {
                    "name": "Preprocessors",
                    "content": "The groff preprocessors are reimplementations of the classical  preprocessors  with  moderate\nextensions.  The standard preprocessors distributed with the groff package are\n\neqn(1) for mathematical formulae,\n\ngrn(1) for including gremlin(1) pictures,\n\npic(1) for drawing diagrams,\n\nchem(1)\nfor chemical structure diagrams,\n\nrefer(1)\nfor bibliographic references,\n\nsoelim(1)\nfor including macro files from standard locations,\n\nand\n\ntbl(1) for tables.\n\nA  new preprocessor not available in classical troff is preconv(1) which converts various in‐\nput encodings to something groff can understand.  It is always run  first  before  any  other\npreprocessor.\n\nBesides these, there are some internal preprocessors that are automatically run with some de‐\nvices.  These aren't visible to the user.\n"
                },
                {
                    "name": "Macro Packages",
                    "content": "Macro packages can be included by option -m.  The groff system  implements  and  extends  all\nclassical  macro  packages  in a compatible way and adds some packages of its own.  Actually,\nthe following macro packages come with groff:\n\nman    The traditional man page format; see groffman(7).  It can be specified on the command\nline as -man or -m man.\n\nmandoc The  general  package for man pages; it automatically recognizes whether the documents\nuses the man or the mdoc format and branches to the corresponding macro  package.   It\ncan be specified on the command line as -mandoc or -m mandoc.\n\nmdoc   The  BSD-style man page format; see groffmdoc(7).  It can be specified on the command\nline as -mdoc or -m mdoc.\n\nme     The classical me document format; see groffme(7).  It can be specified on the command\nline as -me or -m me.\n\nmm     The classical mm document format; see groffmm(7).  It can be specified on the command\nline as -mm or -m mm.\n\nms     The classical ms document format; see groffms(7).  It can be specified on the command\nline as -ms or -m ms.\n\nwww    HTML-like macros for inclusion in arbitrary groff documents; see groffwww(7).\n\nDetails  on the naming of macro files and their placement can be found in grofftmac(5); this\nman page also documents some other, minor auxiliary macro packages not mentioned here.\n"
                },
                {
                    "name": "Programming Language",
                    "content": "General concepts common to all roff programming languages are described in roff(7).\n\nThe groff extensions to the classical troff language are documented in groffdiff(7).\n\nAn overview of language features, including all supported escapes and requests, can be  found\nin groff(7).\n"
                },
                {
                    "name": "Formatters",
                    "content": "The  central roff formatter within the groff system is troff(1).  It provides the features of\nboth the classical troff and nroff, as well as the groff extensions.  The command-line option"
                },
                {
                    "name": "-C",
                    "content": "possible.\n\nThere is a shell script nroff(1) that emulates the behavior of classical nroff.  It tries  to\nautomatically select the proper output encoding, according to the current locale.\n\nThe formatter program generates intermediate output; see groffout(7).\n",
                    "flag": "-C"
                },
                {
                    "name": "Devices",
                    "content": "In roff, the output targets are called devices.  A device can be a piece of hardware, e.g., a\nprinter, or a software file format.  A device is specified by the option -T.  The  groff  de‐\nvices are as follows.\n\nascii  Text output using the ascii(7) character set.\n\ncp1047 Text output using the EBCDIC code page IBM cp1047 (e.g., OS/390 Unix).\n\ndvi    TeX DVI format.\n\nhtml   HTML output.\n\nlatin1 Text output using the ISO Latin-1 (ISO 8859-1) character set; see iso88591(7).\n\nlbp    Output for Canon CAPSL printers (LBP-4 and LBP-8 series laser printers).\n\nlj4    HP LaserJet4-compatible (or other PCL5-compatible) printers.\n\nps     PostScript output; suitable for printers and previewers like gv(1).\n\npdf    PDF files; suitable for viewing with tools such as evince(1) and okular(1).\n\nutf8   Text  output using the Unicode (ISO 10646) character set with UTF-8 encoding; see uni‐‐\ncode(7).\n\nxhtml  XHTML output.\n\nX75    75dpi  X  Window  System  output  suitable  for  the   previewers   xditview(1x)   and\ngxditview(1).  A variant for a 12pt document base font is X75-12.\n\nX100   100dpi   X   Window  System  output  suitable  for  the  previewers  xditview(1x)  and\ngxditview(1).  A variant for a 12pt document base font is X100-12.\n\nThe postprocessor to be used for a device is specified by the postpro command in  the  device\ndescription file; see grofffont(5).  This can be overridden with the -X option.\n\nThe default device is ps.\n"
                },
                {
                    "name": "Postprocessors",
                    "content": "groff provides 3 hardware postprocessors:\n\ngrolbp(1)\nfor some Canon printers,\n\ngrolj4(1)\nfor printers compatible to the HP LaserJet 4 and PCL5,\n\ngrotty(1)\nfor  text  output  using  various  encodings, e.g., on text-oriented terminals or line\nprinters.\n\nToday, most printing or drawing hardware is handled by the operating system, by device  driv‐\ners,  or  by software interfaces, usually accepting PostScript.  Consequently, there isn't an\nurgent need for more hardware device postprocessors.\n\nThe groff software devices for conversion into other document file formats are\n\ngrodvi(1)\nfor the DVI format,\n\ngrohtml(1)\nfor HTML and XHTML formats,\n\ngrops(1)\nfor PostScript.\n\ngropdf(1)\nfor PDF.\n\nCombined with the many existing free conversion tools this should be sufficient to convert  a\ntroff document into virtually any existing data format.\n"
                },
                {
                    "name": "Utilities",
                    "content": "The following utility programs around groff are available.\n\naddftinfo(1)\nAdd information to troff font description files for use with groff.\n\nafmtodit(1)\nCreate font description files for PostScript device.\n\neqn2graph(1)\nConvert an eqn image into a cropped image.\n\ngdiffmk(1)\nMark differences between groff, nroff, or troff files.\n\ngrap2graph(1)\nConvert a grap diagram into a cropped bitmap image.\n\ngroffer(1)\nGeneral viewer program for groff files and man pages.\n\ngxditview(1)\nThe groff X viewer, the GNU version of xditview.\n\nhpftodit(1)\nCreate font description files for lj4 device.\n\nindxbib(1)\nMake inverted index for bibliographic databases.\n\nlkbib(1)\nSearch bibliographic databases.\n\nlookbib(1)\nInteractively search bibliographic databases.\n\npdfroff(1)\nCreate PDF documents using groff.\n\npfbtops(1)\nTranslate a PostScript font in .pfb format to ASCII.\n\npic2graph(1)\nConvert a pic diagram into a cropped image.\n\ntfmtodit(1)\nCreate font description files for TeX DVI device.\n\nxditview(1x)\nroff viewer historically distributed with the X Window System.\n\nxtotroff(1)\nConvert X font metrics into GNU troff font metrics.\n"
                }
            ]
        },
        "ENVIRONMENT": {
            "content": "Normally,  the  path  separator in the following environment variables is the colon; this may\nvary depending on the operating system.  For example, DOS and Windows  use  a  semicolon  in‐\nstead.\n\nGROFFBINPATH\nThis  search  path, followed by PATH, is used for commands that are executed by groff.\nIf it is not set then the  directory  where  the  groff  binaries  were  installed  is\nprepended to PATH.\n\nGROFFCOMMANDPREFIX\nWhen there is a need to run different roff implementations at the same time groff pro‐\nvides the facility to prepend a prefix to most of its programs that could provoke name\nclashings  at  run  time (default is to have none).  Historically, this prefix was the\ncharacter g, but it can be anything.  For example, gtroff  stood  for  groff's  troff,\ngtbl  for the groff version of tbl.  By setting GROFFCOMMANDPREFIX to different val‐\nues, the different roff installations can be addressed.  More exactly, if it is set to\nprefix xxx then groff as a wrapper program internally calls xxxtroff instead of troff.\nThis also applies to the preprocessors eqn, grn, pic, refer, tbl, soelim, and  to  the\nutilities  indxbib and lookbib.  This feature does not apply to any programs different\nfrom the ones above (most notably groff itself) since they are  unique  to  the  groff\npackage.\n\nGROFFENCODING\nThe  value  of  this environment value is passed to the preconv preprocessor to select\nthe encoding of input files.  Setting this option implies groff's command-line  option\n-k  (this  is,  groff  actually  always calls preconv).  If set without a value, groff\ncalls preconv without arguments.  An explicit -K  command-line  option  overrides  the\nvalue of GROFFENCODING.  See preconv(1) for details.\n\nGROFFFONTPATH\nA  list of directories in which to search for the devname directory in addition to the\ndefault ones.  See troff(1) and grofffont(5) for more details.\n\nGROFFTMACPATH\nA list of directories in which to search for macro files in addition  to  the  default\ndirectories.  See troff(1) and grofftmac(5) for more details.\n\nGROFFTMPDIR\nThe  directory in which temporary files are created.  If this is not set but the envi‐\nronment variable TMPDIR instead, temporary files are created in the directory  TMPDIR.\nOn  MS-DOS  and Windows platforms, the environment variables TMP and TEMP (in that or‐\nder) are searched also, after GROFFTMPDIR and TMPDIR.  Otherwise, temporary files are\ncreated in /tmp.  The refer(1), groffer(1), grohtml(1), and grops(1) commands use tem‐\nporary files.\n\nGROFFTYPESETTER\nPreset the default device.  If this is not set the ps device is used as default.  This\ndevice name is overwritten by the option -T.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "The following example illustrates the power of the groff program as a wrapper around troff.\n\nTo  process  a  roff file using the preprocessors tbl and pic and the me macro set, classical\ntroff had to be called by\n\npic foo.me | tbl | troff -me -Tlatin1 | grotty\n\nUsing groff, this pipe can be shortened to the equivalent command\n\ngroff -p -t -me -T latin1 foo.me\n\nAn even easier way to call this is to use grog(1) to guess the preprocessor and macro options\nand execute the generated command (by using backquotes to specify shell command substitution)\n\n`grog -Tlatin1 foo.me`\n\nThe simplest way is to view the contents in an automated way by calling\n\ngroffer foo.me\n",
            "subsections": []
        },
        "BUGS": {
            "content": "On EBCDIC hosts (e.g., OS/390 Unix), output devices ascii and latin1 aren't available.  Simi‐\nlarly, output for EBCDIC code page cp1047 is not available on ASCII based operating systems.\n",
            "subsections": []
        },
        "INSTALLATION DIRECTORIES": {
            "content": "groff installs files in varying locations depending on its  compile-time  configuration.   On\nthis installation, the following locations are used.\n\n/etc/X11/app-defaults\nApplication defaults directory for gxditview(1).\n\n/usr/bin\nDirectory containing groff's executable commands.\n\n/usr/share/groff/1.22.4/eign\nList of common words for indxbib(1).\n\n/usr/share/groff/1.22.4\nDirectory for data files.\n\n/usr/dict/papers/Ind\nDefault index for lkbib(1) and refer(1).\n\n/usr/share/doc/groff-base\nDocumentation directory.\n\n/usr/share/doc/groff-base/examples\nExample directory.\n\n/usr/share/groff/1.22.4/font\nFont directory.\n\n/usr/share/doc/groff-base/html\nHTML documentation directory.\n\n/usr/lib/font\nLegacy font directory.\n\n/usr/share/groff/site-font\nLocal font directory.\n\n/usr/share/groff/site-tmac\nLocal macro package (tmac file) directory.\n\n/usr/share/groff/1.22.4/tmac\nMacro package (tmac file) directory.\n\n/usr/share/groff/1.22.4/oldfont\nFont directory for compatibility with old versions of groff; see grops(1).\n\n/usr/share/doc/groff-base/pdf\nPDF documentation directory.\n\n/usr/lib/groff/site-tmac\nSystem macro package (tmac file) directory.\n",
            "subsections": [
                {
                    "name": "groff Macro Directory",
                    "content": "This contains all information related to macro packages.  Note that more than a single direc‐\ntory is searched for those files as documented in grofftmac(5).  For the groff  installation\ncorresponding to this document, it is located at /usr/share/groff/1.22.4/tmac.  The following\nfiles contained in the groff macro directory have a special meaning:\n\ntroffrc\nInitialization file for troff.  This is interpreted by troff before reading the  macro\nsets and any input.\n\ntroffrc-end\nFinal startup file for troff.  It is parsed after all macro sets have been read.\n\nname.tmac\ntmac.name\nMacro file for macro package name.\n"
                },
                {
                    "name": "groff Font Directory",
                    "content": "This contains all information related to output devices.  Note that more than a single direc‐\ntory is searched for those files; see troff(1).  For the groff installation corresponding  to\nthis  document, it is located at /usr/share/groff/1.22.4/font.  The following files contained\nin the groff font directory have a special meaning:\n\ndevname/DESC\nDevice description file for device name, see grofffont(5).\n\ndevname/F\nFont file for font F of device name.\n"
                }
            ]
        },
        "AVAILABILITY": {
            "content": "Information on how to get groff and related information is available at the groff page of the\nGNU website ⟨http://www.gnu.org/software/groff⟩.\n\nThree groff mailing lists are available:\n\nbug tracker activity (read-only) ⟨bug-groff@gnu.org⟩;\n\ngeneral discussion ⟨groff@gnu.org⟩; and\n\ncommit  activity  (read-only) ⟨groff-commit@gnu.org⟩, which reports changes to groff's\nsource code repository by its developers.\n\nDetails on repository access and much more can be found in the file README at the top  direc‐\ntory of the groff source package.\n\nA  free  implementation  of the grap preprocessor, written by Ted Faber ⟨faber@lunabase.org⟩,\ncan be found at the grap website ⟨http://www.lunabase.org/~faber/Vault/software/grap/⟩.  This\nis the only grap supported by groff.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "groff  was  written  by James Clark ⟨jjc@jclark.com⟩.  This document was rewritten, enhanced,\nand put under the FDL license in 2002 by Bernd Warken ⟨groff-bernd.warken-72@web.de⟩.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Groff: The GNU Implementation of troff, by Trent A. Fisher and Werner Lemberg, is the primary\ngroff manual.  You can browse it interactively with “info groff”.\n\nDue  to  its  complex  structure, the groff system has many man pages.  They can be read with\nman(1) or groffer(1).\n\nBut there are special sections of man pages.  groff has man pages in  sections  1,  5,and  7.\nWhen there are several man pages with the same name in the same man section, the one with the\nlowest section is should as first.  The other man pages can be shown  anyway  by  adding  the\nsection  number  as  argument before the man page name.  Reading the man page about the groff\nlanguage is done by one of\nman 7 groff\ngroffer 7 groff\n\nIntroduction, history and further readings:\nroff(7).\n\nViewer for groff files:\ngroffer(1), gxditview(1), xditview(1x).\n\nWrapper programs for formatters:\ngroff(1), grog(1).\n\nRoff preprocessors:\neqn(1), grn(1), pic(1), chem(1), preconv(1), refer(1), soelim(1), tbl(1), grap(1).\n\nRoff language with the groff extensions:\ngroff(7), groffchar(7), groffdiff(7), grofffont(5).\n\nRoff formatter programs:\nnroff(1), troff(1), ditroff(7).\n\nThe intermediate output language:\ngroffout(7).\n\nPostprocessors for the output devices:\ngrodvi(1), grohtml(1), grolbp(1), grolj4(1), lj4font(5), grops(1), gropdf(1),\ngrotty(1).\n\nGroff macro packages and macro-specific utilities:\ngrofftmac(5), groffman(7), groffmdoc(7), groffme(7), groffmm(7), groffmmse(7)\n(only in Swedish locales), groffmom(7), groffms(7), groffwww(7), grofftrace(7),\nmmroff(7).\n\nThe following utilities are available:\naddftinfo(1), afmtodit(1), eqn2graph(1), gdiffmk(1), grap2graph(1), groffer(1),\ngxditview(1), hpftodit(1), indxbib(1), lkbib(1), lookbib(1), pdfroff(1), pfbtops(1),\npic2graph(1), tfmtodit(1), xtotroff(1).\n\n\n\ngroff 1.22.4                                23 March 2022                                   GROFF(1)",
            "subsections": []
        }
    },
    "summary": "groff - front-end for the groff document formatting system",
    "flags": [
        {
            "flag": "-k",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-e",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-g",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-h",
            "long": null,
            "arg": null,
            "description": "--help Print a help message."
        },
        {
            "flag": "-I",
            "long": null,
            "arg": null,
            "description": "command line and those named in .psbb and .so requests, and \\X'ps: import' , \\X'ps: file' and \\X'pdf: pdfpic' escapes). The current directory is always searched first. This option may be specified more than once; the directories are searched in the order specified. No directory search is performed for files specified using an absolute path. This option implies the -s option."
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-k",
            "long": null,
            "arg": null,
            "description": "preconv's manual page for its behaviour if no -K (or -D) option is specified."
        },
        {
            "flag": "-k",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-l",
            "long": null,
            "arg": null,
            "description": "for this is specified by the print command in the device description file, see grofffont(5). If this command is not present, the output is piped into the lpr(1) program by default. See options -L and -X."
        },
        {
            "flag": "-L",
            "long": null,
            "arg": null,
            "description": "-L option each. Note that groff does not prepend ‘-’ (a minus sign) to arg before passing it to the spooler program."
        },
        {
            "flag": "-N",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-P",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-P",
            "long": null,
            "arg": null,
            "description": "Pass -option or -option arg to the postprocessor. The option must be specified with the necessary preceding minus sign(s) ‘-’ or ‘--’ because groff does not prepend any dashes before passing it to the postprocessor. For example, to pass a title to the gxditview postprocessor, the shell command groff -X -P -title -P 'groff it' foo is equivalent to groff -X -Z foo | gxditview -title 'groff it' -"
        },
        {
            "flag": "-R",
            "long": null,
            "arg": null,
            "description": "cause most refer options have equivalent language elements that can be specified within the document. See refer(1) for more details."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-S",
            "long": null,
            "arg": null,
            "description": ".open, .opena, .pso, .sy, and .pi. For security reasons, safer mode is enabled by de‐ fault."
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-T",
            "long": null,
            "arg": null,
            "description": "see groffout(5). Then groff calls a postprocessor to convert troff's intermediate output to its final format. Real devices in groff are dvi TeX DVI format (postprocessor is grodvi). html xhtml HTML and XHTML output (preprocessors are soelim and pre-grohtml, post‐ processor is post-grohtml). lbp Canon CAPSL printers (LBP-4 and LBP-8 series laser printers; postproces‐ sor is grolbp). lj4 HP LaserJet4 compatible (or other PCL5 compatible) printers (postproces‐ sor is grolj4). ps PostScript output (postprocessor is grops). pdf Portable Document Format (PDF) output (postprocessor is gropdf). For the following TTY output devices (postprocessor is always grotty), -T selects the output encoding: ascii 7bit ASCII. cp1047 Latin-1 character set for EBCDIC hosts. latin1 ISO 8859-1. utf8 Unicode character set in UTF-8 encoding. This mode has the most useful fonts for TTY mode, so it is the best mode for TTY output. The following arguments select gxditview as the ‘postprocessor’ (it is rather a view‐ ing program): X75 75dpi resolution, 10pt document base font. X75-12 75dpi resolution, 12pt document base font. X100 100dpi resolution, 10pt document base font. X100-12 100dpi resolution, 12pt document base font. The default device is ps."
        },
        {
            "flag": "-S",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Output version information of groff and of all programs that are run by it; that is, the given command line is parsed in the usual way, passing -v to all subprograms."
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": "output, but do not execute it. If given more than once, the commands are both printed on the standard error and run."
        },
        {
            "flag": "-X",
            "long": null,
            "arg": null,
            "description": "printing spooler behavior as outlined with options -l and -L is carried over to gxditview(1) by determining an argument for the -printCommand option of gxditview(1). This sets the default Print action and the corresponding menu entry to that value. -X only produces good results with -Tps, -TX75, -TX75-12, -TX100, and -TX100-12. The de‐ fault resolution for previewing -Tps output is 75dpi; this can be changed by passing the -resolution option to gxditview, for example groff -X -P-resolution -P100 -man foo.1"
        },
        {
            "flag": "-z",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-Z",
            "long": null,
            "arg": null,
            "description": "will cause the troff output to appear on standard output, replacing the usual postpro‐ cessor output; see groffout(5)."
        },
        {
            "flag": "-a",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-b",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-C",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": "Define string."
        },
        {
            "flag": "-E",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-F",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-i",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-m",
            "long": null,
            "arg": null,
            "description": "Include macro file name.tmac (or tmac.name); see also grofftmac(5)."
        },
        {
            "flag": "-M",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-n",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-o",
            "long": null,
            "arg": null,
            "description": "Output only pages in list."
        },
        {
            "flag": "-r",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-r",
            "long": null,
            "arg": null,
            "description": "Set number register."
        },
        {
            "flag": "-w",
            "long": null,
            "arg": null,
            "description": "Enable warning name. See troff(1) for names."
        },
        {
            "flag": "-W",
            "long": null,
            "arg": null,
            "description": "disable warning name. See troff(1) for names."
        }
    ],
    "examples": [
        "The following example illustrates the power of the groff program as a wrapper around troff.",
        "To  process  a  roff file using the preprocessors tbl and pic and the me macro set, classical",
        "troff had to be called by",
        "pic foo.me | tbl | troff -me -Tlatin1 | grotty",
        "Using groff, this pipe can be shortened to the equivalent command",
        "groff -p -t -me -T latin1 foo.me",
        "An even easier way to call this is to use grog(1) to guess the preprocessor and macro options",
        "and execute the generated command (by using backquotes to specify shell command substitution)",
        "`grog -Tlatin1 foo.me`",
        "The simplest way is to view the contents in an automated way by calling",
        "groffer foo.me"
    ],
    "see_also": [
        {
            "name": "man",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/man/1/json"
        },
        {
            "name": "groffer",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/groffer/1/json"
        },
        {
            "name": "roff",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/roff/7/json"
        },
        {
            "name": "groffer",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/groffer/1/json"
        },
        {
            "name": "gxditview",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/gxditview/1/json"
        },
        {
            "name": "xditview",
            "section": "1x",
            "url": "https://www.chedong.com/phpMan.php/man/xditview/1x/json"
        },
        {
            "name": "groff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/groff/1/json"
        },
        {
            "name": "grog",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/grog/1/json"
        },
        {
            "name": "eqn",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/eqn/1/json"
        },
        {
            "name": "grn",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/grn/1/json"
        },
        {
            "name": "pic",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pic/1/json"
        },
        {
            "name": "chem",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/chem/1/json"
        },
        {
            "name": "preconv",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/preconv/1/json"
        },
        {
            "name": "refer",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/refer/1/json"
        },
        {
            "name": "soelim",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/soelim/1/json"
        },
        {
            "name": "tbl",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/tbl/1/json"
        },
        {
            "name": "grap",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/grap/1/json"
        },
        {
            "name": "groff",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/groff/7/json"
        },
        {
            "name": "groffchar",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/groffchar/7/json"
        },
        {
            "name": "groffdiff",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/groffdiff/7/json"
        },
        {
            "name": "grofffont",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/grofffont/5/json"
        },
        {
            "name": "nroff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/nroff/1/json"
        },
        {
            "name": "troff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/troff/1/json"
        },
        {
            "name": "ditroff",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/ditroff/7/json"
        },
        {
            "name": "groffout",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/groffout/7/json"
        },
        {
            "name": "grodvi",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/grodvi/1/json"
        },
        {
            "name": "grohtml",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/grohtml/1/json"
        },
        {
            "name": "grolbp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/grolbp/1/json"
        },
        {
            "name": "grolj4",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/grolj4/1/json"
        },
        {
            "name": "lj4font",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/lj4font/5/json"
        },
        {
            "name": "grops",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/grops/1/json"
        },
        {
            "name": "gropdf",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/gropdf/1/json"
        },
        {
            "name": "grotty",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/grotty/1/json"
        },
        {
            "name": "grofftmac",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/grofftmac/5/json"
        },
        {
            "name": "groffman",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/groffman/7/json"
        },
        {
            "name": "groffmdoc",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/groffmdoc/7/json"
        },
        {
            "name": "groffme",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/groffme/7/json"
        },
        {
            "name": "groffmm",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/groffmm/7/json"
        },
        {
            "name": "groffmmse",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/groffmmse/7/json"
        },
        {
            "name": "groffmom",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/groffmom/7/json"
        },
        {
            "name": "groffms",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/groffms/7/json"
        },
        {
            "name": "groffwww",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/groffwww/7/json"
        },
        {
            "name": "grofftrace",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/grofftrace/7/json"
        },
        {
            "name": "mmroff",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/mmroff/7/json"
        },
        {
            "name": "addftinfo",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/addftinfo/1/json"
        },
        {
            "name": "afmtodit",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/afmtodit/1/json"
        },
        {
            "name": "eqn2graph",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/eqn2graph/1/json"
        },
        {
            "name": "gdiffmk",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/gdiffmk/1/json"
        },
        {
            "name": "grap2graph",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/grap2graph/1/json"
        },
        {
            "name": "groffer",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/groffer/1/json"
        },
        {
            "name": "gxditview",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/gxditview/1/json"
        },
        {
            "name": "hpftodit",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/hpftodit/1/json"
        },
        {
            "name": "indxbib",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/indxbib/1/json"
        },
        {
            "name": "lkbib",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/lkbib/1/json"
        },
        {
            "name": "lookbib",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/lookbib/1/json"
        },
        {
            "name": "pdfroff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pdfroff/1/json"
        },
        {
            "name": "pfbtops",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pfbtops/1/json"
        },
        {
            "name": "pic2graph",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pic2graph/1/json"
        },
        {
            "name": "tfmtodit",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/tfmtodit/1/json"
        },
        {
            "name": "xtotroff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/xtotroff/1/json"
        }
    ]
}