# phpman > man > groff_diff(7)

[GROFF_DIFF(7)](https://www.chedong.com/phpMan.php/man/GROFFDIFF/7/markdown)                     Miscellaneous Information Manual                     [GROFF_DIFF(7)](https://www.chedong.com/phpMan.php/man/GROFFDIFF/7/markdown)



## NAME
       groff_diff - differences between GNU troff and classical troff

## DESCRIPTION
       This manual page describes the language differences between _groff_, the GNU _roff_ text process‐
       ing system, and the classical _roff_ formatter of the freely available Unix  7  of  the  1970s,
       documented  in the _Troff_ _User's_ _Manual_ by _Ossanna_ and _Kernighan_.  This includes the roff lan‐
       guage as well as the intermediate output format (troff output).

       Section “See Also” below gives pointers to both the classical _roff_ and the modern _groff_ docu‐
       mentation.

## GROFF LANGUAGE
       In  this section, all additional features of _groff_ compared to the classical Unix 7 _troff_ are
       described in detail.

### Long names
       The names of number registers, fonts, strings/macros/diversions, special characters (glyphs),
       and  colors  can  be of any length.  In escape sequences, additionally to the classical ‘**(**_xx_’
       construction for a two-character glyph name, you can use ‘**[**_xxx_**]**’  for  a  name  of  arbitrary
       length.

       **\[**_xxx_**]** Print the special character (glyph) called _xxx_.

       **\[**_comp1_ _comp2_ _..._**]**
              Print  composite glyph consisting of multiple components.  Example: ‘\[A ho]’ is capi‐
              tal letter A with ogonek which finally maps to glyph name  ‘u0041_0328’.   See  _Groff:_
              _The_  _GNU_ _Implementation_ _of_ _troff_, the _groff_ Texinfo manual, for details of how a glyph
              name for a composite glyph is constructed, and **groff**___**[char**(7)](https://www.chedong.com/phpMan.php/man/char/7/markdown) for a list of glyph  name
              components used in composite glyph names.

       **\f[**_xxx_**]**
              Set  font  _xxx_.  Additionally, **\f[]** is a new syntax form equal to **\fP**, i.e., to return
              to the previous font.

       **\*[**_xxx_ _arg1_ _arg2_ _..._**]**
              Interpolate string _xxx_, taking _arg1_, _arg2_, _..._, as arguments.

       **\n[**_xxx_**]**
              Interpolate number register _xxx_.

### Fractional point sizes
       A _scaled_ _point_ is equal to **1/sizescale** points, where **sizescale** is specified in the _DESC_  file
       (1  by  default).   There  is  a  new scale indicator **z** that has the effect of multiplying by
       sizescale.  Requests and escape sequences in troff interpret arguments that represent a point
       size as being in units of scaled points, but they evaluate each such argument using a default
       scale indicator of **z**.  Arguments treated in this way are the argument to the **ps** request,  the
       third argument to the **cs** request, the second and fourth arguments to the **tkf** request, the ar‐
       gument to the **\H** escape sequence, and those variants of the **\s** escape sequence  that  take  a
       numeric expression as their argument.

       For  example,  suppose  sizescale is 1000; then a scaled point is equivalent to a millipoint;
       the call **.ps** **10.25** is equivalent to **.ps** **10.25z** and so sets the point  size  to  10250  scaled
       points, which is equal to 10.25 points.

       The  number  register  **\n[.s]** returns the point size in points as decimal fraction.  There is
       also a new number register **\n[.ps]** that returns the point size in scaled points.

       It would make no sense to use the **z** scale indicator in a  numeric  expression  whose  default
       scale indicator was neither **u** nor **z**, and so **troff** disallows this.  Similarly it would make no
       sense to use a scaling indicator other than **z** or **u** in  a  numeric  expression  whose  default
       scale indicator was **z**, and so **troff** disallows this as well.

       There  is  also  new  scale  indicator  **s** which multiplies by the number of units in a scaled
       point.  So, for example, **\n[.ps]s** is equal to **1m**.  Be sure not to confuse the **s** and  **z**  scale
       indicators.

### Numeric expressions
       Spaces are permitted in a number expression within parentheses.

       **M**  indicates a scale of 100ths of an em.  **f** indicates a scale of 65536 units, providing frac‐
       tions for color definitions with the **defcolor** request.  For example, 0.5f = 32768u.

       _e1_**>?**_e2_ The maximum of _e1_ and _e2_.

       _e1_**<?**_e2_ The minimum of _e1_ and _e2_.

       **(**_c_**;**_e_**)**  Evaluate _e_ using _c_ as the default scaling indicator.  If _c_ is missing, ignore  scaling
              indicators in the evaluation of _e_.

### New escape sequences
       **\A'**_anything_**'**
              This  expands  to **1** or **0**, depending on whether _anything_ is or is not acceptable as the
              name of a string, macro, diversion, number register, environment, font, or color.   It
              returns  **0**  if _anything_ is empty.  This is useful if you want to look up user input in
              some sort of associative table.

       **\B'**_anything_**'**
              This expands to **1** or **0**, depending on whether _anything_ is or is not a valid numeric ex‐
              pression.  It returns **0** if _anything_ is empty.

       **\C'**_xxx_**'**
              Typeset  glyph  named  _xxx_.  Normally it is more convenient to use **\[**_xxx_**]**.  But **\C** has
              the advantage that it is compatible with recent versions of Unix and is  available  in
              compatibility mode.

       **\E**     This  is  equivalent  to  an escape character, but it is not interpreted in copy mode.
              For example, strings to start and end superscripting could be defined like this

                     .ds { \v'-.3m'\s'\En[.s]*6u/10u'
                     .ds } \s0\v'.3m'

              The use of **\E** ensures that these definitions work even if **\*{** gets interpreted in copy
              mode (for example, by being used in a macro argument).

       **\F**_f_
       **\F(**_fm_
       **\F[**_fam_**]**
              Change  font  family.  This is the same as the **fam** request.  **\F[]** switches back to the
              previous font family (note that **\FP** won't work; it selects font family ‘P’ instead).

       **\m**_x_
       **\m(**_xx_
       **\m[**_xxx_**]**
              Set drawing color.  **\m[]** switches back to the previous color.

       **\M**_x_
       **\M(**_xx_
       **\M[**_xxx_**]**
              Set background color for  filled  objects  drawn  with  the  **\D'**_..._**'**  commands.   **\M[]**
              switches back to the previous color.

       **\N'**_n_**'**  Typeset  the  glyph with index _n_ in the current font.  _n_ can be any integer.  Most de‐
              vices only have glyphs with indices between 0 and 255.  If the current font  does  not
              contain  a  glyph  with  that code, special fonts are _not_ searched.  The **\N** escape se‐
              quence can be conveniently used in conjunction with the **char** request, for example

                     .char \[phone] \f(ZD\N'37'

              The index of each glyph is given in the fourth column in the font description file af‐
              ter  the  **charset**  command.   It is possible to include unnamed glyphs in the font de‐
              scription file by using a name of **---**; the **\N** escape sequence is the only way  to  use
              these.

       **\O**_n_
       **\O[**_n_**]**  Suppress  troff  output.  The escapes **\O2**, **\O3**, **\O4**, and **\O5** are intended for internal
              use by **grohtml**.

              **\O0**    Disable any ditroff glyphs from being emitted to the  device  driver,  provided
                     that the escape occurs at the outer level (see **\O3** and **\O4**).

              **\O1**    Enable output of glyphs, provided that the escape occurs at the outer level.

                     **\O0**  and  **\O1**  also reset the registers **\n[opminx]**, **\n[opminy]**, **\n[opmaxx]**, and
                     **\n[opmaxy]** to -1.  These four registers mark the top left and bottom right hand
                     corners of a box which encompasses all written glyphs.

              **\O2**    Provided that the escape occurs at the outer level, enable output of glyphs and
                     also write out to stderr the page number and four  registers  encompassing  the
                     glyphs previously written since the last call to **\O**.

              **\O3**    Begin  a  nesting level.  At start-up, **troff** is at outer level.  This is really
                     an internal mechanism for **grohtml** while producing images.  They  are  generated
                     by  running  the troff source through **troff** to the PostScript device and **ghost**‐‐
                     **script** to produce images in PNG format.  The **\O3** escape starts a  new  page  if
                     the  device  is  not  html (to reduce the possibility of images crossing a page
                     boundary).

              **\O4**    End a nesting level.

              **\O5[**_Pfilename_**]**
                     This escape is **grohtml** specific.  Provided that this escape occurs at the outer
                     nesting level, write _filename_ to stderr.  The position of the image, _P_, must be
                     specified and must be one of **l**, **r**, **c**, or **i**  (left,  right,  centered,  inline).
                     _filename_ is associated with the production of the next inline image.

       **\R'**_name_ _±_n_**'**
              This has the same effect as

                     **.nr** _name_ _±_n_

       **\s(**_nn_
       **\s**±±**(**_nn_ Set the point size to _nn_ points; _nn_ must be exactly two digits.

       **\s[**±±_n_**]**
       **\s**±±**[**_n_**]**
       **\s'**±±_n_**'**
       **\s**±±**'**_n_**'** Set  the point size to _n_ scaled points; _n_ is a numeric expression with a default scale
              indicator of **z**.

       **\V**_x_
       **\V(**_xx_
       **\V[**_xxx_**]**
              Interpolate the contents of the environment variable _xxx_, as  returned  by  [**getenv**(3)](https://www.chedong.com/phpMan.php/man/getenv/3/markdown).
              **\V** is interpreted in copy mode.

       **\Y**_x_
       **\Y(**_xx_
       **\Y[**_xxx_**]**
              This  is  approximately equivalent to **\X'\*[**_xxx_**]'**.  However the contents of the string
              or macro _xxx_ are not interpreted; also it is permitted for _xxx_ to have been defined as
              a  macro and thus contain newlines (it is not permitted for the argument to **\X** to con‐
              tain newlines).  The inclusion of newlines requires an extension  to  the  Unix  troff
              output format, and confuses drivers that do not know about this extension.

       **\Z'**_anything_**'**
              Print anything and then restore the horizontal and vertical position; _anything_ may not
              contain tabs or leaders.

       **\$0**    The name by which the current macro was invoked.  The **als** request  can  make  a  macro
              have more than one name.

       **\$***    In a macro or string, the concatenation of all the arguments separated by spaces.

       **\$@**    In  a  macro or string, the concatenation of all the arguments with each surrounded by
              double quotes, and separated by spaces.

       **\$^**    In a macro, the representation of all parameters as if they were an argument to the **ds**
              request.

       **\$(**_nn_
       **\$[**_nnn_**]**
              In a macro or string, this gives the _nn_-th or _nnn_-th argument.  Macros and strings can
              have an unlimited number of arguments.

       **\?**_anything_**\?**
              When used in a diversion, this transparently embeds _anything_ in the  diversion.   _any__‐
              _thing_  is  read  in copy mode.  When the diversion is reread, _anything_ is interpreted.
              _anything_ may not contain newlines; use **\!** if you want to embed newlines  in  a  diver‐
              sion.  The escape sequence **\?** is also recognized in copy mode and turned into a single
              internal code; it is this code that terminates _anything_.  Thus

                     .nr x 1
                     .nf
                     .di d
                     \?\\?\\\\?\\\\\\\\nx\\\\?\\?\?
                     .di
                     .nr x 2
                     .di e
                     .d
                     .di
                     .nr x 3
                     .di f
                     .e
                     .di
                     .nr x 4
                     .f

              prints **4**.

       **\/**     This increases the width of the preceding glyph so that the spacing between that glyph
              and  the  following glyph is correct if the following glyph is a roman glyph.  It is a
              good idea to use this escape sequence whenever an italic glyph is immediately followed
              by a roman glyph without any intervening space.

       **\,**     This  modifies  the  spacing  of  the following glyph so that the spacing between that
              glyph and the preceding glyph is correct if the preceding glyph is a roman glyph.   It
              is  a good idea to use this escape sequence whenever a roman glyph is immediately fol‐
              lowed by an italic glyph without any intervening space.

       **\)**     Like **\&** except that it behaves like a character declared with the **cflags** request to be
              transparent for the purposes of end-of-sentence recognition.

       **\~**     This  produces an unbreakable space that stretches like a normal inter-word space when
              a line is adjusted.

       **\:**     This causes the insertion of a zero-width break point.  It is equal  to  **\%**  within  a
              word but without insertion of a soft hyphen glyph.

       **\#**     Everything  up  to  and including the next newline is ignored.  This is interpreted in
              copy mode.  It is like **\"** except that **\"** does not ignore the terminating newline.

### New requests
       **.aln** _xx_ _yy_
              Create an alias _xx_ for number register object named _yy_.  The new name and the old name
              are  exactly  equivalent.  If _yy_ is undefined, a warning of type **reg** is generated, and
              the request is ignored.

       **.als** _xx_ _yy_
              Create an alias _xx_ for request, string, macro, or diversion object named _yy_.  The  new
              name  and  the  old name are exactly equivalent (it is similar to a hard rather than a
              soft link).  If _yy_ is undefined, a warning of type **mac** is generated, and  the  request
              is  ignored.   The **de**, **am**, **di**, **da**, **ds**, and **as** requests only create a new object if the
              name of the macro, diversion or string is currently undefined or if it is  defined  to
              be a request; normally they modify the value of an existing object.

       **.am1** _xx_ _yy_
              Similar  to  **.am**, but compatibility mode is switched off during execution.  To be more
              precise, a ‘compatibility save’ token is inserted at the beginning of the macro  addi‐
              tion,  and a ‘compatibility restore’ token at the end.  As a consequence, the requests
              **am**, **am1**, **de**, and **de1** can be intermixed freely since the compatibility save/restore to‐
              kens only affect the macro parts defined by **.am1** and **.ds1**.

       **.ami** _xx_ _yy_
              Append to macro indirectly.  See the **dei** request below for more information.

       **.ami1** _xx_ _yy_
              Same as the **ami** request but compatibility mode is switched off during execution.

       **.as1** _xx_ _yy_
              Similar  to  **.as**, but compatibility mode is switched off during expansion.  To be more
              precise, a ‘compatibility save’ token is inserted at the beginning of the string,  and
              a  ‘compatibility  restore’ token at the end.  As a consequence, the requests **as**, **as1**,
              **ds**, and **ds1** can be intermixed freely since the compatibility save/restore tokens  only
              affect the (sub)strings defined by **as1** and **ds1**.

       **.asciify** _xx_
              This  request  ‘unformats’ the diversion _xx_ in such a way that ASCII and space charac‐
              ters (and some escape sequences) that were formatted and diverted into _xx_ are  treated
              like  ordinary  input characters when _xx_ is reread.  Useful for diversions in conjunc‐
              tion with the **writem** request.  It can be also used for gross hacks; for example, this

                     .tr @.
                     .di x
                     @nr n 1
                     .br
                     .di
                     .tr @@
                     .asciify x
                     .x

              sets register **n** to 1.  Note that glyph information (font, font size, etc.) is not pre‐
              served; use **.unformat** instead.

### .backtrace
              Print a backtrace of the input stack on stderr.

       **.blm** _xx_
              Set  the blank line macro to _xx_.  If there is a blank line macro, it is invoked when a
              blank line is encountered instead of the usual troff behaviour.

       **.box** _xx_
       **.boxa** _xx_
              These requests are similar to the **di** and **da** requests with the exception  that  a  par‐
              tially  filled  line does not become part of the diversion (i.e., the diversion always
              starts with a new line) but is restored after ending  the  diversion,  discarding  the
              partially filled line which possibly comes from the diversion.

       **.break** Break  out of a while loop.  See also the **while** and **continue** requests.  Be sure not to
              confuse this with the **br** request.

       **.brp**   This is the same as **\p**.

       **.cflags** _n_ _c1_ _c2_ _..._
              Characters _c1_, _c2_, _..._, have properties determined by _n_, which is ORed from  the  fol‐
              lowing:

              1      The character ends sentences (initially characters **.?!** have this property).

              2      Lines  can  be  broken  before the character (initially no characters have this
                     property); a line is not broken at a character with this  property  unless  the
                     characters  on  each  side  both  have non-zero hyphenation codes.  This can be
                     overridden with value 64.

              4      Lines can be broken after the character (initially characters **-\[hy]\[em]**  have
                     this  property);  a line is not broken at a character with this property unless
                     the characters on each side both have non-zero hyphenation codes.  This can  be
                     overridden with value 64.

              8      The glyph associated with this character overlaps horizontally (initially char‐
                     acters **\[ul]\[rn]\[ru]\[radicalex]\[sqrtex]** have this property).

              16     The glyph associated with this character overlaps vertically  (initially  glyph
                     **\[br]** has this property).

              32     An  end-of-sentence  character  followed  by any number of characters with this
                     property is treated as the end of a sentence if followed by a  newline  or  two
                     spaces; in other words the character is transparent for the purposes of end-of-
                     sentence recognition; this is the same as having a zero  space  factor  in  TeX
                     (initially characters **"')]*\[dg]\[rq]\[cq]** have this property).

              64     Ignore hyphenation code values of the surrounding characters.  Use this in com‐
                     bination with values 2 and 4 (initially no characters have this property).

              128    Prohibit a line break before the character, but allow a line  break  after  the
                     character.   This  works  only in combination with flags 256 and 512 and has no
                     effect otherwise.

              256    Prohibit a line break after the character, but allow a line  break  before  the
                     character.   This  works  only in combination with flags 128 and 512 and has no
                     effect otherwise.

              512    Allow line break before or after the character.  This works only in combination
                     with flags 128 and 256 and has no effect otherwise.

              Contrary  to  flag values 2 and 4, the flags 128, 256, and 512 work pairwise.  If, for
              example, the left character has value 512, and the right character 128, no line  break
              gets  inserted.   If we use value 6 instead for the left character, a line break after
              the character can't be suppressed since the right neighbour character doesn't get  ex‐
              amined.

       **.char** _c_ _string_
              [This request can both define characters and glyphs.]

              Define  entity  _c_ to be _string_.  To be more precise, define (or even override) a groff
              entity which can be accessed with name _c_ on the input side, and which uses  _string_  on
              the  output  side.   Every  time glyph _c_ needs to be printed, _string_ is processed in a
              temporary environment and the result is wrapped up into a single object.   Compatibil‐
              ity mode is turned off and the escape character is set to **\** while _string_ is being pro‐
              cessed.  Any emboldening, constant spacing or track kerning is applied to this  object
              rather than to individual glyphs in _string_.

              A  groff  object defined by this request can be used just like a normal glyph provided
              by the output device.  In particular other characters can be translated to it with the
              **tr**  request;  it can be made the leader glyph by the **lc** request; repeated patterns can
              be drawn with the glyph using the **\l** and **\L** escape sequences; words containing  _c_  can
              be hyphenated correctly, if the **hcode** request is used to give the object a hyphenation
              code.

              There is a special anti-recursion feature: Use of glyph within the glyph's  definition
              is handled like normal glyphs not defined with **char**.

              A glyph definition can be removed with the **rchar** request.

       **.chop** _xx_
              Chop the last element off macro, string, or diversion _xx_.  This is useful for removing
              the newline from the end of diversions that are to be interpolated as strings.

       **.class** _name_ _c1_ _c2_ _..._
              Assign _name_ to a set of characters _c1_, _c2_, _..._, so that they can be referred  to  from
              other requests easily (currently **.cflags** only).  Character ranges (indicated by an in‐
              termediate ‘-’) and nested classes are possible also.  This is useful to assign  prop‐
              erties to a large set of characters.

       **.close** _stream_
              Close  the stream named _stream_; _stream_ will no longer be an acceptable argument to the
              **write** request.  See the **open** request.

       **.composite** _glyph1_ _glyph2_
              Map glyph name _glyph1_ to glyph name _glyph2_ if it is used in **\[**_..._**]** with more than  one
              component.

### .continue
              Finish the current iteration of a while loop.  See also the **while** and **break** requests.

       **.color** _n_
              If  _n_  is  non-zero or missing, enable colors (this is the default), otherwise disable
              them.

       **.cp** _n_  If _n_ is non-zero or missing, enable compatibility mode, otherwise disable it.  In com‐
              patibility  mode,  long  names are not recognized, and the incompatibilities caused by
              long names do not arise.

       **.defcolor** _xxx_ _scheme_ _color_components_
              Define color _xxx_.  _scheme_ can be one of the following values: **rgb** (three  components),
              **cmy**  (three  components),  **cmyk**  (four  components), and **gray** or **grey** (one component).
              Color components can be given either as a hexadecimal string or  as  positive  decimal
              integers  in  the  range  0–65535.  A hexadecimal string contains all color components
              concatenated; it must start with either **#** or **##**.  The former specifies hex  values  in
              the  range  0–255  (which  are  internally multiplied by 257), the latter in the range
              0–65535.  Examples: #FFC0CB (pink), ##ffff0000ffff (magenta).  A new  scaling  indica‐
              tor  **f**  has  been introduced which multiplies its value by 65536; this makes it conve‐
              nient to specify color components as fractions in the range 0 to 1.  Example:

                     .defcolor darkgreen rgb 0.1f 0.5f 0.2f

              Note that **f** is the default scaling indicator for the **defcolor** request, thus the  above
              statement is equivalent to

                     .defcolor darkgreen rgb 0.1 0.5 0.2

              The color named **default** (which is device-specific) can't be redefined.  It is possible
              that the default color for **\M** and **\m** is not the same.

       **.de1** _xx_ _yy_
              Similar to **.de**, but compatibility mode is switched off during  execution.   On  entry,
              the current compatibility mode is saved and restored at exit.

       **.dei** _xx_ _yy_
              Define macro indirectly.  The following example

                     .ds xx aa
                     .ds yy bb
                     .dei xx yy

              is equivalent to

                     .de aa bb

       **.dei1** _xx_ _yy_
              Similar to the **dei** request but compatibility mode is switched off during execution.

       **.device** _anything_
              This  is  (almost)  the same as the **\X** escape.  _anything_ is read in copy mode; a lead‐
              ing **"** is stripped.

       **.devicem** _xx_
              This is the same as the **\Y** escape (to embed the contents of a macro into the  interme‐
              diate output preceded with ‘x X’).

       **.do** _xxx_
              Interpret _.xxx_ with compatibility mode disabled.  For example,

                     .do fam T

              would have the same effect as

                     .fam T

              except  that it would work even if compatibility mode had been enabled.  Note that the
              previous compatibility mode is restored before any files sourced  by  _xxx_  are  inter‐
              preted.

       **.ds1** _xx_ _yy_
              Similar  to  **.ds**, but compatibility mode is switched off during expansion.  To be more
              precise, a ‘compatibility save’ token is inserted at the beginning of the string,  and
              a ‘compatibility restore’ token at the end.

       **.ecs**   Save current escape character.

       **.ecr**   Restore  escape character saved with **ecs**.  Without a previous call to **ecs**, ‘**\**’ will be
              the new escape character.

       **.evc** _xx_
              Copy the contents of environment _xx_ to the current environment.  No pushing or popping
              of environments is done.

       **.fam** _xx_
              Set the current font family to _xx_.  The current font family is part of the current en‐
              vironment.  If _xx_ is missing, switch back to  previous  font  family.   The  value  at
              start-up  is ‘T’.  See the description of the **sty** request for more information on font
              families.

       **.fchar** _c_ _string_
              Define fallback character (or glyph) _c_ to be _string_.  The syntax of  this  request  is
              the  same  as  the **char** request; the only difference is that a glyph defined with **char**
              hides the glyph with the same name in the current font, whereas a glyph  defined  with
              **fchar**  is  checked only if the particular glyph isn't found in the current font.  This
              test happens before checking special fonts.

       **.fcolor** _c_
              Set the fill color to _c_.  If _c_ is missing, switch to the previous fill color.

       **.fschar** _f_ _c_ _string_
              Define fallback character (or glyph) _c_ for font _f_ to be _string_.  The  syntax  of  this
              request  is  the  same as the **char** request (with an additional argument to specify the
              font); a glyph defined with **fschar** is searched after the list of fonts  declared  with
              the **fspecial** request but before the list of fonts declared with **.special**.

       **.fspecial** _f_ _s1_ _s2_ _..._
              When the current font is _f_, fonts _s1_, _s2_, _..._, are special, that is, they are searched
              for glyphs not in the current font.  Any fonts specified in the  **special**  request  are
              searched  after  fonts specified in the **fspecial** request.  Without argument, reset the
              list of global special fonts to be empty.

       **.ftr** _f_ _g_
              Translate font _f_ to _g_.  Whenever a font named _f_ is referred to in  an  **\f**  escape  se‐
              quence,  in the **F** and **S** conditional operators, or in the **ft**, **ul**, **bd**, **cs**, **tkf**, **special**,
              **fspecial**, **fp**, or **sty** requests, font _g_ is used.  If _g_ is missing, or equal  to  _f_  then
              font _f_ is not translated.

       **.fzoom** _f_ _zoom_
              Set  zoom  factor  _zoom_  for  font  _f_.   _zoom_  must a non-negative integer multiple of
              1/1000th.  If it is missing or is equal to zero, it means the same as 1000, namely  no
              magnification.  _f_ must be a real font name, not a style.

       **.gcolor** _c_
              Set the glyph color to _c_.  If _c_ is missing, switch to the previous glyph color.

       **.hcode** _c1_ _code1_ _c2_ _code2_ _..._
              Set  the hyphenation code of character _c1_ to _code1_ and that of _c2_ to _code2_, and so on.
              A hyphenation code must be a single input character (not a  special  character)  other
              than a digit or a space.  Initially each lower-case letter a–z has a hyphenation code,
              which is itself, and each upper-case letter A–Z has a hyphenation code  which  is  the
              lower-case version of itself.  See also the **hpf** request.

       **.hla** _lang_
              Set  the  current hyphenation language to _lang_.  Hyphenation exceptions specified with
              the **hw** request and hyphenation patterns specified with the **hpf** request are both  asso‐
              ciated  with  the current hyphenation language.  The **hla** request is usually invoked by
              the **troffrc** file to set up a default language.

       **.hlm** _n_ Set the maximum number of consecutive hyphenated lines to _n_.  If _n_ is negative,  there
              is  no  maximum.   The default value is -1.  This value is associated with the current
              environment.  Only lines output from an environment count towards the maximum  associ‐
              ated  with  that environment.  Hyphens resulting from **\%** are counted; explicit hyphens
              are not.

       **.hpf** _file_
              Read hyphenation patterns from _file_; this  is  searched  for  in  the  same  way  that
              _name_**.tmac**  is  searched  for  when the **-m**_name_ option is specified.  It should have the
              same format as (simple) TeX patterns files.  More specifically, the following scanning
              rules are implemented.

              •      A percent sign starts a comment (up to the end of the line) even if preceded by
                     a backslash.

              •      No support for ‘digraphs’ like **\$**.

              •      **^^**_xx_ (_x_ is 0–9 or a–f) and **^^**_x_ (character code of _x_ in  the  range  0–127)  are
                     recognized; other use of **^** causes an error.

              •      No macro expansion.

              •      **hpf**  checks  for the expression **\patterns{**...**}** (possibly with whitespace before
                     and after the braces).  Everything between the braces is taken  as  hyphenation
                     patterns.  Consequently, **{** and **}** are not allowed in patterns.

              •      Similarly, **\hyphenation{**...**}** gives a list of hyphenation exceptions.

              •      **\endinput** is recognized also.

              •      For backwards compatibility, if **\patterns** is missing, the whole file is treated
                     as a list of hyphenation patterns (only recognizing  the  **%**  character  as  the
                     start of a comment).

              Use  the  **hpfcode**  request  to  map the encoding used in hyphenation patterns files to
              **groff**'s input encoding.  By default, everything maps to itself except letters  ‘A’  to
              ‘Z’ which map to ‘a’ to ‘z’.

              The set of hyphenation patterns is associated with the current language set by the **hla**
              request.  The **hpf** request is usually invoked by the **troffrc** file; a  second  call  re‐
              places the old patterns with the new ones.

       **.hpfa** _file_
              The  same  as  **hpf**  except that the hyphenation patterns from _file_ are appended to the
              patterns already loaded in the current language.

       **.hpfcode** _a_ _b_ _c_ _d_ _..._
              After reading a hyphenation patterns file with the **hpf** or **hpfa**  request,  convert  all
              characters  with  character  code _a_ in the recently read patterns to character code _b_,
              character code _c_ to _d_, etc.  Initially, all character codes map  to  themselves.   The
              arguments  of  **hpfcode**  must  be integers in the range 0 to 255.  Note that it is even
              possible to use character codes which are invalid in **groff** otherwise.

       **.hym** _n_ Set the _hyphenation_ _margin_ to _n_: when the current adjustment mode is not **b**,  the  line
              is not hyphenated if the line is no more than _n_ short.  The default hyphenation margin
              is 0.  The default scaling indicator for this request is **m**.  The hyphenation margin is
              associated  with the current environment.  The current hyphenation margin is available
              in the **\n[.hym]** register.

       **.hys** _n_ Set the _hyphenation_ _space_ to _n_: When the current adjustment mode is **b** don't  hyphenate
              the  line  if  the  line can be justified by adding no more than _n_ extra space to each
              word space.  The default hyphenation space is 0.  The default  scaling  indicator  for
              this  request is **m**.  The hyphenation space is associated with the current environment.
              The current hyphenation space is available in the **\n[.hys]** register.

       **.itc** _n_ _macro_
              Variant of **.it** for which a line interrupted with **\c** is not counted as an input line.

       **.kern** _n_
              If _n_ is non-zero or missing, enable pairwise kerning, otherwise disable it.

       **.length** _xx_ _string_
              Compute the length of _string_ and return it in the number register  _xx_  (which  is  not
              necessarily defined before).

       **.linetabs** _n_
              If _n_ is non-zero or missing, enable line-tabs mode, otherwise disable it (which is the
              default).  In line-tabs mode, tab distances are computed  relative  to  the  (current)
              output  line.   Otherwise they are taken relative to the input line.  For example, the
              following

                     .ds x a\t\c
                     .ds y b\t\c
                     .ds z c
                     .ta 1i 3i
                     \*x
                     \*y
                     \*z

              yields

                     a         b         c

              In line-tabs mode, the same code gives

                     a         b                   c

              Line-tabs mode is associated with the current environment; the read-only number regis‐
              ter **\n[.linetabs]** is set to 1 if in line-tabs mode, and 0 otherwise.

       **.lsm** _xx_
              Set  the leading spaces macro to _xx_.  If there are leading spaces in an input line, it
              is invoked instead of the usual troff behaviour; the leading spaces are removed.  Reg‐
              isters  **\n[lsn]**  and  **\n[lss]** hold the number of removed leading spaces and the corre‐
              sponding horizontal space, respectively.

       **.mso** _file_
              The same as the **so** request except that _file_ is searched for in the same directories as
              macro  files  for the **-m** command-line option.  If the file name to be included has the
              form _name_**.tmac** and it isn't found, **mso** tries to include  **tmac.**_name_  instead  and  vice
              versa.   A  warning of type **file** is generated if _file_ can't be loaded, and the request
              is ignored.

       **.nop** _anything_
              Execute _anything_.  This is similar to ‘.if 1’.

       **.nroff** Make the **n** built-in condition true and the **t** built-in condition false.   This  can  be
              reversed using the **troff** request.

       **.open** _stream_ _filename_
              Open _filename_ for writing and associate the stream named _stream_ with it.  See also the
              **close** and **write** requests.

       **.opena** _stream_ _filename_
              Like **open**, but if _filename_ exists, append to it instead of truncating it.

       **.output** _string_
              Emit _string_ directly to the intermediate output (subject to copy-mode interpretation);
              this  is  similar  to  **\!** used at the top level.  An initial double quote in _string_ is
              stripped off to allow initial blanks.

       **.pev**   Print the current environment and each defined environment state on stderr.

       **.pnr**   Print the names and contents of all currently defined number registers on stderr.

       **.psbb** _filename_
              Get the bounding box of a PostScript  image  _filename_.   This  file  must  conform  to
              Adobe's  Document  Structuring Conventions; the command looks for a **%%BoundingBox** com‐
              ment to extract the bounding box values.  After a successful call, the coordinates (in
              PostScript  units) of the lower left and upper right corner can be found in the regis‐
              ters **\n[llx]**, **\n[lly]**, **\n[urx]**, and **\n[ury]**, respectively.   If  some  error  has  oc‐
              curred, the four registers are set to zero.

       **.pso** _command_
              This  behaves  like the **so** request except that input comes from the standard output of
              _command_.

       **.ptr**   Print the names and positions of all traps (not including input line traps and  diver‐
              sion traps) on stderr.  Empty slots in the page trap list are printed as well, because
              they can affect the priority of subsequently planted traps.

       **.pvs** _±_n_
              Set the post-vertical line space to _n_; default scale indicator is **p**.   This  value  is
              added to each line after it has been output.  With no argument, the post-vertical line
              space is set to its previous value.

              The total vertical line spacing consists of four components: **.vs** and **\x** with  a  nega‐
              tive  value  which are applied before the line is output, and **.pvs** and **\x** with a posi‐
              tive value which are applied after the line is output.

       **.rchar** _c1_ _c2_ _..._
              Remove the definitions of glyphs _c1_, _c2_, _..._  This undoes the effect  of  a  **char**  re‐
              quest.

### .return
              Within  a macro, return immediately.  If called with an argument, return twice, namely
              from the current macro and from the macro one level higher.  No effect otherwise.

       **.rfschar** _c1_ _c2_ _..._
              Remove the font-specific definitions of glyphs _c1_, _c2_, _..._  This undoes the effect  of
              an **fschar** request.

### .rj
       **.rj** _n_  Right  justify the next _n_ input lines.  Without an argument right justify the next in‐
              put line.  The number of lines to be right justified is available in the **\n[.rj]**  reg‐
              ister.  This implicitly does **.ce** **0**.  The **ce** request implicitly does **.rj** **0**.

       **.rnn** _xx_ _yy_
              Rename number register _xx_ to _yy_.

       **.schar** _c_ _string_
              Define  global  fallback  character (or glyph) _c_ to be _string_.  The syntax of this re‐
              quest is the same as the **char** request; a glyph defined with **schar**  is  searched  after
              the  list  of  fonts  declared with the **special** request but before the mounted special
              fonts.

       **.shc** _c_ Set the soft hyphen character to _c_.  If _c_ is omitted, the soft hyphen character is set
              to the default **\[hy]**.  The soft hyphen character is the glyph which is inserted when a
              word is hyphenated at a line break.  If the soft hyphen character does  not  exist  in
              the  font of the glyph immediately preceding a potential break point, then the line is
              not broken at that point.  Neither definitions (specified with the **char**  request)  nor
              translations  (specified with the **tr** request) are considered when finding the soft hy‐
              phen character.

       **.shift** _n_
              In a macro, shift the arguments by _n_ positions: argument _i_ becomes argument _i_-_n_; argu‐
              ments  1  to  _n_ are no longer available.  If _n_ is missing, arguments are shifted by 1.
              Shifting by negative amounts is currently undefined.

       **.sizes** _s1_ _s2_ _..._ _sn_ **[0]**
              This command is similar to the **sizes** command of a _DESC_ file.  It  sets  the  available
              font  sizes  for the current font to _s1_, _s2_, _..._, _sn_ scaled points.  The list of sizes
              can be terminated by an optional **0**.  Each _si_ can also be a range of sizes  _m_–_n_.   Con‐
              trary to the font file command, the list can't extend over more than a single line.

       **.special** _s1_ _s2_ _..._
              Fonts  _s1_,  _s2_,  _..._, are special and are searched for glyphs not in the current font.
              Without arguments, reset the list of special fonts to be empty.

       **.spreadwarn** _limit_
              Make **troff** emit a warning if the additional space  inserted  for  each  space  between
              words  in  an output line is larger or equal to _limit_.  A negative value is changed to
              zero; no argument toggles the warning on and off without changing _limit_.  The  default
              scaling  indicator  is  **m**.  At startup, **spreadwarn** is deactivated, and _limit_ is set to
              3m.  For example, **.spreadwarn** **0.2m** causes a warning if **troff** must add 0.2m or more for
              each  interword  space in a line.  This request is active only if text is justified to
              both margins (using **.ad** **b**).

       **.sty** _n_ _f_
              Associate style _f_ with font position _n_.  A font position can be associated either with
              a  font  or  with a style.  The current font is the index of a font position and so is
              also either a font or a style.  When it is a style, the font that is actually used  is
              the  font the name of which is the concatenation of the name of the current family and
              the name of the current style.  For example, if the current font is 1 and  font  posi‐
              tion  1  is  associated with style **R** and the current font family is **T**, then font **TR** is
              used.  If the current font is not a style, then the current family is  ignored.   When
              the  requests  **cs**,  **bd**, **tkf**, **uf**, or **fspecial** are applied to a style, then they are ap‐
              plied instead to the member of the current family corresponding to  that  style.   The
              default  family can be set with the **-f** command-line option.  The **styles** command in the
              DESC file controls which font positions (if any) are initially associated with  styles
              rather than fonts.

       **.substring** _xx_ _n1_ **[**_n2_**]**
              Replace  the string named _xx_ with the substring defined by the indices _n1_ and _n2_.  The
              first character in the string has index 0.  If _n2_ is omitted, it is taken to be  equal
              to  the  string's length.  If the index value _n1_ or _n2_ is negative, it is counted from
              the end of the string, going backwards: The last character has index -1, the character
              before the last character has index -2, etc.

       **.tkf** _f_ _s1_ _n1_ _s2_ _n2_
              Enable  track kerning for font _f_.  When the current font is _f_ the width of every glyph
              is increased by an amount between _n1_ and _n2_; when the current point size is less  than
              or  equal  to  _s1_ the width is increased by _n1_; when it is greater than or equal to _s2_
              the width is increased by _n2_; when the point size is greater than or equal to  _s1_  and
              less than or equal to _s2_ the increase in width is a linear function of the point size.

       **.tm1** _string_
              Similar to the **tm** request, _string_ is read in copy mode and written on the standard er‐
              ror, but an initial double quote in _string_ is stripped off to allow initial blanks.

       **.tmc** _string_
              Similar to **tm1** but without writing a final newline.

       **.trf** _filename_
              Transparently output the contents of file _filename_.  Each line is output  as  if  pre‐
              ceded  by  **\!**; however, the lines are not subject to copy-mode interpretation.  If the
              file does not end with a newline, then a newline is added.  For example, you  can  de‐
              fine a macro _x_ containing the contents of file _f_, using

                     .di x
                     .trf f
                     .di

              Unlike  with the **cf** request, the file cannot contain characters, such as NUL, that are
              not valid troff input characters.

       **.trin** _abcd_
              This is the same as the **tr** request except that the **asciify** request uses the  character
              code (if any) before the character translation.  Example:

                     .trin ax
                     .di xxx
                     a
                     .br
                     .di
                     .xxx
                     .trin aa
                     .asciify xxx
                     .xxx

              The result is **x** **a**.  Using **tr**, the result would be **x** **x**.

       **.trnt** _abcd_
              This  is  the same as the **tr** request except that the translations do not apply to text
              that is transparently throughput into a diversion with **\!**.  For example,

                     .tr ab
                     .di x
                     \!.tm a
                     .di
                     .x

              prints **b**; if **trnt** is used instead of **tr** it prints **a**.

       **.troff** Make the **n** built-in condition false, and the **t** built-in condition true.   This  undoes
              the effect of the **nroff** request.

       **.unformat** _xx_
              This  request  ‘unformats’  the  diversion _xx_.  Contrary to the **asciify** request, which
              tries to convert formatted elements of the diversion back to input tokens as  much  as
              possible, **.unformat** only handles tabs and spaces between words (usually caused by spa‐
              ces or newlines in the input) specially.  The former are treated as if they were input
              tokens, and the latter are stretchable again.  Note that the vertical size of lines is
              not preserved.  Glyph information (font, font size, space width,  etc.)  is  retained.
              Useful in conjunction with the **box** and **boxa** requests.

       **.vpt** _n_ Enable vertical position traps if _n_ is non-zero, disable them otherwise.  Vertical po‐
              sition traps are traps set by the **wh** or **dt** requests.  Traps set by the **it** request  are
              not  vertical  position  traps.  The parameter that controls whether vertical position
              traps are enabled is global.  Initially vertical position traps are enabled.

       **.warn** _n_
              Control warnings.  _n_ is the sum of the numbers associated with each warning that is to
              be  enabled; all other warnings are disabled.  The number associated with each warning
              is listed in [**troff**(1)](https://www.chedong.com/phpMan.php/man/troff/1/markdown).  For example, **.warn** **0** disables all warnings, and **.warn**  **1**  dis‐
              ables  all warnings except that about missing glyphs.  If _n_ is not given, all warnings
              are enabled.

       **.warnscale** _si_
              Set the scaling indicator used in warnings to _si_.  Valid values for _si_ are **u**, **i**, **c**, **p**,
              and **P**.  At startup, it is set to **i**.

       **.while** _c_ _anything_
              While condition _c_ is true, accept _anything_ as input; _c_ can be any condition acceptable
              to an **if** request; _anything_ can comprise multiple lines if the first line  starts  with
              **\{** and the last line ends with **\}**.  See also the **break** and **continue** requests.

       **.write** _stream_ _anything_
              Write  _anything_ to the stream named _stream_.  _stream_ must previously have been the sub‐
              ject of an **open** request.  _anything_ is read in copy mode; a leading **"** is stripped.

       **.writec** _stream_ _anything_
              Similar to **write** but without writing a final newline.

       **.writem** _stream_ _xx_
              Write the contents of the macro or string _xx_ to the stream named _stream_.  _stream_  must
              previously have been the subject of an **open** request.  _xx_ is read in copy mode.

### Extended escape sequences
       **\D'**...**'**
              All  drawing  commands  of  groff's  intermediate output are accepted.  See subsection
              “Drawing Commands” below.

### Extended requests
       **.cf** _filename_
              When used in a diversion, this embeds in the diversion an object which,  when  reread,
              will  cause the contents of _filename_ to be transparently copied through to the output.
              In Unix troff, the contents of _filename_ is immediately copied through  to  the  output
              regardless  of  whether  there  is a current diversion; this behaviour is so anomalous
              that it must be considered a bug.

       **.de** _xx_ _yy_
       **.am** _xx_ _yy_
       **.ds** _xx_ _yy_
       **.as** _xx_ _yy_
              In compatibility mode, these requests behaves similar to **.de1**, **.am1**, **.ds1**,  and  **.as1**,
              respectively:  A  ‘compatibility save’ token is inserted at the beginning, and a ‘com‐
              patibility restore’ token at the end, with compatibility mode switched on during  exe‐
              cution.

       **.ev** _xx_ If  _xx_  is not a number, this switches to a named environment called _xx_.  The environ‐
              ment should be popped with a matching **ev** request without any arguments,  just  as  for
              numbered  environments.   There  is no limit on the number of named environments; they
              are created the first time that they are referenced.

       **.hy** _n_  New additive values 16 and 32 are available; the former enables hyphenation before the
              last character, the latter enables hyphenation after the first character.

       **.ss** _m_ _n_
              When two arguments are given to the **ss** request, the second argument gives the _sentence_
              _space_ _size_.  If the second argument is not given, the sentence space size is the  same
              as  the  word space size.  Like the word space size, the sentence space is in units of
              one twelfth of the spacewidth parameter for the current font.  Initially both the word
              space size and the sentence space size are 12.  Contrary to Unix troff, GNU troff han‐
              dles this request in nroff mode also; a given value is then rounded down to the  near‐
              est multiple of 12.  The sentence space size is used in two circumstances.  If the end
              of a sentence occurs at the end of a line in fill mode, then both an inter-word  space
              and a sentence space are added; if two spaces follow the end of a sentence in the mid‐
              dle of a line, then the second space is a sentence space.  Note that the behaviour  of
              Unix  troff is exactly that exhibited by GNU troff if a second argument is never given
              to the **ss** request.  In GNU troff, as in Unix troff, you should always  follow  a  sen‐
              tence with either a newline or two spaces.

       **.ta** _n1_ _n2_ _..._ _nn_ **T** _r1_ _r2_ _..._ _rn_
              Set  tabs  at  positions _n1_, _n2_, _..._, _nn_ and then set tabs at _nn_+_r1_, _nn_+_r2_, _..._, _nn_+_rn_
              and then at _nn_+_rn_+_r1_, _nn_+_rn_+_r2_, _..._, _nn_+_rn_+_rn_, and so on.  For example,

                     .ta T .5i

              sets tabs every half an inch.

### New number registers
       The following read-only registers are available:

### \n[.br]
              Within a macro call, it is set to 1 if the macro is called with the  ‘normal’  control
              character  (‘.’ by default), and set to 0 otherwise.  This allows the reliable modifi‐
              cation of requests.

                     .als bp*orig bp
                     .de bp
                     .tm before bp
                     .ie \\n[.br] .bp*orig
                     .el 'bp*orig
                     .tm after bp
                     ..

              Using this register outside of a macro makes no sense (it always returns zero in  such
              cases).

       **\n[.C]** 1 if compatibility mode is in effect, 0 otherwise.

### \n[.cdp]
              The  depth  of the last glyph added to the current environment.  It is positive if the
              glyph extends below the baseline.

### \n[.ce]
              The number of lines remaining to be centered, as set by the **ce** request.

### \n[.cht]
              The height of the last glyph added to the current environment.  It is positive if  the
              glyph extends above the baseline.

### \n[.color]
              1 if colors are enabled, 0 otherwise.

### \n[.csk]
              The  skew  of the last glyph added to the current environment.  The _skew_ of a glyph is
              how far to the right of the center of a glyph the center of an accent over that  glyph
              should be placed.

### \n[.ev]
              The name or number of the current environment.  This is a string-valued register.

### \n[.fam]
              The current font family.  This is a string-valued register.

### \n[.fn]
              The current (internal) real font name.  This is a string-valued register.  If the cur‐
              rent font is a style, the value of **\n[.fn]** is the proper concatenation of  family  and
              style name.

### \n[.fp]
              The number of the next free font position.

       **\n[.g]** Always  1.   Macros  should  use  this to determine whether they are running under GNU
              troff.

### \n[.height]
              The current height of the font as set with **\H**.

### \n[.hla]
              The current hyphenation language as set by the **hla** request.

### \n[.hlc]
              The number of immediately preceding consecutive hyphenated lines.

### \n[.hlm]
              The maximum allowed number of consecutive hyphenated lines, as set by the **hlm** request.

### \n[.hy]
              The current hyphenation flags (as set by the **hy** request).

### \n[.hym]
              The current hyphenation margin (as set by the **hym** request).

### \n[.hys]
              The current hyphenation space (as set by the **hys** request).

### \n[.in]
              The indentation that applies to the current output line.

### \n[.int]
              Set to a positive value if last output line is interrupted (i.e., if it contains **\c**).

### \n[.kern]
              1 if pairwise kerning is enabled, 0 otherwise.

### \n[.lg]
              The current ligature mode (as set by the **lg** request).

### \n[.linetabs]
              The current line-tabs mode (as set by the **linetabs** request).

### \n[.ll]
              The line length that applies to the current output line.

### \n[.lt]
              The title length as set by the **lt** request.

       **\n[.m]** The name of the current drawing color.  This is a string-valued register.

       **\n[.M]** The name of the current background color.  This is a string-valued register.

### \n[.ne]
              The amount of space that was needed in the last **ne** request that caused a  trap  to  be
              sprung.  Useful in conjunction with the **\n[.trunc]** register.

### \n[.ns]
              1 if no-space mode is active, 0 otherwise.

       **\n[.O]** The current output level as set with **\O**.

       **\n[.P]** 1 if the current page is in the output list set with **-o**.

### \n[.pe]
              1 during a page ejection caused by the **bp** request, 0 otherwise.

### \n[.pn]
              The  number  of  the next page, either the value set by a **pn** request, or the number of
              the current page plus 1.

### \n[.ps]
              The current point size in scaled points.

### \n[.psr]
              The last-requested point size in scaled points.

### \n[.pvs]
              The current post-vertical line space as set with the **pvs** request.

### \n[.rj]
              The number of lines to be right-justified as set by the **rj** request.

### \n[.slant]
              The slant of the current font as set with **\S**.

### \n[.sr]
              The last requested point size in points as a decimal fraction.  This is a  string-val‐
              ued register.

### \n[.ss]
### \n[.sss]
              These  give  the values of the parameters set by the first and second arguments of the
              **ss** request.

### \n[.sty]
              The current font style.  This is a string-valued register.

### \n[.tabs]
              A string representation of the current tab settings suitable for use as an argument to
              the **ta** request.

### \n[.trunc]
              The  amount  of vertical space truncated by the most recently sprung vertical position
              trap, or, if the trap was sprung by an **ne** request, minus the amount of vertical motion
              produced  by the **ne** request.  In other words, at the point a trap is sprung, it repre‐
              sents the difference of what the vertical position would have been but for  the  trap,
              and  what  the  vertical position actually is.  Useful in conjunction with the **\n[.ne]**
              register.

       **\n[.U]** Set to 1 if in safer mode and to 0 if in unsafe mode (as given with  the  **-U**  command-
              line option).

### \n[.vpt]
              1 if vertical position traps are enabled, 0 otherwise.

### \n[.warn]
              The  sum  of  the numbers associated with each of the currently enabled warnings.  The
              number associated with each warning is listed in [**troff**(1)](https://www.chedong.com/phpMan.php/man/troff/1/markdown).

       **\n[.x]** The major version number.  For example, if the version number  is  1.03,  then  **\n[.x]**
              contains 1.

       **\n[.y]** The  minor  version  number.   For example, if the version number is 1.03, then **\n[.y]**
              contains 03.

       **\n[.Y]** The revision number of groff.

### \n[.zoom]
              The zoom value of the current font, in multiples of 1/1000th.  Zero if  no  magnifica‐
              tion.

### \n[llx]
### \n[lly]
### \n[urx]
### \n[ury]
              These  four  read/write registers are set by the **psbb** request and contain the bounding
              box values (in PostScript units) of a given PostScript image.

       The following read/write registers are set by the **\w** escape sequence:

### \n[rst]
### \n[rsb]
              Like the **st** and **sb** registers, but take account of the heights and depths of glyphs.

### \n[ssc]
              The amount of horizontal space (possibly negative) that should be added  to  the  last
              glyph before a subscript.

### \n[skw]
              How  far to right of the center of the last glyph in the **\w** argument, the center of an
              accent from a roman font should be placed over that glyph.

       Other available read/write number registers are:

       **\n[c.]** The current input line number.  **\n[.c]** is a read-only alias to this register.

### \n[hours]
              The number of hours past midnight.  Initialized at start-up.

       **\n[hp]** The current horizontal position at input line.

### \n[lsn]
### \n[lss]
              If there are leading spaces in an input line, these registers hold the number of lead‐
              ing spaces and the corresponding horizontal space, respectively.

### \n[minutes]
              The number of minutes after the hour.  Initialized at start-up.

### \n[seconds]
              The number of seconds after the minute.  Initialized at start-up.

### \n[systat]
              The return value of the system() function executed by the last **sy** request.

### \n[slimit]
              If  greater than 0, the maximum number of objects on the input stack.  If less than or
              equal to 0, there is no limit on the number of objects on the input  stack.   With  no
              limit, recursion can continue until virtual memory is exhausted.

### \n[year]
              The  current year.  Note that the traditional **troff** number register **\n[yr]** is the cur‐
              rent year minus 1900.

### Miscellaneous
       **troff** predefines a single (read/write) string-based register, **\*[.T]**, which contains the  ar‐
       gument  given  to  the **-T** command-line option, namely the current output device (for example,
       _latin1_ or _ascii_).  Note that this is not the same as the (read-only) number  register  **\n[.T]**
       which  is defined to be 1 if **troff** is called with the **-T** command-line option, and zero other‐
       wise.  This behaviour is different from Unix troff.

       Fonts not listed in the DESC file are automatically mounted on the next available font  posi‐
       tion  when they are referenced.  If a font is to be mounted explicitly with the **fp** request on
       an unused font position, it should be mounted on the first unused font position, which can be
       found in the **\n[.fp]** register; although **troff** does not enforce this strictly, it does not al‐
       low a font to be mounted at a position whose number is much greater than  that  of  any  cur‐
       rently used position.

       Interpolating a string does not hide existing macro arguments.  Thus in a macro, a more effi‐
       cient way of doing

              **.**_xx_ **\\$@**

       is

              **\\*[**_xx_**]\\**

       If the font description file contains pairwise kerning information, glyphs from that font are
       kerned.  Kerning between two glyphs can be inhibited by placing a **\&** between them.

       In  a  string  comparison in a condition, characters that appear at different input levels to
       the first delimiter character are not recognized as the second or third delimiters.  This ap‐
       plies also to the **tl** request.  In a **\w** escape sequence, a character that appears at a differ‐
       ent input level to the starting delimiter character is not recognized as the  closing  delim‐
       iter  character.  The same is true for **\A**, **\b**, **\B**, **\C**, **\l**, **\L**, **\o**, **\X**, and **\Z**.  When decoding
       a macro or string argument that is delimited by double quotes, a character that appears at  a
       different  input  level  to the starting delimiter character is not recognized as the closing
       delimiter character.  The implementation of **\$@** ensures that the double quotes surrounding an
       argument  appear  at the same input level, which is different to the input level of the argu‐
       ment itself.  In a long escape name **]** is not recognized as a closing delimiter except when it
       occurs at the same input level as the opening **[**.  In compatibility mode, no attention is paid
       to the input-level.

       There are some new types of condition:

       **.if** **r**_xxx_
              True if there is a number register named _xxx_.

       **.if** **d**_xxx_
              True if there is a string, macro, diversion, or request named _xxx_.

       **.if** **m**_xxx_
              True if there is a color named _xxx_.

       **.if** **c**_ch_
              True if there is a character (or glyph) _ch_ available; _ch_ is either an ASCII  character
              or  a glyph (special character) **\N'**_xxx_**'**, **\(**_xx_ or **\[**_xxx_**]**; the condition is also true if
              _ch_ has been defined by the **char** request.

       **.if** **F**_f_ True if font _f_ exists.  **f** is handled as if it was opened with the **ft** request (this is,
              font translation and styles are applied), without actually mounting it.

       **.if** **S**_s_ True if style _s_ has been registered.  Font translation is applied.

       The **tr** request can now map characters onto **\~**.

       The space width emitted by the **\|** and **\^** escape sequences can be controlled on a per-font ba‐
       sis.  If there is a glyph named **\|** or **\^**, respectively (note the leading backslash),  defined
       in the current font file, use this glyph's width instead of the default value.

       It  is  now  possible to have whitespace between the first and second dot (or the name of the
       ending macro) to end a macro definition.  Example:

              .if t \{\
              .  de bar
              .    nop Hello, I'm ‘bar’.
              .  .
              .\}

## INTERMEDIATE OUTPUT FORMAT
       This section describes the format output by GNU troff.  The output format used by  GNU  troff
       is very similar to that used by Unix device-independent troff.  Only the differences are doc‐
       umented here.

### Units
       The argument to the **s** command is in scaled points (units of points/_n_, where _n_ is the argument
       to the **sizescale** command  in the DESC file).  The argument to the **x** **Height** command is also in
       scaled points.

### Text Commands
       **N**_n_     Print glyph with index _n_ (a non-negative integer) of the current font.

       If the **tcommand** line is present in the DESC file, troff uses the following two commands.

       **t**_xxx_   _xxx_ is any sequence of characters terminated by a space or a newline (to be more  pre‐
              cise,  it  is  a  sequence of glyphs which are accessed with the corresponding charac‐
              ters); the first character should be printed at the current position, the current hor‐
              izontal  position  should  be increased by the width of the first character, and so on
              for each character.  The width of the glyph is that given in the font file,  appropri‐
              ately  scaled  for the current point size, and rounded so that it is a multiple of the
              horizontal resolution.  Special characters cannot be printed using this command.

       **u**_n_ _xxx_ This is same as the **t** command except that after printing each character,  the  current
              horizontal position is increased by the sum of the width of that character and _n_.

       Note  that  single characters can have the eighth bit set, as can the names of fonts and spe‐
       cial characters.

       The names of glyphs and fonts can be of arbitrary length; drivers should not assume that they
       are only two characters long.

       When a glyph is to be printed, that glyph is always in the current font.  Unlike device-inde‐
       pendent troff, it is not necessary for drivers to search special fonts to find a glyph.

       For color support, some new commands have been added:

       **mc** _cyan_ _magenta_ _yellow_
       **md**
       **mg** _gray_
       **mk** _cyan_ _magenta_ _yellow_ _black_
       **mr** _red_ _green_ _blue_
              Set the color components of the current drawing color, using  various  color  schemes.
              **md**  resets  the drawing color to the default value.  The arguments are integers in the
              range 0 to 65536.

       The **x** device control command has been extended.

       **x** **u** _n_  If _n_ is 1, start underlining of spaces.  If _n_ is 0, stop underlining of spaces.   This
              is needed for the **cu** request in nroff mode and is ignored otherwise.

### Drawing Commands
       The  **D** drawing command has been extended.  These extensions are not used by GNU pic if the **-n**
       option is given.

       **Df** _n_\n Set the shade of gray to be used for filling solid objects to _n_; _n_ must be an  integer
              between  0 and 1000, where 0 corresponds solid white and 1000 to solid black, and val‐
              ues in between correspond to intermediate shades of gray.  This applies only to  solid
              circles,  solid  ellipses  and  solid  polygons.  By default, a level of 1000 is used.
              Whatever color a solid object has, it should completely obscure everything beneath it.
              A  value  greater  than 1000 or less than 0 can also be used: this means fill with the
              shade of gray that is currently being used for  lines  and  text.   Normally  this  is
              black, but some drivers may provide a way of changing this.

              The  corresponding  **\D'f**_..._**'**  command  shouldn't  be used since its argument is always
              rounded to an integer multiple of the horizontal resolution which can lead to surpris‐
              ing results.

       **DC** _d_\n Draw  a solid circle with a diameter of _d_ with the leftmost point at the current posi‐
              tion.

       **DE** _dx_ _dy_\n
              Draw a solid ellipse with a horizontal diameter of _dx_ and a vertical  diameter  of  _dy_
              with the leftmost point at the current position.

       **Dp** _dx_1 _dy_1 _dx_2 _dy_2 ... .lf 3501
              _dxn_  _dyn_\n  Draw a polygon with, for _i_=1,...,_n_+1, the _i_-th vertex at the current posi‐
              tion +**_**−=Σ**1**(_dxj_,_dyj_).  At the moment, GNU pic only uses this command to generate  trian‐
              gles and rectangles.

       **DP** _dx_1 _dy_1 _dx_2 _dy_2 ... .lf 3513
              _dxn_ _dyn_\n Like **Dp** but draw a solid rather than outlined polygon.

       **Dt** _n_\n Set  the  current line thickness to _n_ machine units.  Traditionally Unix troff drivers
              use a line thickness proportional to the current point size; drivers  should  continue
              to  do  this if no **Dt** command has been given, or if a **Dt** command has been given with a
              negative value of _n_.  A zero value of _n_ selects the smallest available line thickness.

       A difficulty arises in how the current position should be  changed  after  the  execution  of
       these commands.  This is not of great importance since the code generated by GNU pic does not
       depend on this.  Given a drawing command of the form

              **\D'**_c_ _x_1 _y_1 _x_2 _y_2 ... .lf 3546 _xn_ _yn_**'**

       where _c_ is not one of **c**, **e**, **l**, **a**, or **~**, Unix troff treats each of  the  _xi_  as  a  horizontal
       quantity,  and  each of the _yi_ as a vertical quantity and assumes that the width of the drawn
       object is _in_=Σ1_xi_, and that the height is _in_=Σ1_yi_.  (The assumption about the height can be  seen
       by  examining  the **st** and **sb** registers after using such a **D** command in a **\w** escape sequence).
       This rule also holds for all the original drawing commands with the exception of **De**.  For the
       sake  of  compatibility GNU troff also follows this rule, even though it produces an ugly re‐
       sult in the case of the **Dt** and **Df**, and, to a lesser extent, **DE** commands.  Thus after  execut‐
       ing a **D** command of the form

              **D**_c_ _x_1 _y_1 _x_2 _y_2 ... .lf 3590 _xn_ _yn_\n

       the current position should be increased by (_in_=Σ1_xi_,_in_=Σ1_yi_).

       Another set of extensions is

       **DFc** _cyan_ _magenta_ _yellow_\n
       **DFd**\n
       **DFg** _gray_\n
       **DFk** _cyan_ _magenta_ _yellow_ _black_\n
       **DFr** _red_ _green_ _blue_\n
              Set the color components of the filling color similar to the **m** commands above.

       The current position isn't changed by those colour commands (contrary to **Df**).

### Device Control Commands
       There  is  a continuation convention which permits the argument to the **x** **X** command to contain
       newlines: when outputting the argument to the **x** **X** command, GNU troff follows each newline  in
       the argument with a **+** character (as usual, it terminates the entire argument with a newline);
       thus if the line after the line containing the **x** **X** command starts with **+**,  then  the  newline
       ending  the  line containing the **x** **X** command should be treated as part of the argument to the
       **x** **X** command, the **+** should be ignored, and the part of the line  following  the  **+**  should  be
       treated like the part of the line following the **x** **X** command.

       The first three output commands are guaranteed to be:

              **x** **T** _device_
              **x** **res** _n_ _h_ _v_
              **x** **init**

## INCOMPATIBILITIES
       In  spite  of  the  many extensions, groff has retained compatibility to classical troff to a
       large degree.  For the cases where the extensions lead to collisions, a special compatibility
       mode with the restricted, old functionality was created for groff.

### Groff Language
       _groff_ provides a **compatibility** **mode** that allows the processing of roff code written for clas‐
       sical **troff** or for other implementations of roff in a consistent way.

       Compatibility mode can be turned on with the **-C** command-line option, and  turned  on  or  off
       with  the  **.cp** request.  The number register **\n(.C** is 1 if compatibility mode is on, 0 other‐
       wise.

       This became necessary because the GNU concept for long names causes  some  incompatibilities.
       _Classical_ _troff_ interprets

              **.dsabcd**

       as  defining  a string **ab** with contents **cd**.  In _groff_ mode, this is considered as a call of a
       macro named **dsabcd**.

       Also _classical_ _troff_ interprets **\*[** or **\n[** as references  to  a  string  or  number  register
       called **[** while _groff_ takes this as the start of a long name.

       In  _compatibility_  _mode_,  groff interprets these things in the traditional way; so long names
       are not recognized.

       On the other hand, groff in _GNU_ _native_ _mode_ does not allow to use  the  single-character  es‐
       capes  **\\**  (backslash), **\|** (vertical bar), **\^** (caret), **\&** (ampersand), **\{** (opening brace), **\}**
       (closing brace), ‘**\** ’ (space), **\'** (single quote), **\`** (backquote), **\-** (minus), **\**___ (underline),
### \! (bang), \% (percent),
       registers, fonts or environments, whereas _classical_ _troff_ does.

       The **\A** escape sequence can be helpful in avoiding these escape sequences in names.

       Fractional point sizes cause one noteworthy incompatibility.  In _classical_ _troff_, the **ps**  re‐
       quest ignores scale indicators and so

              **.ps** **10u**

       sets  the  point  size  to  10  points, whereas in groff native mode the point size is set to
       10 scaled points.

       In _groff_, there is a fundamental difference between unformatted input characters, and format‐
       ted output characters (glyphs).  Everything that affects how a glyph is output is stored with
       the glyph; once a glyph has been constructed it is unaffected by any subsequent requests that
       are executed, including the **bd**, **cs**, **tkf**, **tr**, or **fp** requests.

       Normally  glyphs  are  constructed from input characters at the moment immediately before the
       glyph is added to the current output line.  Macros, diversions and strings are all, in  fact,
       the  same  type  of object; they contain lists of input characters and glyphs in any combina‐
       tion.

       Special characters can be both; before being added to the output, they act as input entities,
       afterwards they denote glyphs.

       A glyph does not behave like an input character for the purposes of macro processing; it does
       not inherit any of the special properties that the input character from  which  it  was  con‐
       structed might have had.  The following example makes things clearer.

              .di x
              \\\\
              .br
              .di
              .x

       With  _GNU_ _troff_ this is printed as **\\**.  So each pair of input backslashes ‘\\’ is turned into
       a single output backslash glyph ‘\’ and the resulting output backslashes are not  interpreted
       as escape characters when they are reread.

       _Classical_ _troff_ would interpret them as escape characters when they were reread and would end
       up printing a single backslash ‘\’.

       In GNU, the correct way to get a printable version of the backslash character ’\’ is the **\(rs**
       escape  sequence, but classical troff does not provide a clean feature for getting a non-syn‐
       tactical backslash.  A close method is the printable version of the current escape  character
       using  the  **\e**  escape sequence; this works if the current escape character is not redefined.
       It works in both GNU mode and compatibility mode, while dirty tricks like  specifying  a  se‐
       quence  of  multiple  backslashes  do not work reliably; for the different handling in diver‐
       sions, macro definitions, or text mode quickly leads to a confusion about the necessary  num‐
       ber of backslashes.

       To  store an escape sequence in a diversion that is interpreted when the diversion is reread,
       either the traditional **\!** transparent output facility or the new **\?** escape  sequence  can  be
       used.

### Intermediate Output
       The  groff  intermediate output format is in a state of evolution.  So far it has some incom‐
       patibilities, but it is intended to establish a full compatibility  to  the  classical  troff
       output format.  Actually the following incompatibilities exist:

       • The positioning after the drawing of the polygons conflicts with the classical definition.

       • The  intermediate  output cannot be rescaled to other devices as classical ‘device-indepen‐
         dent’ troff did.

## AUTHORS
       This document was written by James Clark ⟨<jjc@jclark.com>⟩ and modified by Werner Lemberg ⟨wl@
       gnu.org⟩ and Bernd Warken ⟨<groff-bernd.warken-72@web.de>⟩.

## SEE ALSO
       _Groff:_ _The_ _GNU_ _Implementation_ _of_ _troff_, by Trent A. Fisher and Werner Lemberg, is the primary
       _groff_ manual.  You can browse it interactively with “info groff”.

       [**groff**(1)](https://www.chedong.com/phpMan.php/man/groff/1/markdown)
              A list of all documentation around _groff_.

       [**groff**(7)](https://www.chedong.com/phpMan.php/man/groff/7/markdown)
              A description of the _groff_ language, including a short, but complete reference of  all
              predefined  requests,  registers,  and escapes of plain _groff_.  From the command line,
              this is called using

                     man 7 groff

       [**roff**(7)](https://www.chedong.com/phpMan.php/man/roff/7/markdown)
              A survey of _roff_ systems, including pointers to further historical documentation.

       [_CSTR_ _#54_]
              The _Nroff/Troff_ _User's_ _Manual_ by _J._ _F._ _Ossanna_  of  1976  in  the  revision  of  _Brian_
              _Kernighan_  of  1992, being the classical troff documentation ⟨<http://cm.bell-labs.com/>
              cm/cs/cstr/54.ps.gz⟩.



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