# groff(7) - man - phpMan

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



## NAME
       groff - a short reference for the GNU roff language

## DESCRIPTION
       The  name  _groff_  stands for _GNU_ _roff_ and is the free implementation of the roff type-setting
       system.  See [**roff**(7)](https://www.chedong.com/phpMan.php/man/roff/7/markdown) for a survey and the background of the groff system.

       This document provides only short descriptions of roff language elements.  _Groff:_ _The_ _GNU_ _Im__‐
       _plementation_  _of_  _troff_,  by Trent A. Fisher and Werner Lemberg, is the primary _groff_ manual,
       and is written in Texinfo.  You can browse it interactively with “info groff”.

       Historically, the _roff_ _language_ was called _troff_.  _groff_ is  compatible  with  the  classical
       system  and provides proper extensions.  So in GNU, the terms _roff_, _troff_, and _groff_ _language_
       could be used as synonyms.  However _troff_ slightly tends to refer more to the  classical  as‐
       pects, whereas _groff_ emphasizes the GNU extensions, and _roff_ is the general term for the lan‐
       guage.

       The general syntax for writing groff documents is relatively easy, but writing extensions  to
       the roff language can be a bit harder.

       The  roff  language  is  line-oriented.  There are only two kinds of lines, control lines and
       text lines.  The control lines start with a control character, by default a period “**.**”  or  a
       single quote “**'**”; all other lines are text lines.

       **Control** **lines** represent commands, optionally with arguments.  They have the following syntax.
       The leading control character can be followed by a command name; arguments, if any, are sepa‐
       rated  by spaces (but not tab characters) from the command name and among themselves, for ex‐
       ample,

              .command_name arg1 arg2

       For indentation, any number of space or tab characters can be inserted  between  the  leading
       control  character and the command name, but the control character must be on the first posi‐
       tion of the line.

       **Text** **lines** represent the parts that is printed.  They can be modified  by  escape  sequences,
       which  are  recognized by a leading backslash ‘**\**’.  These are in-line or even in-word format‐
       ting elements or functions.  Some of these take arguments separated  by  single  quotes  “**'**”,
       others  are  regulated by a length encoding introduced by an open parenthesis ‘**(**’ or enclosed
       in brackets ‘**[**’ and ‘**]**’.

       The roff language provides flexible instruments  for  writing  language  extension,  such  as
       macros.   When  interpreting  macro  definitions,  the roff system enters a special operating
       mode, called the **copy** **mode**.

       The copy mode behaviour can be quite tricky, but there are some rules that ensure a safe  us‐
       age.

       1.     Printable  backslashes  must  be denoted as **\e**.  To be more precise, **\e** represents the
              current escape character.  To get a backslash glyph, use **\(rs** or **\[rs]**.

       2.     Double all backslashes.

       3.     Begin all text lines with the special non-spacing character **\&**.

       This does not produce the most efficient code, but it should work as a  first  measure.   For
       better strategies, see the _groff_ Texinfo manual and **groff**___**[tmac**(5)](https://www.chedong.com/phpMan.php/man/tmac/5/markdown).

       Reading  roff  source  files is easier, just reduce all double backslashes to a single one in
       all macro definitions.

## GROFF ELEMENTS
       The roff language elements add formatting information to a text file.  The  fundamental  ele‐
       ments are predefined commands and variables that make roff a full-blown programming language.

       There  are  two  kinds  of roff commands, possibly with arguments.  **Requests** are written on a
       line of their own starting with a dot ‘**.**’  or a “**'**”, whereas  **Escape**  **sequences**  are  in-line
       functions and in-word formatting elements starting with a backslash ‘**\**’.

       The  user  can  define  her own formatting commands using the **de** request.  These commands are
       called **macros**, but they are used exactly like requests.  Macro packages are pre-defined  sets
       of  macros  written in the groff language.  A user's possibilities to create escape sequences
       herself is very limited, only special characters can be mapped.

       The groff language provides several kinds of variables with different interfaces.  There  are
       pre-defined variables, but the user can define her own variables as well.

       **String**  variables  store character sequences.  They are set with the **ds** request and retrieved
       by the **\*** escape sequences.  Strings can have variables.

       **Register** variables can store numerical values, numbers with a scale  unit,  and  occasionally
       string-like  objects.   They  are  set with the **nr** request and retrieved by the **\n** escape se‐
       quences.

       **Environments** allow the user to temporarily  store  global  formatting  parameters  like  line
       length, font size, etc. for later reuse.  This is done by the **ev** request.

       **Fonts**  are  identified either by a name or by an internal number.  The current font is chosen
       by the **ft** request or by the **\f** escape sequences.  Each device has special fonts, but the fol‐
       lowing  fonts  are  available  for all devices.  **R** is the standard font Roman.  **B** is its **bold**
       counterpart.  The _italic_ font is called **I** and is available everywhere, but on text devices it
       is displayed as an underlined Roman font.  For the graphical output devices, there exist con‐
       stant-width pendants of these fonts, **CR**, **CI**, and **CB**.  On text devices, all glyphs have a con‐
       stant width anyway.

       **Glyphs**  are  visual  representation  forms  of **characters**.  In groff, the distinction between
       those two elements is not always obvious (and a full discussion is beyond the scope  of  this
       man  page).   A  first  approximation  is that glyphs have a specific size and colour and are
       taken from a specific font; they can't be modified any more – characters are the  input,  and
       glyphs  are  the output.  As soon as an output line has been generated, it no longer contains
       characters but glyphs.  In this man page, we use either ‘glyph’ or ‘character’,  whatever  is
       more appropriate.

       Moreover,  there are some advanced roff elements.  A **diversion** stores (formatted) information
       into a macro for later usage.  See **groff**___**[tmac**(5)](https://www.chedong.com/phpMan.php/man/tmac/5/markdown) for more details.  A **trap**  is  a  positional
       condition  like  a  certain  number of lines from page top or in a diversion or in the input.
       Some action can be prescribed to be run automatically when the condition is met.

       More detailed information and examples can be found in the _groff_ Texinfo manual.

## CONTROL CHARACTERS
       There is a small set of characters that have a special controlling  task  in  certain  condi‐
       tions.

       **.**      A  dot  is  only  special at the beginning of a line or after the condition in the re‐
              quests **if**, **ie**, **el**, and **while**.  There it is the control character that introduces a re‐
              quest (or macro).  By using the **cc** request, the control character can be set to a dif‐
              ferent character, making the dot ‘**.**’  a non-special character.

              In all other positions, it just means a dot character.  In text paragraphs, it is  ad‐
              vantageous to start each sentence at a line of its own.

       **'**      The  single  quote  has  two controlling tasks.  At the beginning of a line and in the
              conditional requests it is the non-breaking control character.  That means that it in‐
              troduces  a  request  like the dot, but with the additional property that this request
              doesn't cause a linebreak.  By using the **c2** request, the non-break  control  character
              can be set to a different character.

              As  a  second task, it is the most commonly used argument separator in some functional
              escape sequences (but any pair of characters not part of the argument  do  work).   In
              all  other positions, it denotes the single quote or apostrophe character.  Groff pro‐
              vides a printable representation with the **\(cq** escape sequence.

       **"**      The double quote is used to enclose arguments in  macros  (but  not  in  requests  and
              strings).   In  the  **ds**  and  **as**  requests,  a leading double quote in the argument is
              stripped off, making everything else afterwards the string  to  be  defined  (enabling
              leading whitespace).  The escaped double quote **\"** introduces a comment.  Otherwise, it
              is not special.  Groff provides a printable representation with the  **\(dq**  escape  se‐
              quence.

       **\**      The  backslash  usually introduces an escape sequence (this can be changed with the **ec**
              request).  A printed version of the escape character is the  **\e**  escape;  a  backslash
              glyph can be obtained by **\(rs**.

       **(**      The  open  parenthesis  is only special in escape sequences when introducing an escape
              name or argument consisting of exactly two characters.  In groff, this  behaviour  can
              be replaced by the **[]** construct.

       **[**      The opening bracket is only special in groff escape sequences; there it is used to in‐
              troduce a long escape name or long escape argument.   Otherwise,  it  is  non-special,
              e.g. in macro calls.

       **]**      The  closing  bracket is only special in groff escape sequences; there it terminates a
              long escape name or long escape argument.  Otherwise, it is non-special.

       _space_  Space characters are only functional characters.  They separate the arguments  in  re‐
              quests, macros, and strings, and the words in text lines.  They are subject to groff's
              horizontal spacing calculations.  To get a defined space width, escape sequences  like
              ‘**\** ’ (this is the escape character followed by a space), **\|**, **\^**, or **\h** should be used.

       _newline_
              In  text paragraphs, newlines mostly behave like space characters.  Continuation lines
              can be specified by an escaped newline, i.e., by specifying a  backslash  ‘**\**’  as  the
              last character of a line.

       _tab_    If  a  tab character occurs during text the interpreter makes a horizontal jump to the
              next pre-defined tab position.  There is a sophisticated interface  for  handling  tab
              positions.

## NUMERICAL EXPRESSIONS
       A  **numerical** **value** is a signed or unsigned integer or float with or without an appended scal‐
       ing indicator.  A **scaling** **indicator** is a one-character abbreviation for a  unit  of  measure‐
       ment.   A number followed by a scaling indicator signifies a size value.  By default, numeri‐
       cal values do not have a scaling indicator, i.e., they are normal numbers.

       The _roff_ language defines the following scaling indicators.

              **c**         centimeter
              **i**         inch
              **P**         pica = 1/6 inch
              **p**         point = 1/72 inch
              **m**         em = the font size in points (approx. width of letter ‘m’)
              **M**         100th of an em
              **n**         en = em/2
              **u**         Basic unit for actual output device
              **v**         Vertical line space in basic units
              **s**         scaled point = 1/_sizescale_ of a point (defined in font _DESC_ file)
              **f**         Scale by 65536.

       **Numerical** **expressions** are combinations of the numerical values defined above with the follow‐
       ing arithmetical operators already defined in classical troff.

              **+**         Addition
              **-**         Subtraction
              *****         Multiplication
              **/**         Division
              **%**         Modulo
              **=**         Equals
              **==**        Equals
              **<**         Less than
              **>**         Greater than
              **<=**        Less or equal
              **>=**        Greater or equal
              **&**         Logical and
              **:**         Logical or
              **!**         Logical not
              **(**         Grouping of expressions
              **)**         Close current grouping

       Moreover, _groff_ added the following operators for numerical expressions:

              _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.

       For details see the _groff_ Texinfo manual.

## CONDITIONS
       **Conditions**  occur in tests raised by the **if**, **ie**, and the **while** requests.  The following table
       characterizes the different types of conditions.

              _N_         A numerical expression _N_ yields true if its value is greater than 0.
              **!**_N_        True if the value of _N_ is 0 (see below).
              **'**_s1_**'**_s2_**'**   True if string _s1_ is identical to string _s2_.
              **!'**_s1_**'**_s2_**'**  True if string _s1_ is not identical to string _s2_ (see below).
              **c**_ch_       True if there is a glyph _ch_ available.
              **d**_name_     True if there is a string, macro, diversion, or request called _name_.
              **e**         Current page number is even.
              **o**         Current page number is odd.
              **m**_name_     True if there is a color called _name_.
              **n**         Formatter is **nroff**.
              **r**_reg_      True if there is a register named _reg_.
              **t**         Formatter is **troff**.
              **F**_font_     True if there exists a font named _font_.
              **S**_style_    True if a style named _style_ has been registered.

       Note that the **!**  operator may only appear at the beginning of an expression, and negates  the
       entire expression.  This maintains bug-compatibility with AT&T _troff_.

## REQUESTS
       This  section  provides  a  short  reference for the predefined requests.  In groff, request,
       macro, and string names can be arbitrarily long.  No bracketing or marking of long  names  is
       needed.

       Most  requests  take  one or more arguments.  The arguments are separated by space characters
       (no tabs!); there is no inherent limit for their length or number.

       Some requests have optional arguments with a different behaviour.  Not all of  these  details
       are outlined here.  Refer to the _groff_ Texinfo manual and **groff**___**[diff**(7)](https://www.chedong.com/phpMan.php/man/diff/7/markdown) for all details.

       In  the  following request specifications, most argument names were chosen to be descriptive.
       Only the following denotations need clarification.

              _c_         denotes a single character.
              _font_      a font either specified as a font name or a font number.
              _anything_  all characters up to the end of the line or within **\{** and **\}**.
              _n_         is a numerical expression that evaluates to an integer value.
              _N_         is an arbitrary numerical expression, signed or unsigned.
              _±_N_        has three meanings depending on its sign, described below.

       If an expression defined as _±_N_ starts with a ‘**+**’ sign the resulting value of  the  expression
       is  added to an already existing value inherent to the related request, e.g. adding to a num‐
       ber register.  If the expression starts with a ‘**-**’ the value of the expression is  subtracted
       from the request value.

       Without  a  sign, _N_ replaces the existing value directly.  To assign a negative number either
       prepend 0 or enclose the negative number in parentheses.

### Request Short Reference
       **.**         Empty line, ignored.  Useful for structuring documents.
       **.\"** _anything_
                 Complete line is a comment.
       **.ab** _string_
                 Print _string_ on standard error, exit program.
       **.ad**       Begin line adjustment for output lines in current adjust mode.
       **.ad** _c_     Start line adjustment in mode _c_ (_c_=l,r,c,b,n).
       **.af** _register_ _c_
                 Assign format _c_ to _register_ (_c_=l,i,I,a,A).
       **.aln** _alias_ _register_
                 Create alias name for _register_.
       **.als** _alias_ _object_
                 Create alias name for request, string, macro, or diversion _object_.
       **.am** _macro_ Append to _macro_ until **..** is encountered.
       **.am** _macro_ _end_
                 Append to _macro_ until **.**_end_ is called.
       **.am1** _macro_
                 Same as **.am** but with compatibility mode switched off during macro expansion.
       **.am1** _macro_ _end_
                 Same as **.am** but with compatibility mode switched off during macro expansion.
       **.ami** _macro_
                 Append to a macro whose name is contained in the string register _macro_ until **..**  is
                 encountered.
       **.ami** _macro_ _end_
                 Append  to  a  macro indirectly.  _macro_ and _end_ are string registers whose contents
                 are interpolated for the macro name and the end macro, respectively.
       **.ami1** _macro_
                 Same as **.ami** but with compatibility mode switched off during macro expansion.
       **.ami1** _macro_ _end_
                 Same as **.ami** but with compatibility mode switched off during macro expansion.
       **.as** _stringvar_ _anything_
                 Append _anything_ to _stringvar_.
       **.as1** _stringvar_ _anything_
                 Same as **.as** but with compatibility mode switched off during string expansion.
       **.asciify** _diversion_
                 Unformat ASCII characters, spaces, and some escape sequences in _diversion_.
### .backtrace
                 Print a backtrace of the input on stderr.
       **.bd** _font_ _N_
                 Embolden _font_ by _N_-1 units.
       **.bd** _S_ _font_ _N_
                 Embolden Special Font _S_ when current font is _font_.
       **.blm**      Unset the blank line macro.
       **.blm** _macro_
                 Set the blank line macro to _macro_.
       **.box**      End current diversion.
       **.box** _macro_
                 Divert to _macro_, omitting a partially filled line.
       **.boxa**     End current diversion.
       **.boxa** _macro_
                 Divert and append to _macro_, omitting a partially filled line.
       **.bp**       Eject current page and begin new page.
       **.bp** _±_N_    Eject current page; next page number _±_N_.
       **.br**       Line break.
       **.brp**      Break output line; adjust if applicable.
       **.break**    Break out of a while loop.
       **.c2**       Reset no-break control character to “**'**”.
       **.c2** _c_     Set no-break control character to _c_.
       **.cc**       Reset control character to ‘**.**’.
       **.cc** _c_     Set control character to _c_.
       **.ce**       Center the next input line.
       **.ce** _N_     Center following _N_ input lines.
       **.cf** _filename_
                 Copy contents of file _filename_ unprocessed to stdout or to the diversion.
       **.cflags** _mode_ _c1_ _c2_ ...
                 Treat characters _c1_, _c2_, ... according to _mode_ number.
       **.ch** _trap_ _N_
                 Change _trap_ location to _N_.
       **.char** _c_ _anything_
                 Define entity _c_ as string _anything_.
       **.chop** _object_
                 Chop the last character off macro, string, or diversion _object_.
       **.class** _name_ _c1_ _c2_ ...
                 Assign a set of characters, character ranges, or classes _c1_, _c2_, ... to _name_.
       **.close** _stream_
                 Close the _stream_.
       **.color**    Enable colors.
       **.color** _N_  If _N_ is zero disable colors, otherwise enable them.
       **.composite** _from_ _to_
                 Map glyph name _from_ to glyph name _to_ while constructing a composite glyph name.
       **.continue** Finish the current iteration of a while loop.
       **.cp**       Enable compatibility mode.
       **.cp** _N_     If _N_ is zero disable compatibility mode, otherwise enable it.
       **.cs** _font_ _N_ _M_
                 Set constant character width mode for _font_ to _N_/36 ems with em _M_.
       **.cu** _N_     Continuous underline in nroff, like **.ul** in troff.
       **.da**       End current diversion.
       **.da** _macro_ Divert and append to _macro_.
       **.de** _macro_ Define or redefine _macro_ until **..** is encountered.
       **.de** _macro_ _end_
                 Define or redefine _macro_ until **.**_end_ is called.
       **.de1** _macro_
                 Same as **.de** but with compatibility mode switched off during macro expansion.
       **.de1** _macro_ _end_
                 Same as **.de** but with compatibility mode switched off during macro expansion.
       **.defcolor** _color_ _scheme_ _component_
                 Define or redefine a color with name _color_.  _scheme_ can be **rgb**, **cym**, **cymk**, **gray**, or
                 **grey**.   _component_ can be single components specified as fractions in the range 0 to
                 1 (default scaling indicator **f**), as a string of two-digit hexadecimal color  compo‐
                 nents  with  a  leading **#**, or as a string of four-digit hexadecimal components with
                 two leading **#**.  The color **default** can't be redefined.
       **.dei** _macro_
                 Define or redefine a macro whose name is contained in the string register _macro_ un‐
                 til **..** is encountered.
       **.dei** _macro_ _end_
                 Define  or  redefine  a macro indirectly.  _macro_ and _end_ are string registers whose
                 contents are interpolated for the macro name and the end macro, respectively.
       **.dei1** _macro_
                 Same as **.dei** but with compatibility mode switched off during macro expansion.
       **.dei1** _macro_ _end_
                 Same as **.dei** but with compatibility mode switched off during macro expansion.
       **.device** _anything_
                 Write _anything_ to the intermediate output as a device control function.
       **.devicem** _name_
                 Write contents of macro or string _name_ uninterpreted to the intermediate output  as
                 a device control function.
       **.di**       End current diversion.
       **.di** _macro_ Divert to _macro_.  See **groff**___**[tmac**(5)](https://www.chedong.com/phpMan.php/man/tmac/5/markdown) for more details.
       **.do** _name_  Interpret **.**_name_ with compatibility mode disabled.
       **.ds** _stringvar_ _anything_
                 Set _stringvar_ to _anything_.
       **.ds1** _stringvar_ _anything_
                 Same as **.ds** but with compatibility mode switched off during string expansion.
       **.dt** _N_ _trap_
                 Set diversion trap to position _N_ (default scaling indicator **v**).
       **.ec**       Reset escape character to ‘**\**’.
       **.ec** _c_     Set escape character to _c_.
       **.ecr**      Restore escape character saved with **.ecs**.
       **.ecs**      Save current escape character.
       **.el** _anything_
                 Else part for if-else (**.ie**) request.
       **.em** _macro_ The _macro_ is run after the end of input.
       **.eo**       Turn off escape character mechanism.
       **.ev**       Switch to previous environment and pop it off the stack.
       **.ev** _env_   Push down environment number or name _env_ to the stack and switch to it.
       **.evc** _env_  Copy  the  contents  of  environment _env_ to the current environment.  No pushing or
                 popping.
       **.ex**       Exit from roff processing.
       **.fam**      Return to previous font family.
       **.fam** _name_ Set the current font family to _name_.
       **.fc**       Disable field mechanism.
       **.fc** _a_     Set field delimiter to _a_ and pad glyph to space.
       **.fc** _a_ _b_   Set field delimiter to _a_ and pad glyph to _b_.
       **.fchar** _c_ _anything_
                 Define fallback character (or glyph) _c_ as string _anything_.
       **.fcolor**   Set fill color to previous fill color.
       **.fcolor** _c_ Set fill color to _c_.
       **.fi**       Fill output lines.
       **.fl**       Flush output buffer.
       **.fp** _n_ _font_
                 Mount _font_ on position _n_.
       **.fp** _n_ _internal_ _external_
                 Mount font with long _external_ name to short _internal_ name on position _n_.
       **.fschar** _f_ _c_ _anything_
                 Define fallback character (or glyph) _c_ for font _f_ as string _anything_.
       **.fspecial** _font_
                 Reset list of special fonts for _font_ to be empty.
       **.fspecial** _font_ _s1_ _s2_ ...
                 When the current font is _font_, then the fonts _s1_, _s2_, ... are special.
       **.ft**       Return to previous font.  Same as **\** or **\**.
       **.ft** _font_  Change to font name or number _font_; same as **\f[**_font_**]** escape sequence.
       **.ftr** _font1_ _font2_
                 Translate _font1_ to _font2_.
       **.fzoom** _font_
                 Don't magnify _font_.
       **.fzoom** _font_ _zoom_
                 Set zoom factor for _font_ (in multiples of 1/1000th).
       **.gcolor**   Set glyph color to previous glyph color.
       **.gcolor** _c_ Set glyph color to _c_.
       **.hc**       Remove additional hyphenation indicator character.
       **.hc** _c_     Set up additional hyphenation indicator character _c_.
       **.hcode** _c1_ _code1_ [_c2_ _code2_] ...
                 Set the hyphenation code of character _c1_ to _code1_, that of _c2_ to _code2_, etc.
       **.hla** _lang_ Set the current hyphenation language to _lang_.
       **.hlm** _n_    Set the maximum number of consecutive hyphenated lines to _n_.
       **.hpf** _file_ Read hyphenation patterns from _file_.
       **.hpfa** _file_
                 Append hyphenation patterns from _file_.
       **.hpfcode** _a_ _b_ _c_ _d_ ...
                 Set input mapping for **.hpf**.
       **.hw** _words_ List of _words_ with exceptional hyphenation.
       **.hy** _N_     Switch to hyphenation mode _N_.
       **.hym** _n_    Set the hyphenation margin to _n_ (default scaling indicator **m**).
       **.hys** _n_    Set the hyphenation space to _n_.
       **.ie** _cond_ _anything_
                 If _cond_ then _anything_ else goto **.el**.
       **.if** _cond_ _anything_
                 If _cond_ then _anything_; otherwise do nothing.
       **.ig**       Ignore text until **..** is encountered.
       **.ig** _end_   Ignore text until **.**_end_ is called.
       **.in**       Change to previous indentation value.
       **.in** _±_N_    Change indentation according to _±_N_ (default scaling indicator **m**).
       **.it** _N_ _trap_
                 Set an input-line count trap for the next _N_ lines.
       **.itc** _N_ _trap_
                 Same as **.it** but don't count lines interrupted with **\c**.
       **.kern**     Enable pairwise kerning.
       **.kern** _n_   If _n_ is zero, disable pairwise kerning, otherwise enable it.
       **.lc**       Remove leader repetition glyph.
       **.lc** _c_     Set leader repetition glyph to _c_.
       **.length** _register_ _anything_
                 Write the length of the string _anything_ to _register_.
       **.linetabs** Enable line-tabs mode (i.e., calculate tab positions relative to output line).
       **.linetabs** _n_
                 If _n_ is zero, disable line-tabs mode, otherwise enable it.
       **.lf** _N_     Set input line number to _N_.
       **.lf** _N_ _file_
                 Set input line number to _N_ and filename to _file_.
       **.lg** _N_     Ligature mode on if _N_>0.
       **.ll**       Change to previous line length.
       **.ll** _±_N_    Set line length according to _±_N_ (default length 6.5**i**, default scaling indicator **m**).
       **.lsm**      Unset the leading spaces macro.
       **.lsm** _macro_
                 Set the leading spaces macro to _macro_.
       **.ls**       Change to the previous value of additional intra-line skip.
       **.ls** _N_     Set additional intra-line skip value to _N_, i.e., _N_-1 blank lines are inserted after
                 each text output line.
       **.lt** _±_N_    Length of title (default scaling indicator **m**).
       **.mc**       Margin glyph off.
       **.mc** _c_     Print glyph _c_ after each text line at actual distance from right margin.
       **.mc** _c_ _N_   Set  margin glyph to _c_ and distance to _N_ from right margin (default scaling indica‐
                 tor **m**).
       **.mk** [_register_]
                 Mark current vertical position in _register_, or in an internal register used by  **.rt**
                 if no argument.
       **.mso** _file_ The same as **.so** except that _file_ is searched in the tmac directories.
       **.na**       No output-line adjusting.
       **.ne**       Need a one-line vertical space.
       **.ne** _N_     Need _N_ vertical space (default scaling indicator **v**).
       **.nf**       No filling or adjusting of output lines.
       **.nh**       No hyphenation.
       **.nm**       Number mode off.
       **.nm** _±_N_ [_M_ [_S_ [_I_]]]
                 In line number mode, set number, multiple, spacing, and indentation.
       **.nn**       Do not number next line.
       **.nn** _N_     Do not number next _N_ lines.
       **.nop** _anything_
                 Always process _anything_.
       **.nr** _register_ _±_N_ [_M_]
                 Define or modify _register_ using _±_N_ with auto-increment _M_.
       **.nroff**    Make the built-in conditions **n** true and **t** false.
       **.ns**       Turn on no-space mode.
       **.nx**       Immediately jump to end of current file.
       **.nx** _filename_
                 Immediately continue processing with file _file_.
       **.open** _stream_ _filename_
                 Open _filename_ for writing and associate the stream named _stream_ with it.
       **.opena** _stream_ _filename_
                 Like **.open** but append to it.
       **.os**       Output vertical distance that was saved by the **sv** request.
       **.output** _string_
                 Emit  _string_ directly to intermediate output, allowing leading whitespace if _string_
                 starts with **"** (which is stripped off).
       **.pc**       Reset page number character to ‘**%**’.
       **.pc** _c_     Page number character.
       **.pev**      Print the current environment and each defined environment state to stderr.
       **.pi** _program_
                 Pipe output to _program_ (nroff only).
       **.pl**       Set page length to default 11**i**.  The current page length is stored in register **.p**.
       **.pl** _±_N_    Change page length to _±_N_ (default scaling indicator **v**).
       **.pm**       Print macro names and sizes (number of blocks of 128 bytes).
       **.pm** _t_     Print only total of sizes of macros (number of 128 bytes blocks).
       **.pn** _±_N_    Next page number _N_.
       **.pnr**      Print the names and contents of all currently defined number registers on stderr.
       **.po**       Change to previous page offset.  The current page offset is available  in  register
                 **.o**.
       **.po** _±_N_    Page offset _N_.
       **.ps**       Return to previous point size.
       **.ps** _±_N_    Point size; same as **\s[**_±_N_**]**.
       **.psbb** _filename_
                 Get the bounding box of a PostScript image _filename_.
       **.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  di‐
                 version traps) on stderr.
       **.pvs**      Change to previous post-vertical line spacing.
       **.pvs** _±_N_   Change post-vertical line spacing according to _±_N_ (default scaling indicator **p**).
       **.rchar** _c1_ _c2_ ...
                 Remove the definitions of entities _c1_, _c2_, ...
       **.rd** _prompt_
                 Read insertion.
       **.return**   Return from a macro.
       **.return** _anything_
                 Return  twice,  namely  from  the macro at the current level and from the macro one
                 level higher.
       **.rfschar** _f_ _c1_ _c2_ ...
                 Remove the definitions of entities _c1_, _c2_, ... for font _f_.
       **.rj** _n_     Right justify the next _n_ input lines.
       **.rm** _name_  Remove request, macro, diversion, or string _name_.
       **.rn** _old_ _new_
                 Rename request, macro, diversion, or string _old_ to _new_.
       **.rnn** _reg1_ _reg2_
                 Rename register _reg1_ to _reg2_.
       **.rr** _register_
                 Remove _register_.
       **.rs**       Restore spacing; turn no-space mode off.
       **.rt**       Return _(upward_ _only)_ to vertical position marked by **.mk** on the current page.
       **.rt** _±_N_    Return _(upward_ _only)_ to specified distance from the top of the page (default  scal‐
                 ing indicator **v**).
       **.schar** _c_ _anything_
                 Define global fallback character (or glyph) _c_ as string _anything_.
       **.shc**      Reset soft hyphen glyph to **\(hy**.
       **.shc** _c_    Set the soft hyphen glyph to _c_.
       **.shift** _n_  In a macro, shift the arguments by _n_ positions.
       **.sizes** _s1_ _s2_ ... _s_n [**0**]
                 Set available font sizes similar to the **sizes** command in a _DESC_ file.
       **.so** _filename_
                 Include source file.
       **.sp**       Skip one line vertically.
       **.sp** _N_     Space  vertical distance _N_ up or down according to sign of _N_ (default scaling indi‐
                 cator **v**).
       **.special**  Reset global list of special fonts to be empty.
       **.special** _s1_ _s2_ ...
                 Fonts _s1_, _s2_, etc. are special and are searched for glyphs not in the current font.
### .spreadwarn
                 Toggle the spread warning on and off without changing its value.
       **.spreadwarn** _limit_
                 Emit a warning if each space in an output line is widened by _limit_ or more (default
                 scaling indicator **m**).
       **.ss** _N_     Set space glyph size to _N_/12 of the space width in the current font.
       **.ss** _N_ _M_   Set space glyph size to _N_/12 and sentence space size set to _M_/12 of the space width
                 in the current font.
       **.sty** _n_ _style_
                 Associate _style_ with font position _n_.
       **.substring** _xx_ _n1_ _n2_
                 Replace the string named _xx_ with the substring defined by the indices _n1_ and _n2_.
       **.sv**       Save 1 v of vertical space.
       **.sv** _N_     Save the vertical distance _N_ for later output with **os** request (default scaling  in‐
                 dicator **v**).
       **.sy** _command-line_
                 Execute program _command-line_.
       **.ta** _T_ _N_   Set  tabs  after  every  position  that is a multiple of _N_ (default scaling indica‐
                 tor **m**).
       **.ta** _n1_ _n2_ ... _n_n **T** _r1_ _r2_ ... _r_n
                 Set tabs at positions _n1_,  _n2_,  ...,  _n_n,  then  set  tabs  at  _n_n+_m_×_r_n+_r1_  through
                 _n_n+_m_×_r_n+_r_n, where _m_ increments from 0, 1, 2, ... to infinity.
       **.tc**       Remove tab repetition glyph.
       **.tc** _c_     Set tab repetition glyph to _c_.
       **.ti** _±_N_    Temporary indent next line (default scaling indicator **m**).
       **.tkf** _font_ _s1_ _n1_ _s2_ _n2_
                 Enable track kerning for _font_.
       **.tl** ’’_left_’’_center_’’_right_’’
                 Three-part title.
       **.tm** _anything_
                 Print _anything_ on stderr.
       **.tm1** _anything_
                 Print  _anything_  on  stderr,  allowing leading whitespace if _anything_ starts with **"**
                 (which is stripped off).
       **.tmc** _anything_
                 Similar to **.tm1** without emitting a final newline.
       **.tr** _abcd_...
                 Translate _a_ to _b_, _c_ to _d_, etc. on output.
       **.trf** _filename_
                 Transparently output the contents of file _filename_.
       **.trin** _abcd_...
                 This is the same as the **tr** request except that the **asciify** request uses the charac‐
                 ter code (if any) before the character translation.
       **.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 **\!**.
       **.troff**    Make the built-in conditions **t** true and **n** false.
       **.uf** _font_  Set underline font to _font_ (to be switched to by **.ul**).
       **.ul** _N_     Underline (italicize in troff) _N_ input lines.
       **.unformat** _diversion_
                 Unformat space characters and tabs in _diversion_, preserving font information.
       **.vpt** _n_    Enable vertical position traps if _n_ is non-zero, disable them otherwise.
       **.vs**       Change to previous vertical base line spacing.
       **.vs** _±_N_    Set vertical base line spacing to _±_N_ (default scaling indicator **p**).
       **.warn** _n_   Set warnings code to _n_.
       **.warnscale** _si_
                 Set scaling indicator used in warnings to _si_.
       **.wh** _N_     Remove (first) trap at position _N_.
       **.wh** _N_ _trap_
                 Set location trap; negative means from page bottom.
       **.while** _cond_ _anything_
                 While condition _cond_ is true, accept _anything_ as input.
       **.write** _stream_ _anything_
                 Write _anything_ to the stream named _stream_.
       **.writec** _stream_ _anything_
                 Similar to **.write** without emitting a final newline.
       **.writem** _stream_ _xx_
                 Write contents of macro or string _xx_ to the stream named _stream_.

       Besides these standard groff requests, there might be further macro calls.  They  can  origi‐
       nate from a macro package (see [**roff**(7)](https://www.chedong.com/phpMan.php/man/roff/7/markdown) for an overview) or from a preprocessor.

       Preprocessor macros are easy to recognize.  They enclose their code between a pair of charac‐
       teristic macros.

                             ┌─────────────┬─────────────────┬────────────────┐
                             │preprocessor │   start macro   │    end macro   │
                             ├─────────────┼─────────────────┼────────────────┤
                             │    **chem**     │     **.cstart**     │     **.cend**      │
                             │    **eqn**      │       **.EQ**       │      **.EN**       │
                             │    **grap**     │       **.G1**       │      **.G2**       │
                             │    **grn**      │       **.GS**       │      **.GE**       │
                             │   **ideal**     │       **.IS**       │      **.IE**       │
                             │             │                 │      **.IF**       │
                             │    **pic**      │       **.PS**       │      **.PE**       │
                             │   **refer**     │       **.R1**       │      **.R2**       │
                             │   **soelim**    │      _none_       │      _none_      │
                             │    **tbl**      │       **.TS**       │      **.TE**       │
                             ├─────────────┼─────────────────┼────────────────┤
                             │ **glilypond**   │ **.lilypond** **start** │ **.lilypond** **stop** │
                             │   **gperl**     │   **.Perl** **start**   │   **.Perl** **stop**   │
                             │  **gpinyin**    │  **.pinyin** **start**  │  **.pinyin** **stop**  │
                             └─────────────┴─────────────────┴────────────────┘
       Note that the ‘ideal’ preprocessor is not available in groff yet.

## ESCAPE SEQUENCES
       Escape sequences are in-line language elements usually introduced by a backslash ‘**\**’ and fol‐
       lowed  by an escape name and sometimes by a required argument.  Input processing is continued
       directly after the escaped character or the argument (without an intervening separation char‐
       acter).   So  there  must be a way to determine the end of the escape name and the end of the
       argument.

       This is done by enclosing names (escape name and arguments consisting of a variable name)  by
       a pair of brackets **[**_name_**]** and constant arguments (number expressions and characters) by apos‐
       trophes (ASCII 0x27) like ’’_constant_’’.

       There are abbreviations for short names.  Two-character escape names can be specified  by  an
       opening  parenthesis like **\(**xy or **\*(**xy without a closing counterpart.  And all one-character
       names different from the special characters ‘**[**’ and ‘**(**’  can  even  be  specified  without  a
       marker, for example **\n**c or **\$**c.

       Constant  arguments  of  length  1 can omit the marker apostrophes, too, but there is no two-
       character analogue.

       While one-character escape sequences are mainly used for in-line functions and system-related
       tasks, the two-letter names following the **\(** construct are glyphs predefined by the roff sys‐
       tem; these are called ‘Special Characters’ in the classical documentation.  Escapes sequences
       of the form **\[**_name_**]** denote glyphs too.

### Single-Character Escapes
       **\"**     Start of a comment.  Everything up to the end of the line is ignored.
       **\#**     Everything  up  to  and including the next newline is ignored.  This is interpreted in
              copy mode.  This is like **\"** except that the terminating newline is ignored as well.
       **\***_s_    The string stored in the string variable with one-character name _s_.
       **\*(**_st_  The string stored in the string variable with two-character name _st_.
       **\*[**_string_**]**
              The string stored in the string variable with name _string_ (with arbitrary length).
       **\*[**_stringvar_ _arg1_ _arg2_ ...**]**
              The string stored in the string variable with arbitrarily long name _stringvar_,  taking
              _arg1_, _arg2_, ... as arguments.
       **\$0**    The  name  by  which  the current macro was invoked.  The **als** request can make a macro
              have more than one name.
       **\$**_x_    Macro or string argument with one-digit number _x_ in the range 1 to 9.
       **\$(**_xy_  Macro or string argument with two-digit number _xy_ (larger than zero).
       **\$[**_nexp_**]**
              Macro or string argument with number _nexp_, where _nexp_ is a numerical expression evalu‐
              ating to an integer ≥1.
       **\$***    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.
       **\\**     reduces  to a single backslash; useful to delay its interpretation as escape character
              in copy mode.  For a printable backslash, use **\e**, or even better **\[rs]**, to be indepen‐
              dent from the current escape character.
       **\**´´     The acute accent ´; same as **\(aa**.  Unescaped: apostrophe, right quotation mark, single
              quote (ASCII 0x27).
       **\`**     The grave accent `; same as **\(ga**.  Unescaped: left quote, backquote (ASCII 0x60).
       **\-**     The - (minus) sign in the current font.
       **\**___     The same as **\(ul**, the underline character.
       **\.**     The same as a dot (‘.’).  Necessary in nested macro definitions so that ‘\\..’ expands
              to ‘..’.
       **\%**     Default optional hyphenation character.
       **\!**     Transparent line indicator.
       **\?**_anything_**?**
              In a diversion, this transparently embeds _anything_ in the diversion.  _anything_ is read
              in copy mode.  See also the escape sequences **\!**  and **\?**.
       **\**_space_ Unpaddable space size space glyph (no line break).
       **\0**     Digit-width space.
       **\|**     1/6 em narrow space glyph; zero width in nroff.
       **\^**     1/12 em half-narrow space glyph; zero width in nroff.
       **\&**     Non-printable, zero-width glyph.
       **\)**     Like **\&** except that it behaves like a glyph declared with the  **cflags**  request  to  be
              transparent for the purposes of end-of-sentence recognition.
       **\/**     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.
       **\,**     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.
       **\~**     Unbreakable  space  that  stretches  like a normal inter-word space when a line is ad‐
              justed.
       **\:**     Inserts a zero-width break point (similar to **\%** but without a soft hyphen character).
       **\**_newline_
              Ignored newline, for continuation lines.
       **\{**     Begin conditional input.
       **\}**     End conditional input.
       **\(**_sc_   A glyph with two-character name _sc_; see section “Special Characters” below.
       **\[**_name_**]**
              A glyph with name _name_ (of arbitrary length).
       **\[**_comp1_ _comp2_ ...**]**
              A composite glyph with components _comp1_, _comp2_, ...
       **\a**     Non-interpreted leader character.
       **\A**’’_anything_’’
              If _anything_ is acceptable as a name of a string, macro, diversion, register,  environ‐
              ment or font it expands to 1, and to 0 otherwise.
       **\b**’’_abc_...’’
              Bracket building function.
       **\B**’’_anything_’’
              If _anything_ is acceptable as a valid numeric expression it expands to 1, and to 0 oth‐
              erwise.
       **\c**     Continue output line at next input line.  Anything after this escape on the same  line
              is  ignored  except **\R** (which works as usual).  Anything before **\c** on the same line is
              appended to the current partial output line.  The next non-command line after  a  line
              interrupted with **\c** counts as a new input line.
       **\C**’’_glyph_’’
              The glyph called _glyph_; same as **\[**_glyph_**]**, but compatible to other roff versions.
       **\d**     Forward (down) 1/2 em (1/2 line in nroff).
       **\D**’’_charseq_’’
              Draw  a  graphical element defined by the characters in _charseq_; see the _groff_ Texinfo
              manual for details.
       **\e**     Printable version of the current escape character.
       **\E**     Equivalent to an escape character, but is not interpreted in copy mode.
       **\f**_F_    Change to font with one-character name or one-digit number _F_.
       **\fP**    Switch back to previous font.
       **\f(**_fo_  Change to font with two-character name or two-digit number _fo_.
       **\f[**_font_**]**
              Change to font with arbitrarily long name or number expression _font_.
       **\f[]**   Switch back to previous font.
       **\F**_f_    Change to font family with one-character name _f_.
       **\F(**_fm_  Change to font family with two-character name _fm_.
       **\F[**_fam_**]**
              Change to font family with arbitrarily long name _fam_.
       **\F[]**   Switch back to previous font family.
       **\g**_r_    Return format of register with one-character name _r_ suitable for **af** request.
       **\g(**_rg_  Return format of register with two-character name _rg_ suitable for **af** request.
       **\g[**_reg_**]**
              Return format of register with arbitrarily long name _reg_ suitable for **af** request.
       **\h**’’_N_’’  Local horizontal motion; move right _N_ (left if negative).
       **\H**’’_N_’’  Set height of current font to _N_.
       **\k**_r_    Mark horizontal input place in one-character register _r_.
       **\k(**_rg_  Mark horizontal input place in two-character register _rg_.
       **\k[**_reg_**]**
              Mark horizontal input place in register with arbitrarily long name _reg_.
       **\l**’’_Nc_’’ Horizontal line drawing function (optionally using character _c_).
       **\L**’’_Nc_’’ Vertical line drawing function (optionally using character _c_).
       **\m**_c_    Change to color with one-character name _c_.
       **\m(**_cl_  Change to color with two-character name _cl_.
       **\m[**_color_**]**
              Change to color with arbitrarily long name _color_.
       **\m[]**   Switch back to previous color.
       **\M**_c_    Change filling color for closed drawn objects to color with one-character name _c_.
       **\M(**_cl_  Change filling color for closed drawn objects to color with two-character name _cl_.
       **\M[**_color_**]**
              Change filling color for closed drawn objects to  color  with  arbitrarily  long  name
              _color_.
       **\M[]**   Switch to previous fill color.
       **\n**_r_    The numerical value stored in the register variable with the one-character name _r_.
       **\n(**_re_  The numerical value stored in the register variable with the two-character name _re_.
       **\n[**_reg_**]**
              The numerical value stored in the register variable with arbitrarily long name _reg_.
       **\N**’’_n_’’  Typeset  the  glyph  with index _n_ in the current font.  No special fonts are searched.
              Useful for adding (named) entities to a document using the **char** request and friends.
       **\o**’’_abc_...’’
              Overstrike glyphs _a_, _b_, _c_, etc.
       **\O0**    Disable glyph output.  Mainly for internal use.
       **\O1**    Enable glyph output.  Mainly for internal use.
       **\p**     Break output line at next word boundary; adjust if applicable.
       **\r**     Reverse 1 em vertical motion (reverse line in nroff).
       **\R**’’_name_ _±_n_’’
              The same as **.nr** _name_ _±_n_.
       **\s**_±_N_   Set/increase/decrease the point size to/by _N_ scaled points; _N_ is a one-digit number in
              the range 1 to 9.  Same as **ps** request.
       **\s(**_±_N_
       **\s**±±**(**_N_  Set/increase/decrease  the  point  size to/by _N_ scaled points; _N_ is a two-digit number
              ≥1.  Same as **ps** request.
       **\s[**_±_N_**]**
       **\s**±±**[**_N_**]**
       **\s**’’_±_N_’’
       **\s**±±’’_N_’’ Set/increase/decrease the point size to/by _N_ scaled points.  Same as **ps** request.
       **\S**’’_N_’’  Slant output by _N_ degrees.
       **\t**     Non-interpreted horizontal tab.
       **\u**     Reverse (up) 1/2 em vertical motion (1/2 line in nroff).
       **\v**’’_N_’’  Local vertical motion; move down _N_ (up if negative).
       **\V**_e_    The contents of the environment variable with one-character name _e_.
       **\V(**_ev_  The contents of the environment variable with two-character name _ev_.
       **\V[**_env_**]**
              The contents of the environment variable with arbitrarily long name _env_.
       **\w**’’_string_’’
              The width of the glyph sequence _string_.
       **\x**’’_N_’’  Extra line-space function (negative before, positive after).
       **\X**’’_string_’’
              Output _string_ as device control function.
       **\Y**_n_    Output string variable or macro with one-character name _n_ uninterpreted as device con‐
              trol function.
       **\Y(**_nm_  Output  string  variable  or  macro with two-character name _nm_ uninterpreted as device
              control function.
       **\Y[**_name_**]**
              Output string variable or macro with arbitrarily long name _name_ uninterpreted  as  de‐
              vice control function.
       **\z**_c_    Print _c_ with zero width (without spacing).
       **\Z**’’_anything_’’
              Print _anything_ and then restore the horizontal and vertical position; _anything_ may not
              contain tabs or leaders.

       The escape sequences **\e**, **\.**, **\"**, **\$**, **\***, **\a**, **\n**, **\t**, **\g**, and **\**_newline_ are interpreted in copy
       mode.

       Escape  sequences  starting with **\(** or **\[** do not represent single character escape sequences,
       but introduce escape names with two or more characters.

       If a backslash is followed by a character that does not constitute a defined escape sequence,
       the backslash is silently ignored and the character maps to itself.

### Special Characters
       [Note:  ‘Special  Characters’  is a misnomer; those entities are (output) glyphs, not (input)
       characters.]

       Common special characters are predefined by escape sequences of the form **\(**_xy_ with characters
       _x_ and _y_.  In _groff_, it is also possible to use the writing **\[**_xy_**]** as well.

       Some  of  these special characters exist in the usual font while most of them are only avail‐
       able in the special font.  Below you can see a small selection of the most important  glyphs;
       a complete list can be found in **groff**___**[char**(7)](https://www.chedong.com/phpMan.php/man/char/7/markdown).

              **\(Do**   Dollar **$**
              **\(Eu**   Euro €€
              **\(Po**   British pound sterling ££
              **\(aq**   Apostrophe quote **'**
              **\(bu**   Bullet sign ••
              **\(co**   Copyright ©©
              **\(cq**   Single closing quote (right) ’’
              **\(ct**   Cent ¢¢
              **\(dd**   Double dagger ‡‡
              **\(de**   Degree °°
              **\(dg**   Dagger ††
              **\(dq**   Double quote (ASCII 34) **"**
              **\(em**   Em-dash ——
              **\(en**   En-dash ––
              **\(hy**   Hyphen ‐‐
              **\(lq**   Double quote left ““
              **\(oq**   Single opening quote (left) ‘‘
              **\(rg**   Registered sign ®®
              **\(rq**   Double quote right ””
              **\(rs**   Printable backslash character **\**
              **\(sc**   Section sign §§
              **\(tm**   Trademark symbol ™™
              **\(ul**   Underline character ___
              **\(==**   Identical ≡≡
              **\(>=**   Larger or equal ≥≥
              **\(<=**   Less or equal ≤≤
              **\(!=**   Not equal ≠≠
              **\(->**   Right arrow →→
              **\(<-**   Left arrow ←←
              **\(+-**   Plus-minus sign ±±

### Unicode Characters
       The  extended  escape  **u** allows the inclusion of all available Unicode characters into a _roff_
       file.

       **\[u**_xxxx_**]**
              **u** is the escape name.  _xxxx_ is a hexadecimal number of four hex digits, such  as  **0041**
              for the letter **A**, thus **\[u0041]**.

       **\[u**_yyyyy_**]**
              **u** is the escape name.  _yyyyy_ is a hexadecimal number of five hex digits, such as **2FA1A**
              for a Chinese-looking character from the Unicode block  _CJK_  _Compatibility_  _Ideographs_
              _Supplement_, thus **\[u2FA1A]**.

       The hexadecimal value indicates the corresponding Unicode code point for a character.

       **\[u**_hex1_hex2_**]**
       **\[u**_hex1_hex2_hex3_**]**
              _hex1_,  _hex2_,  and  _hex3_ are all Unicode hexadecimal codes (4 or 5 hex digits) that are
              used for overstriking, e.g. **\[u0041**___**0301]** is _A_ _acute_, which can also be  specified  as
              ÁÁ; see **groff**___**[char**(7)](https://www.chedong.com/phpMan.php/man/char/7/markdown).

       The  availability of the Unicode characters depends on the font used.  For text mode, the de‐
       vice **-Tutf8** is quite complete; for _troff_ modes it might happen that some or  many  characters
       will not be displayed.  Please check your fonts.

### Strings
       Strings are defined by the **ds** request and can be retrieved by the **\*** escape sequence.

       Strings  share  their  name  space  with macros.  So strings and macros without arguments are
       roughly equivalent; it is possible to call a string like a macro and vice versa, but this of‐
       ten  leads  to  unpredictable  results.   The  following string is the only one predefined in
       groff.

       \*[**.T**]    The name of the current output device as specified by the **-T** command-line option.

## REGISTERS
       Registers are variables that store a value.  In groff, most registers store numerical  values
       (see section “Numerical Expressions” above), but some can also hold a string value.

       Each  register  is  given a name.  Arbitrary registers can be defined and set with the **nr** re‐
       quest.

       The value stored in a register can be retrieved by the escape sequences introduced by **\n**.

       Most useful are predefined registers.  In the following the notation _name_ is used to refer to
       register **name** to make clear that we speak about registers.  Please keep in mind that the **\n[]**
       decoration is not part of the register name.

### Read-only Registers
       The following registers have predefined values that should not be modified by the user  (usu‐
       ally,  registers starting with a dot are read-only).  Mostly, they provide information on the
       current settings or store results from request calls.

       \n[**$$**]    The process ID of **troff**.
       \n[**.$**]    Number of arguments in the current macro or string.
       \n[**.a**]    Post-line extra line-space most recently utilized using **\x**.
       \n[**.A**]    Set to 1 in **troff** if option **-A** is used; always 1 in **nroff**.
       \n[**.b**]    The emboldening offset while **.bd** is active.
       \n[**.br**]   Within a macro, set to 1 if macro called with the ‘normal’ control  character,  and
                 to 0 otherwise.
       \n[**.c**]    Current input line number.
       \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[**.d**]    Current vertical place in current diversion; equal to register **nl**.
       \n[**.ev**]   The name or number of the current environment (string-valued).
       \n[**.f**]    Current font number.
       \n[**.F**]    The name of the current input file (string-valued).
       \n[**.fam**]  The current font family (string-valued).
       \n[**.fn**]   The current (internal) real font name (string-valued).
       \n[**.fp**]   The number of the next free font position.
       \n[**.g**]    Always 1 in GNU troff.  Macros should use it to test if running under groff.
       \n[**.h**]    Text base-line high-water mark on current page or diversion.
       \n[**.H**]    Number of basic units per horizontal unit of output device resolution.
       \n[**.height**]
                 The current font height 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** re‐
                 quest.
       \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[**.i**]    Current indentation.
       \n[**.in**]   The indentation that applies to the current output line.
       \n[**.int**]  Positive if last output line contains **\c**.
       \n[**.j**]    The current adjustment mode.  It can be stored and used to set adjustment.  (n = 1,
                 b = 1, l = 0, r = 5, c = 3).
       \n[**.k**]    The current horizontal output position (relative to the current indentation).
       \n[**.kern**] 1 if pairwise kerning is enabled, 0 otherwise.
       \n[**.l**]    Current line length.
       \n[**.L**]    The current line spacing setting as set by **.ls**.
       \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 current drawing color (string-valued).
       \n[**.M**]    The current background color (string-valued).
       \n[**.n**]    Length of text portion on previous output line.
       \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 register **.trunc**.
       \n[**.ns**]   1 if in no-space mode, 0 otherwise.
       \n[**.o**]    Current page offset.
       \n[**.O**]    The suppression nesting level (see **\O**).
       \n[**.p**]    Current page length.
       \n[**.P**]    1 if the current page is being printed, 0 otherwise (as determined by the  **-o**  com‐
                 mand-line option).
       \n[**.pe**]   1 during page ejection, 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 spacing.
       \n[**.R**]    The number of unused number registers.  Always 10000 in GNU troff.
       \n[**.rj**]   The number of lines to be right-justified as set by the **rj** request.
       \n[**.s**]    Current point size as a decimal fraction.
       \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 (string-valued).
       \n[**.ss**]   The value of the parameters set by the first argument of the **ss** request.
       \n[**.sss**]  The value of the parameters set by the second argument of the **ss** request.
       \n[**.sty**]  The current font style (string-valued).
       \n[**.t**]    Vertical distance to the next trap.
       \n[**.T**]    Set to 1 if option **-T** is used.
       \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 posi‐
                 tion trap, or, if the trap was sprung by an **ne** request, minus the amount of  verti‐
                 cal motion produced by **.ne**.  Useful in conjunction with the register **.ne**.
       \n[**.u**]    Equal to 1 in fill mode and 0 in no-fill mode.
       \n[**.U**]    Equal to 1 in safer mode and 0 in unsafe mode.
       \n[**.v**]    Current vertical line spacing.
       \n[**.V**]    Number of basic units per vertical unit of output device resolution.
       \n[**.vpt**]  1 if vertical position traps are enabled, 0 otherwise.
       \n[**.w**]    Width of previous glyph.
       \n[**.warn**] The sum of the number codes of the currently enabled warnings.
       \n[**.x**]    The major version number.
       \n[**.y**]    The minor version number.
       \n[**.Y**]    The revision number of groff.
       \n[**.z**]    Name of current diversion.
       \n[**.zoom**] Zoom factor for current font (in multiples of 1/1000th; zero if no magnification).

### Writable Registers
       The  following  registers  can be read and written by the user.  They have predefined default
       values, but these can be modified for customizing a document.

       \n[**%**]     Current page number.
       \n[**c.**]    Current input line number.
       \n[**ct**]    Character type (set by width function **\w**).
       \n[**dl**]    Maximal width of last completed diversion.
       \n[**dn**]    Height of last completed diversion.
       \n[**dw**]    Current day of week (1–7).
       \n[**dy**]    Current day of month (1–31).
       \n[**hours**] The number of hours past midnight.  Initialized at start-up.
       \n[**hp**]    Current horizontal position at input line.
       \n[**llx**]   Lower left x-coordinate (in PostScript units) of a given PostScript image  (set  by
                 **.psbb**).
       \n[**lly**]   Lower  left  y-coordinate (in PostScript units) of a given PostScript image (set by
                 **.psbb**).
       \n[**ln**]    Output line number.
       \n[**lsn**]   The number of leading spaces of an input line.
       \n[**lss**]   The horizontal space corresponding to the leading spaces of an input line.
       \n[**minutes**]
                 The number of minutes after the hour.  Initialized at start-up.
       \n[**mo**]    Current month (1–12).
       \n[**nl**]    Vertical position of last printed text base-line.
       \n[**opmaxx**]
       \n[**opmaxy**]
       \n[**opminx**]
       \n[**opminy**]
                 These four registers mark the top left and bottom right hand corners of a box which
                 encompasses all written glyphs.  They are reset to -1 by **\O**_0_ or **\O**_1_.
       \n[**rsb**]   Like register **sb**, but takes account of the heights and depths of glyphs.
       \n[**rst**]   Like register **st**, but takes account of the heights and depths of glyphs.
       \n[**sb**]    Depth of string below base line (generated by width function **\w**).
       \n[**seconds**]
                 The number of seconds after the minute.  Initialized at start-up.
       \n[**skw**]   Right skip width from the center of the last glyph in the **\w** argument.
       \n[**slimit**]
                 If  greater  than 0, the maximum number of objects on the input stack.  If ≤0 there
                 is no limit, i.e., recursion can continue until virtual memory is exhausted.
       \n[**ssc**]   The amount of horizontal space (possibly negative) that should be added to the last
                 glyph before a subscript (generated by width function **\w**).
       \n[**st**]    Height of string above base line (generated by width function **\w**).
       \n[**systat**]
                 The return value of the _system()_ function executed by the last **sy** request.
       \n[**urx**]   Upper  right x-coordinate (in PostScript units) of a given PostScript image (set by
                 **.psbb**).
       \n[**ury**]   Upper right y-coordinate (in PostScript units) of a given PostScript image (set  by
                 **.psbb**).
       \n[**year**]  The current year (year 2000 compliant).
       \n[**yr**]    Current year minus 1900.  For Y2K compliance use register **year** instead.

## HYPHENATION
       The  **.hy**  request, given an integer argument, controls when hyphenation applies.  The default
       value is **1**, which enables hyphenation almost everywhere (see below).   Macro  packages  often
       override this default.

       **1**      disables hyphenation only after the first and before the last character of a word.

       **2**      disables hyphenation only of the last word on a page or column.

       **4**      disables hyphenation only before the last two characters of a word.

       **8**      disables hyphenation only after the first two characters of a word.

       **16**     enables hyphenation before the last character of a word.

       **32**     enables hyphenation after the first character of a word.

       The  values  are  additive.  Some values cannot be used together because they contradict; for
       instance, 4 and 16; 8 and 32.

## UNDERLINING
       In the _RUNOFF_ language, the underlining was quite easy.  But in _roff_ this is much more diffi‐
       cult.

### Underlining with .ul
       There  exists  a  _groff_ request **.ul** (see above) that can underline the next or further source
       lines in **nroff**, but in **troff** it produces only a font change into _italic_.  So this request  is
       not really useful.

### Underlining with .UL from ms
       In the ‘ms’ macro package in tmac/s.tmac **groff**___**[ms**(7)](https://www.chedong.com/phpMan.php/man/ms/7/markdown), there is the macro **.UL**.  But this works
       only in **troff**, not in **nroff**.

### Underlining macro definitions
       So one can use the _italic_ **nroff** idea from **.ul** and the **troff** definition in _ms_  for  writing  a
       useful new macro, something like
              .de UNDERLINE
              . ie n \\$1\f[I]\\$2\f[P]\\$3
              . el \\$1\Z'\\$2'\v'.25m'\D'l \w'\\$2'u 0'\v'-.25m'\\$3
              ..
       If  [**doclifter**(1)](https://www.chedong.com/phpMan.php/man/doclifter/1/markdown) makes trouble, change the macro name **UNDERLINE** into some 2-letter word, like
       **Ul**.  Moreover change the font writing from **\f[P]** to **\fP**.

### Underlining without macro definitions
       If one does not want to use macro definitions, e.g., when **doclifter** gets lost, use  the  fol‐
       lowing:
              .ds u1 before
              .ds u2 in
              .ds u3 after
              .ie n \*[u1]\f[I]\*[u2]\f[P]\*[u3]
              .el \*[u1]\Z'\*[u2]'\v'.25m'\D'l \w'\*[u2]'u 0'\v'-.25m'\*[u3]
       Due  to **doclifter**, it might be necessary to change the variable writing **\[xy]** and **\*[xy]** into
       the strange ancient writing **\*(xy** and **\(xy**, and so on.

       Then these lines could look like
              .ds u1 before
              .ds u2 in
              .ds u3 after
              .ie n \*[u1]\fI\*(u2\fP\*(u3
              .el \*(u1\Z'\*(u2'\v'.25m'\D'l \w'\*(u2'u 0'\v'-.25m'\*(u3

       The result looks like
              before _in_ after

### Underlining with Overstriking \z and \(ul
       There is another possibility for underlining by using overstriking with  **\z**_c_  (print  _c_  with
       zero width without spacing) and **\(ul** (underline character).  This produces the underlining of
       1 character, both in **nroff** and in **troff**.

       For example the underlining of a character say **t** looks like **\z\[ul]t** or **\z\(ult**

       Longer words look then a bit strange, but a useful mode is to write  each  character  into  a
       whole own line.  To underlines the 3 character part "tar" of the word "start":
              before s\
              \z\[ul]t\
              \z\[ul]a\
              \z\[ul]r\
              t after
       or
              before s\
              \z\(ult\
              \z\(ula\
              \z\(ulr\
              t after

       The result looks like
              before s_tar_t after

## COMPATIBILITY
       The  differences  between the groff language and classical troff as defined by [CSTR #54] are
       documented in **groff**___**[diff**(7)](https://www.chedong.com/phpMan.php/man/diff/7/markdown).

       The groff system provides a compatibility mode, see [**groff**(1)](https://www.chedong.com/phpMan.php/man/groff/1/markdown) on how to invoke this.

## AUTHORS
       This document was written by 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”.  Besides the gory details,
       it contains many examples.

       [**groff**(1)](https://www.chedong.com/phpMan.php/man/groff/1/markdown)
              the usage of the groff program and pointers to the documentation and  availability  of
              the groff system.

       **groff**___**[diff**(7)](https://www.chedong.com/phpMan.php/man/diff/7/markdown)
              describes the differences between the groff language and classical troff.

              This  is the authoritative document for the predefined language elements that are spe‐
              cific to groff.

       **groff**___**[char**(7)](https://www.chedong.com/phpMan.php/man/char/7/markdown)
              the predefined groff special characters (glyphs).

       **groff**___**[font**(5)](https://www.chedong.com/phpMan.php/man/font/5/markdown)
              the specification of fonts and the DESC file.

       **groff**___**[tmac**(5)](https://www.chedong.com/phpMan.php/man/tmac/5/markdown)
              contains an overview of available groff macro packages, instructions on how to  inter‐
              face  them  with  a document, guidance on writing macro packages and using diversions,
              and historical information on macro package naming conventions.

       [**roff**(7)](https://www.chedong.com/phpMan.php/man/roff/7/markdown)
              the history of roff, the common parts shared by all roff systems, and pointers to fur‐
              ther documentation.

       [CSTR #54]
              Nroff/Troff  User's Manual by Ossanna & Kernighan ⟨<http://cm.bell-labs.com/cm/cs/cstr/>
              54.ps.gz⟩ — the bible for classical troff.

       _Wikipedia_
              article about _groff_ ⟨<https://en.wikipedia.org/wiki/Groff_%28software%29>⟩.

       _Tutorial_ _about_ _groff_
              Manas Laha - An Introduction to the GNU Groff Text Processing System  ⟨dl.dropbox.com/
              u/4299293/grofftut.pdf⟩

       _troff.org_
              This  is  a  collection of internet sites with classical _roff_ documentations and other
              information.



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