1GROFF(7)               Miscellaneous Information Manual               GROFF(7)
2
3
4

NAME

6       groff - a short reference for the GNU roff language
7

DESCRIPTION

9       The  name  groff  stands for GNU roff and is the free implementation of
10       the roff type-setting system.  See roff(7) for a survey and  the  back‐
11       ground of the groff system.
12
13       This document gives only short descriptions of the predefined roff lan‐
14       guage elements as used in groff.  Both the classical features  and  the
15       groff extensions are provided.
16
17       Historically,  the roff language was called troff.  groff is compatible
18       with the classical system and provides proper extensions.  So  in  GNU,
19       the  terms  roff,  troff, and groff language could be used as synonyms.
20       However troff slightly tends to refer more to  the  classical  aspects,
21       whereas  groff  emphasizes  the GNU extensions, and roff is the general
22       term for the language.
23
24       This file is only a short version of the complete documentation that is
25       found  in the groff info(1) file, which contains more detailed, actual,
26       and concise information.
27
28       The general syntax for writing groff documents is relatively easy,  but
29       writing extensions to the roff language can be a bit harder.
30
31       The roff language is line-oriented.  There are only two kinds of lines,
32       control lines and text lines.  The control lines start with  a  control
33       character,  by  default  a period “.”  or a single quote “'”; all other
34       lines are text lines.
35
36       Control lines represent commands, optionally with arguments.  They have
37       the following syntax.  The leading control character can be followed by
38       a command name; arguments, if any, are separated by spaces (but not tab
39       characters) from the command name and among themselves, for example,
40
41              .command_name arg1 arg2
42
43       For  indentation, any number of space or tab characters can be inserted
44       between the leading control character and the  command  name,  but  the
45       control character must be on the first position of the line.
46
47       Text  lines  represent the parts that is printed.  They can be modified
48       by escape sequences, which are recognized by a leading  backslash  ‘\’.
49       These  are  in-line  or  even in-word formatting elements or functions.
50       Some of these take arguments separated by single quotes “'”, others are
51       regulated by a length encoding introduced by an open parenthesis ‘(’ or
52       enclosed in brackets ‘[’ and ‘]’.
53
54       The roff language provides flexible instruments  for  writing  language
55       extension,  such  as  macros.  When interpreting macro definitions, the
56       roff system enters a special operating mode, called the copy mode.
57
58       The copy mode behaviour can be quite tricky, but there are  some  rules
59       that ensure a safe usage.
60
61       1.     Printable  backslashes  must  be denoted as \e.  To be more pre‐
62              cise, \e represents the current  escape  character.   To  get  a
63              backslash glyph, use \(rs or \[rs].
64
65       2.     Double all backslashes.
66
67       3.     Begin all text lines with the special non-spacing character \&.
68
69       This  does not produce the most efficient code, but it should work as a
70       first measure.  For better strategies, see  the  groff  info  file  and
71       groff_tmac(5).
72
73       Reading roff source files is easier, just reduce all double backslashes
74       to a single one in all macro definitions.
75

GROFF ELEMENTS

77       The roff language elements add formatting information to a  text  file.
78       The  fundamental  elements  are  predefined commands and variables that
79       make roff a full-blown programming language.
80
81       There  are  two  kinds  of  roff  commands,  possibly  with  arguments.
82       Requests  are written on a line of their own starting with a dot ‘.’ or
83       a “'”, whereas Escape sequences are in-line functions and in-word  for‐
84       matting elements starting with a backslash ‘\’.
85
86       The  user  can define her own formatting commands using the de request.
87       These commands are called  macros,  but  they  are  used  exactly  like
88       requests.  Macro packages are pre-defined sets of macros written in the
89       groff language.  A user's possibilities to create escape sequences her‐
90       self is very limited, only special characters can be mapped.
91
92       The  groff  language provides several kinds of variables with different
93       interfaces.  There are pre-defined variables, but the user  can  define
94       her own variables as well.
95
96       String  variables  store character sequences.  They are set with the ds
97       request and retrieved by the \* escape  sequences.   Strings  can  have
98       variables.
99
100       Register  variables  can  store  numerical values, numbers with a scale
101       unit, and occasionally string-like objects.  They are set with  the  nr
102       request and retrieved by the \n escape sequences.
103
104       Environments  allow  the  user  to  temporarily store global formatting
105       parameters like line length, font size, etc. for later reuse.  This  is
106       done by the ev request.
107
108       Fonts  are  identified  either by a name or by an internal number.  The
109       current font is chosen by the ft request or by the \f escape sequences.
110       Each  device  has  special fonts, but the following fonts are available
111       for all devices.  R is the standard font Roman.  B is its bold counter‐
112       part.   The italic font is called I and is available everywhere, but on
113       text devices it is displayed as an  underlined  Roman  font.   For  the
114       graphical  output devices, there exist constant-width pendants of these
115       fonts, CR, CI, and CB.  On text devices, all  glyphs  have  a  constant
116       width anyway.
117
118       Glyphs  are  visual  representation forms of characters.  In groff, the
119       distinction between those two elements is not  always  obvious  (and  a
120       full discussion is beyond the scope of this man page).  A first approx‐
121       imation is that glyphs have a specific size and colour  and  are  taken
122       from  a specific font; they can't be modified any more – characters are
123       the input, and glyphs are the output.  As soon as an  output  line  has
124       been  generated,  it no longer contains characters but glyphs.  In this
125       man page, we use either ‘glyph’ or ‘character’, whatever is more appro‐
126       priate.
127
128       Moreover,  there  are  some advanced roff elements.  A diversion stores
129       (formatted) information into a macro for later  usage.   A  trap  is  a
130       positional condition like a certain number of lines from page top or in
131       a diversion or in the input.  Some action can be prescribed to  be  run
132       automatically when the condition is met.
133
134       More  detailed  information and examples can be found in the groff info
135       file.
136

CONTROL CHARACTERS

138       There is a small set of characters that have a special controlling task
139       in certain conditions.
140
141       .      A  dot  is  only special at the beginning of a line or after the
142              condition in the requests if, ie, el, and while.   There  it  is
143              the  control character that introduces a request (or macro).  By
144              using the cc request, the control character can be set to a dif‐
145              ferent character, making the dot ‘.’ a non-special character.
146
147              In  all other positions, it just means a dot character.  In text
148              paragraphs, it is advantageous to start each sentence at a  line
149              of its own.
150
151       '      The single quote has two controlling tasks.  At the beginning of
152              a line and in the conditional requests it  is  the  non-breaking
153              control character.  That means that it introduces a request like
154              the dot, but with the  additional  property  that  this  request
155              doesn't  cause  a  linebreak.  By using the c2 request, the non-
156              break control character can be set to a different character.
157
158              As a second task, it is the most commonly used argument  separa‐
159              tor in some functional escape sequences (but any pair of charac‐
160              ters not part of the argument do work).  In all other positions,
161              it denotes the single quote or apostrophe character.  Groff pro‐
162              vides a printable representation with the \(cq escape sequence.
163
164       "      The double quote is used to enclose arguments in macros (but not
165              in  requests and strings).  In the ds and as requests, a leading
166              double quote in the argument is stripped off, making  everything
167              else  afterwards  the  string  to  be  defined (enabling leading
168              whitespace).  The escaped double quote \" introduces a  comment.
169              Otherwise, it is not special.  Groff provides a printable repre‐
170              sentation with the \(dq escape sequence.
171
172       \      The backslash usually introduces an escape sequence (this can be
173              changed  with  the ec request).  A printed version of the escape
174              character is the \e escape; a backslash glyph can be obtained by
175              \(rs.
176
177       (      The  open  parenthesis  is only special in escape sequences when
178              introducing an escape name or argument consisting of exactly two
179              characters.   In groff, this behaviour can be replaced by the []
180              construct.
181
182       [      The opening bracket is only special in groff  escape  sequences;
183              there  it is used to introduce a long escape name or long escape
184              argument.  Otherwise, it is non-special, e.g. in macro calls.
185
186       ]      The closing bracket is only special in groff  escape  sequences;
187              there  it terminates a long escape name or long escape argument.
188              Otherwise, it is non-special.
189
190       space  Space characters are only functional characters.  They  separate
191              the arguments in requests, macros, and strings, and the words in
192              text lines.  They are subject to groff's horizontal spacing cal‐
193              culations.   To get a defined space width, escape sequences like
194\ ’ (this is the escape character followed by a space), \|, \^,
195              or \h should be used.
196
197       newline
198              In  text  paragraphs,  newlines mostly behave like space charac‐
199              ters.  Continuation lines can be specified by  an  escaped  new‐
200              line,  i.e., by specifying a backslash ‘\’ as the last character
201              of a line.
202
203       tab    If a tab character occurs during text the  interpreter  makes  a
204              horizontal  jump to the next pre-defined tab position.  There is
205              a sophisticated interface for handling tab positions.
206

NUMERICAL EXPRESSIONS

208       A numerical value is a signed or unsigned  integer  or  float  with  or
209       without  an  appended scaling indicator.  A scaling indicator is a one-
210       character abbreviation for a unit of measurement.  A number followed by
211       a scaling indicator signifies a size value.  By default, numerical val‐
212       ues do not have a scaling indicator, i.e., they are normal numbers.
213
214       The roff language defines the following scaling indicators.
215
216              c         Centimeter
217              i         Inch
218              P         Pica = 1/6 inch
219              p         Point = 1/72 inch
220              m         Em = the font size in points (approx. width of  letter
221                        ‘m’)
222              M         100th of an Em
223              n         En = Em/2
224              u         Basic unit for actual output device
225              v         Vertical    line   space   in   basic   units   scaled
226                        point = 1/sizescale of a point (defined in  font  DESC
227                        file)
228              f         Scale by 65536.
229
230       Numerical  expressions are combinations of the numerical values defined
231       above with the following  arithmetical  operators  already  defined  in
232       classical troff.
233
234              +         Addition
235              -         Subtraction
236              *         Multiplication
237              /         Division
238              %         Modulo
239              =         Equals
240              ==        Equals
241              <         Less than
242              >         Greater than
243              <=        Less or equal
244              >=        Greater or equal
245              &         Logical and
246              :         Logical or
247              !         Logical not
248              (         Grouping of expressions
249              )         Close current grouping
250
251       Moreover,  groff  added  the  following operators for numerical expres‐
252       sions:
253
254              e1>?e2    The maximum of e1 and e2.
255              e1<?e2    The minimum of e1 and e2.
256              (c;e)     Evaluate e using c as the default scaling indicator.
257
258       For details see the groff info file.
259

CONDITIONS

261       Conditions occur in tests raised by the if, ie, and the while requests.
262       The following table characterizes the different types of conditions.
263
264              N         A  numerical  expression N yields true if its value is
265                        greater than 0.
266              !N        True if the value of N is 0 (see below).
267              's1's2'   True if string s1 is identical to string s2.
268              !'s1's2'  True if string s1 is not identical to string  s2  (see
269                        below).
270              cch       True if there is a glyph ch available.
271              dname     True  if  there  is  a  string,  macro,  diversion, or
272                        request called name.
273              e         Current page number is even.
274              o         Current page number is odd.
275              mname     True if there is a color called name.
276              n         Formatter is nroff.
277              rreg      True if there is a register named reg.
278              t         Formatter is troff.
279              Ffont     True if there exists a font named font.
280              Sstyle    True if a style named style has been registered.
281
282       Note that the !  operator may  only  appear  at  the  beginning  of  an
283       expression, and negates the entire expression.  This maintains bug-com‐
284       patibility with AT&T troff.
285

REQUESTS

287       This section provides a short reference for  the  predefined  requests.
288       In groff, request, macro, and string names can be arbitrarily long.  No
289       bracketing or marking of long names is needed.
290
291       Most requests take one or more arguments.  The arguments are  separated
292       by  space  characters  (no tabs!); there is no inherent limit for their
293       length or number.
294
295       Some requests have optional arguments with a different behaviour.   Not
296       all  of  these details are outlined here.  Refer to the groff info file
297       and groff_diff(7) for all details.
298
299       In the following request specifications, most argument names were  cho‐
300       sen  to be descriptive.  Only the following denotations need clarifica‐
301       tion.
302
303              c         denotes a single character.
304              font      a font either specified as a font name or a font  num‐
305                        ber.
306              anything  all  characters up to the end of the line or within \{
307                        and \}.
308              n         is a numerical expression that evaluates to an integer
309                        value.
310              N         is   an  arbitrary  numerical  expression,  signed  or
311                        unsigned.
312              ±N        has three meanings depending on  its  sign,  described
313                        below.
314
315       If  an  expression  defined  as ±N starts with a ‘+’ sign the resulting
316       value of the expression is added to an already existing value  inherent
317       to  the  related  request,  e.g.  adding  to a number register.  If the
318       expression starts with a ‘-’ the value of the expression is  subtracted
319       from the request value.
320
321       Without  a  sign,  N replaces the existing value directly.  To assign a
322       negative number either prepend 0 or  enclose  the  negative  number  in
323       parentheses.
324
325   Request Short Reference
326       .         Empty line, ignored.  Useful for structuring documents.
327       .\" anything
328                 Complete line is a comment.
329       .ab string
330                 Print string on standard error, exit program.
331       .ad       Begin  line  adjustment  for  output  lines in current adjust
332                 mode.
333       .ad c     Start line adjustment in mode c (c=l,r,c,b,n).
334       .af register c
335                 Assign format c to register (c=l,i,I,a,A).
336       .aln alias register
337                 Create alias name for register.
338       .als alias object
339                 Create alias name for request, string,  macro,  or  diversion
340                 object.
341       .am macro Append to macro until .. is encountered.
342       .am macro end
343                 Append to macro until .end is called.
344       .am1 macro
345                 Same  as  .am but with compatibility mode switched off during
346                 macro expansion.
347       .am1 macro end
348                 Same as .am but with compatibility mode switched  off  during
349                 macro expansion.
350       .ami macro
351                 Append  to a macro whose name is contained in the string reg‐
352                 ister macro until .. is encountered.
353       .ami macro end
354                 Append to a macro indirectly.  macro and end are string  reg‐
355                 isters whose contents are interpolated for the macro name and
356                 the end macro, respectively.
357       .ami1 macro
358                 Same as .ami but with compatibility mode switched off  during
359                 macro expansion.
360       .ami1 macro end
361                 Same  as .ami but with compatibility mode switched off during
362                 macro expansion.
363       .as stringvar anything
364                 Append anything to stringvar.
365       .as1 stringvar anything
366                 Same as .as but with compatibility mode switched  off  during
367                 string expansion.
368       .asciify diversion
369                 Unformat  ASCII characters, spaces, and some escape sequences
370                 in diversion.
371       .backtrace
372                 Print a backtrace of the input on stderr.
373       .bd font N
374                 Embolden font by N-1 units.
375       .bd S font N
376                 Embolden Special Font S when current font is font.
377       .blm      Unset the blank line macro.
378       .blm macro
379                 Set the blank line macro to macro.
380       .box      End current diversion.
381       .box macro
382                 Divert to macro, omitting a partially filled line.
383       .boxa     End current diversion.
384       .boxa macro
385                 Divert and append to macro, omitting a partially filled line.
386       .bp       Eject current page and begin new page.
387       .bp ±N    Eject current page; next page number ±N.
388       .br       Line break.
389       .brp      Break and spread output line.  Same as \p.
390       .break    Break out of a while loop.
391       .c2       Reset no-break control character to “'”.
392       .c2 c     Set no-break control character to c.
393       .cc       Reset control character to ‘.’.
394       .cc c     Set control character to c.
395       .ce       Center the next input line.
396       .ce N     Center following N input lines.
397       .cf filename
398                 Copy contents of file filename unprocessed to  stdout  or  to
399                 the diversion.
400       .cflags mode c1 c2 ...
401                 Treat characters c1, c2, ... according to mode number.
402       .ch trap N
403                 Change trap location to N.
404       .char c anything
405                 Define entity c as string anything.
406       .chop object
407                 Chop  the  last  character  off  macro,  string, or diversion
408                 object.
409       .class name c1 c2 ...
410                 Assign a set of characters, character ranges, or classes  c1,
411                 c2, ... to name.
412       .close stream
413                 Close the stream.
414       .color    Enable colors.
415       .color N  If N is zero disable colors, otherwise enable them.
416       .composite from to
417                 Map  glyph  name  from  to glyph name to while constructing a
418                 composite glyph name.
419       .continue Finish the current iteration of a while loop.
420       .cp       Enable compatibility mode.
421       .cp N     If N is zero disable compatibility mode, otherwise enable it.
422       .cs font N M
423                 Set constant character width mode for font to N/36  ems  with
424                 em M.
425       .cu N     Continuous underline in nroff, like .ul in troff.
426       .da       End current diversion.
427       .da macro Divert and append to macro.
428       .de macro Define or redefine macro until .. is encountered.
429       .de macro end
430                 Define or redefine macro until .end is called.
431       .de1 macro
432                 Same  as  .de but with compatibility mode switched off during
433                 macro expansion.
434       .de1 macro end
435                 Same as .de but with compatibility mode switched  off  during
436                 macro expansion.
437       .defcolor color scheme component
438                 Define  or  redefine  a color with name color.  scheme can be
439                 rgb, cym, cymk, gray, or grey.  component can be single  com‐
440                 ponents  specified  as fractions in the range 0 to 1 (default
441                 scaling indicator f), as a string  of  two-digit  hexadecimal
442                 color  components  with  a leading #, or as a string of four-
443                 digit hexadecimal components with two leading #.   The  color
444                 default can't be redefined.
445       .dei macro
446                 Define  or  redefine  a  macro whose name is contained in the
447                 string register macro until .. is encountered.
448       .dei macro end
449                 Define or redefine a macro indirectly.   macro  and  end  are
450                 string  registers  whose  contents  are  interpolated for the
451                 macro name and the end macro, respectively.
452       .dei1 macro
453                 Same as .dei but with compatibility mode switched off  during
454                 macro expansion.
455       .dei1 macro end
456                 Same  as .dei but with compatibility mode switched off during
457                 macro expansion.
458       .device anything
459                 Write anything to the intermediate output as a device control
460                 function.
461       .devicem name
462                 Write  contents  of macro or string name uninterpreted to the
463                 intermediate output as a device control function.
464       .di       End current diversion.
465       .di macro Divert to macro.
466       .do name  Interpret .name with compatibility mode disabled.
467       .ds stringvar anything
468                 Set stringvar to anything.
469       .ds1 stringvar anything
470                 Same as .ds but with compatibility mode switched  off  during
471                 string expansion.
472       .dt N trap
473                 Set  diversion  trap  to  position N (default scaling indica‐
474                 tor v).
475       .ec       Reset escape character to ‘\’.
476       .ec c     Set escape character to c.
477       .ecr      Restore escape character saved with .ecs.
478       .ecs      Save current escape character.
479       .el anything
480                 Else part for if-else (ie) request.
481       .em macro The macro is run after the end of input.
482       .eo       Turn off escape character mechanism.
483       .ev       Switch to previous environment and pop it off the stack.
484       .ev env   Push down environment number or name env  to  the  stack  and
485                 switch to it.
486       .evc env  Copy  the contents of environment env to the current environ‐
487                 ment.  No pushing or popping.
488       .ex       Exit from roff processing.
489       .fam      Return to previous font family.
490       .fam name Set the current font family to name.
491       .fc       Disable field mechanism.
492       .fc a     Set field delimiter to a and pad glyph to space.
493       .fc a b   Set field delimiter to a and pad glyph to b.
494       .fchar c anything
495                 Define fallback character (or glyph) c as string anything.
496       .fcolor   Set fill color to previous fill color.
497       .fcolor c Set fill color to c.
498       .fi       Fill output lines.
499       .fl       Flush output buffer.
500       .fp n font
501                 Mount font on position n.
502       .fp n internal external
503                 Mount font with long external name to short internal name  on
504                 position n.
505       .fschar f c anything
506                 Define  fallback  character (or glyph) c for font f as string
507                 anything.
508       .fspecial font
509                 Reset list of special fonts for font to be empty.
510       .fspecial font s1 s2 ...
511                 When the current font is font, then the fonts s1, s2, ... are
512                 special.
513       .ft       Return to previous font.  Same as \f[] or \fP.
514       .ft font  Change  to  font name or number font; same as \f[font] escape
515                 sequence.
516       .ftr font1 font2
517                 Translate font1 to font2.
518       .fzoom font
519                 Don't magnify font.
520       .fzoom font zoom
521                 Set zoom factor for font (in multiples of 1/1000th).
522       .gcolor   Set glyph color to previous glyph color.
523       .gcolor c Set glyph color to c.
524       .hc       Remove additional hyphenation indicator character.
525       .hc c     Set up additional hyphenation indicator character c.
526       .hcode c1 code1 c2 code2 ...
527                 Set the hyphenation code of character c1 to code1, that of c2
528                 to code2, etc.
529       .hla lang Set the current hyphenation language to lang.
530       .hlm n    Set the maximum number of consecutive hyphenated lines to n.
531       .hpf file Read hyphenation patterns from file.
532       .hpfa file
533                 Append hyphenation patterns from file.
534       .hpfcode a b c d ...
535                 Set input mapping for .hpf.
536       .hw words List of words with exceptional hyphenation.
537       .hy N     Switch to hyphenation mode N.
538       .hym n    Set  the  hyphenation  margin  to  n (default scaling indica‐
539                 tor m).
540       .hys n    Set the hyphenation space to n.
541       .ie cond anything
542                 If cond then anything else goto .el.
543       .if cond anything
544                 If cond then anything; otherwise do nothing.
545       .ig       Ignore text until .. is encountered.
546       .ig end   Ignore text until .end is called.
547       .in       Change to previous indentation value.
548       .in ±N    Change indentation according to ±N (default  scaling  indica‐
549                 tor m).
550       .it N trap
551                 Set an input-line count trap for the next N lines.
552       .itc N trap
553                 Same as .it but count lines interrupted with \c as one line.
554       .kern     Enable pairwise kerning.
555       .kern n   If n is zero, disable pairwise kerning, otherwise enable it.
556       .lc       Remove leader repetition glyph.
557       .lc c     Set leader repetition glyph to c.
558       .length register anything
559                 Write the length of the string anything to register.
560       .linetabs Enable line-tabs mode (i.e., calculate tab positions relative
561                 to output line).
562       .linetabs n
563                 If n is zero, disable line-tabs mode, otherwise enable it.
564       .lf N     Set input line number to N.
565       .lf N file
566                 Set input line number to N and filename to file.
567       .lg N     Ligature mode on if N>0.
568       .ll       Change to previous line length.
569       .ll ±N    Set line length according to ±N (default length 6.5i, default
570                 scaling indicator m).
571       .lsm      Unset the leading spaces macro.
572       .lsm macro
573                 Set the leading spaces macro to macro.
574       .ls       Change to the previous value of additional intra-line skip.
575       .ls N     Set  additional  intra-line  skip value to N, i.e., N-1 blank
576                 lines are inserted after each text output line.
577       .lt ±N    Length of title (default scaling indicator m).
578       .mc       Margin glyph off.
579       .mc c     Print glyph c after each text line at  actual  distance  from
580                 right margin.
581       .mc c N   Set  margin  glyph  to  c and distance to N from right margin
582                 (default scaling indicator m).
583       .mk register
584                 Mark current vertical position in register.
585       .mso file The same as .so except that file  is  searched  in  the  tmac
586                 directories.
587       .na       No output-line adjusting.
588       .ne       Need a one-line vertical space.
589       .ne N     Need N vertical space (default scaling indicator v).
590       .nf       No filling or adjusting of output-lines.
591       .nh       No hyphenation.
592       .nm       Number mode off.
593       .nm ±N [M [S [I]]]
594                 In  line  number  mode,  set  number,  multiple, spacing, and
595                 indentation.
596       .nn       Do not number next line.
597       .nn N     Do not number next N lines.
598       .nop anything
599                 Always process anything.
600       .nr register ±N [M]
601                 Define or modify register using ±N with auto-increment M.
602       .nroff    Make the built-in conditions n true and t false.
603       .ns       Turn on no-space mode.
604       .nx       Immediately jump to end of current file.
605       .nx filename
606                 Immediately continue processing with file file.
607       .open stream filename
608                 Open filename for writing  and  associate  the  stream  named
609                 stream with it.
610       .opena stream filename
611                 Like .open but append to it.
612       .os       Output vertical distance that was saved by the sv request.
613       .output string
614                 Emit string directly to intermediate output, allowing leading
615                 whitespace if string starts with " (which is stripped off).
616       .pc       Reset page number character to ‘%’.
617       .pc c     Page number character.
618       .pev      Print the current environment and  each  defined  environment
619                 state to stderr.
620       .pi program
621                 Pipe output to program (nroff only).
622       .pl       Set  page  length to default 11i.  The current page length is
623                 stored in register .p.
624       .pl ±N    Change page length to ±N (default scaling indicator v).
625       .pm       Print macro names and sizes (number of blocks of 128 bytes).
626       .pm t     Print only total of sizes of  macros  (number  of  128  bytes
627                 blocks).
628       .pn ±N    Next page number N.
629       .pnr      Print  the names and contents of all currently defined number
630                 registers on stderr.
631       .po       Change to previous page offset.  The current page  offset  is
632                 available in register .o.
633       .po ±N    Page offset N.
634       .ps       Return to previous point size.
635       .ps ±N    Point size; same as \s[±N].
636       .psbb filename
637                 Get the bounding box of a PostScript image filename.
638       .pso command
639                 This behaves like the so request except that input comes from
640                 the standard output of command.
641       .ptr      Print the names and positions of  all  traps  (not  including
642                 input line traps and diversion traps) on stderr.
643       .pvs      Change to previous post-vertical line spacing.
644       .pvs ±N   Change  post-vertical  line  spacing according to ±N (default
645                 scaling indicator p).
646       .rchar c1 c2 ...
647                 Remove the definitions of entities c1, c2, ...
648       .rd prompt
649                 Read insertion.
650       .return   Return from a macro.
651       .return anything
652                 Return twice, namely from the macro at the current level  and
653                 from the macro one level higher.
654       .rfschar f c1 c2 ...
655                 Remove the definitions of entities c1, c2, ... for font f.
656       .rj n     Right justify the next n input lines.
657       .rm name  Remove request, macro, or string name.
658       .rn old new
659                 Rename request, macro, or string old to new.
660       .rnn reg1 reg2
661                 Rename register reg1 to reg2.
662       .rr register
663                 Remove register.
664       .rs       Restore spacing; turn no-space mode off.
665       .rt ±N    Return  (upward only) to marked vertical place (default scal‐
666                 ing indicator v).
667       .schar c anything
668                 Define global fallback character (or glyph) c as string  any‐
669                 thing.
670       .shc      Reset soft hyphen glyph to \(hy.
671       .shc c    Set the soft hyphen glyph to c.
672       .shift n  In a macro, shift the arguments by n positions.
673       .sizes s1 s2 ... sn [0]
674                 Set  available  font  sizes similar to the sizes command in a
675                 DESC file.
676       .so filename
677                 Include source file.
678       .sp       Skip one line vertically.
679       .sp N     Space vertical distance N up or down according to sign  of  N
680                 (default scaling indicator v).
681       .special  Reset global list of special fonts to be empty.
682       .special s1 s2 ...
683                 Fonts  s1,  s2,  etc. are special and are searched for glyphs
684                 not in the current font.
685       .spreadwarn
686                 Toggle the spread warning on and  off  without  changing  its
687                 value.
688       .spreadwarn limit
689                 Emit  a warning if each space in an output line is widened by
690                 limit or more (default scaling indicator m).
691       .ss N     Set space glyph size to N/12 of the space width in  the  cur‐
692                 rent font.
693       .ss N M   Set  space  glyph size to N/12 and sentence space size set to
694                 M/12 of the space width in the current font.
695       .sty n style
696                 Associate style with font position n.
697       .substring xx n1 n2
698                 Replace the string named xx with the substring defined by the
699                 indices n1 and n2.
700       .sv       Save 1 v of vertical space.
701       .sv N     Save the vertical distance N for later output with os request
702                 (default scaling indicator v).
703       .sy command-line
704                 Execute program command-line.
705       .ta T N   Set tabs after  every  position  that  is  a  multiple  of  N
706                 (default scaling indicator m).
707       .ta n1 n2 ... nn T r1 r2 ... rn
708                 Set  tabs  at  positions  n1,  n2,  ..., nn, then set tabs at
709                 nn+r1, nn+r2, ..., nn+rn, then at  nn+rn+r1,  nn+rn+r2,  ...,
710                 nn+rn+rn, and so on.
711       .tc       Remove tab repetition glyph.
712       .tc c     Set tab repetition glyph to c.
713       .ti ±N    Temporary indent next line (default scaling indicator m).
714       .tkf font s1 n1 s2 n2
715                 Enable track kerning for font.
716       .tl ’leftcenterright
717                 Three-part title.
718       .tm anything
719                 Print anything on stdout.
720       .tm1 anything
721                 Print anything on stdout, allowing leading whitespace if any‐
722                 thing starts with " (which is stripped off).
723       .tmc anything
724                 Similar to .tm1 without emitting a final newline.
725       .tr abcd...
726                 Translate a to b, c to d, etc. on output.
727       .trf filename
728                 Transparently output the contents of file filename.
729       .trin abcd...
730                 This is the same as the tr request except  that  the  asciify
731                 request uses the character code (if any) before the character
732                 translation.
733       .trnt abcd...
734                 This is the same as the tr request except that  the  transla‐
735                 tions  do  not apply to text that is transparently throughput
736                 into a diversion with \!.
737       .troff    Make the built-in conditions t true and n false.
738       .uf font  Set underline font to font (to be switched to by .ul).
739       .ul N     Underline (italicize in troff) N input lines.
740       .unformat diversion
741                 Unformat space characters and tabs in  diversion,  preserving
742                 font information.
743       .vpt n    Enable vertical position traps if n is non-zero, disable them
744                 otherwise.
745       .vs       Change to previous vertical base line spacing.
746       .vs ±N    Set vertical base line spacing to ±N (default scaling indica‐
747                 tor p).
748       .warn n   Set warnings code to n.
749       .warnscale si
750                 Set scaling indicator used in warnings to si.
751       .wh N     Remove (first) trap at position N.
752       .wh N trap
753                 Set location trap; negative means from page bottom.
754       .while cond anything
755                 While condition cond is true, accept anything as input.
756       .write stream anything
757                 Write anything to the stream named stream.
758       .writec stream anything
759                 Similar to .write without emitting a final newline.
760       .writem stream xx
761                 Write  contents  of  macro  or  string xx to the stream named
762                 stream.
763
764       Besides these standard groff requests, there  might  be  further  macro
765       calls.   They  can  originate  from a macro package (see roff(7) for an
766       overview) or from a preprocessor.
767
768       Preprocessor macros are easy to be recognized.  They enclose their code
769       into a pair of characteristic macros.
770
771                  ┌─────────────┬─────────────────┬────────────────┐
772                  │preprocessor │   start macro   │    end macro   │
773                  ├─────────────┼─────────────────┼────────────────┤
774chem     .cstart     .cend      
775eqn      .EQ       .EN       
776gideal    .IS       .IE       
777grap     .G1       .G2       
778grn      .GS       .GE       
779                  │             │                 │      .IF       
780pic      .PS       .PE       
781refer     .R1       .R2       
782soelim    nonenone
783tbl      .TS       .TE       
784                  ├─────────────┼─────────────────┼────────────────┤
785glilypond   .lilypond start .lilypond stop 
786gperl     .Perl start   .Perl stop   
787gpinyin    .pinyin start  .pinyin stop  
788                  └─────────────┴─────────────────┴────────────────┘
789       Note that the ‘ideal’ preprocessor is not available in groff yet.
790

ESCAPE SEQUENCES

792       Escape  sequences are in-line language elements usually introduced by a
793       backslash ‘\’ and followed  by  an  escape  name  and  sometimes  by  a
794       required  argument.   Input  processing is continued directly after the
795       escaped character or the argument (without  an  intervening  separation
796       character).   So there must be a way to determine the end of the escape
797       name and the end of the argument.
798
799       This is done by enclosing names (escape name and  arguments  consisting
800       of a variable name) by a pair of brackets [name] and constant arguments
801       (number expressions and characters) by apostrophes  (ASCII  0x27)  like
802       constant.
803
804       There  are  abbreviations  for short names.  Two-character escape names
805       can be specified by an opening parenthesis like \(xy or \*(xy without a
806       closing  counterpart.   And  all one-character names different from the
807       special characters ‘[’ and ‘(’ can even be specified without a  marker,
808       for example \nc or \$c.
809
810       Constant  arguments  of  length 1 can omit the marker apostrophes, too,
811       but there is no two-character analogue.
812
813       While one-character escape sequences are mainly used for in-line  func‐
814       tions  and  system related tasks, the two-letter names following the \(
815       construct are glyphs predefined by the roff system;  these  are  called
816       ‘Special Characters’ in the classical documentation.  Escapes sequences
817       of the form \[name] denote glyphs too.
818
819   Single-Character Escapes
820       \"     Start of a comment.  Everything up to the end  of  the  line  is
821              ignored.
822       \#     Everything  up  to  and  including  the next newline is ignored.
823              This is interpreted in copy mode.  This is like \"  except  that
824              the terminating newline is ignored as well.
825       \*s    The  string  stored  in  the  string variable with one-character
826              name s.
827       \*(st  The string stored in the string variable with two-character name
828              st.
829       \*[string]
830              The  string stored in the string variable with name string (with
831              arbitrary length).
832       \*[stringvar arg1 arg2 ...]
833              The string stored in the string variable with  arbitrarily  long
834              name stringvar, taking arg1, arg2, ... as arguments.
835       \$0    The  name  by  which  the  current  macro  was invoked.  The als
836              request can make a macro have more than one name.
837       \$x    Macro or string argument with one-digit number x in the range  1
838              to 9.
839       \$(xy  Macro  or  string argument with two-digit number xy (larger than
840              zero).
841       \$[nexp]
842              Macro or string argument with  number  nexp,  where  nexp  is  a
843              numerical expression evaluating to an integer ≥1.
844       \$*    In  a  macro  or  string, the concatenation of all the arguments
845              separated by spaces.
846       \$@    In a macro or string, the concatenation  of  all  the  arguments
847              with each surrounded by double quotes, and separated by spaces.
848       \$^    In a macro, the representation of all parameters as if they were
849              an argument to the ds request.
850       \\     reduces to a single backslash; useful to delay  its  interpreta‐
851              tion  as  escape  character in copy mode.  For a printable back‐
852              slash, use \e, or even better \[rs], to be independent from  the
853              current escape character.
854       The  acute accent ´; same as \(aa.  Unescaped: apostrophe, right
855              quotation mark, single quote (ASCII 0x27).
856       \`     The grave accent `; same as \(ga.  Unescaped: left quote,  back‐
857              quote (ASCII 0x60).
858       \-     The - (minus) sign in the current font.
859       \_     The same as \(ul, the underline character.
860       \.     The  same as a dot (‘.’).  Necessary in nested macro definitions
861              so that ‘\\..’ expands to ‘..’.
862       \%     Default optional hyphenation character.
863       \!     Transparent line indicator.
864       \?anything?
865              In a diversion, this transparently embeds anything in the diver‐
866              sion.   anything  is  read  in  copy  mode.  See also the escape
867              sequences \!  and \?.
868       \space Unpaddable space size space glyph (no line break).
869       \0     Digit-width space.
870       \|     1/6 em narrow space glyph; zero width in nroff.
871       \^     1/12 em half-narrow space glyph; zero width in nroff.
872       \&     Non-printable, zero-width glyph.
873       \)     Like \& except that it behaves like a glyph  declared  with  the
874              cflags request to be transparent for the purposes of end-of-sen‐
875              tence recognition.
876       \/     Increases the width of the preceding glyph so that  the  spacing
877              between  that  glyph  and  the following glyph is correct if the
878              following glyph is a roman glyph.
879       \,     Modifies the spacing of the following glyph so that the  spacing
880              between  that  glyph  and  the preceding glyph is correct if the
881              preceding glyph is a roman glyph.
882       \~     Unbreakable space that stretches like a normal inter-word  space
883              when a line is adjusted.
884       \:     Inserts  a  zero-width  break point (similar to \% but without a
885              soft hyphen character).
886       \newline
887              Ignored newline, for continuation lines.
888       \{     Begin conditional input.
889       \}     End conditional input.
890       \(sc   A glyph with two-character name sc; see section Special  Charac‐
891              ters.
892       \[name]
893              A glyph with name name (of arbitrary length).
894       \[comp1 comp2 ...]
895              A composite glyph with components comp1, comp2, ...
896       \a     Non-interpreted leader character.
897       \A’anything
898              If  anything  is acceptable as a name of a string, macro, diver‐
899              sion, register, environment or font it expands to 1,  and  to  0
900              otherwise.
901       \b’abc...
902              Bracket building function.
903       \B’anything
904              If  anything  is  acceptable  as  a  valid numeric expression it
905              expands to 1, and to 0 otherwise.
906       \c     Interrupt text processing.
907       \C’glyph
908              The glyph called glyph; same  as  \[glyph],  but  compatible  to
909              other roff versions.
910       \d     Forward (down) 1/2 em (1/2 line in nroff).
911       \D’charseq
912              Draw  a  graphical element defined by the characters in charseq;
913              see the groff info file for details.
914       \e     Printable version of the current escape character.
915       \E     Equivalent to an escape character, but  is  not  interpreted  in
916              copy mode.
917       \fF    Change to font with one-character name or one-digit number F.
918       \fP    Switch back to previous font.
919       \f(fo  Change to font with two-character name or two-digit number fo.
920       \f[font]
921              Change  to  font with arbitrarily long name or number expression
922              font.
923       \f[]   Switch back to previous font.
924       \Ff    Change to font family with one-character name f.
925       \F(fm  Change to font family with two-character name fm.
926       \F[fam]
927              Change to font family with arbitrarily long name fam.
928       \F[]   Switch back to previous font family.
929       \gr    Return format of register with one-character name r suitable for
930              af request.
931       \g(rg  Return  format  of  register with two-character name rg suitable
932              for af request.
933       \g[reg]
934              Return format of register with arbitrarily long name  reg  suit‐
935              able for af request.
936       \h’NLocal horizontal motion; move right N (left if negative).
937       \H’NSet height of current font to N.
938       \kr    Mark horizontal input place in one-character register r.
939       \k(rg  Mark horizontal input place in two-character register rg.
940       \k[reg]
941              Mark  horizontal  input  place in register with arbitrarily long
942              name reg.
943       \l’NcHorizontal line drawing function (optionally using character c).
944       \L’NcVertical line drawing function (optionally using character c).
945       \mc    Change to color with one-character name c.
946       \m(cl  Change to color with two-character name cl.
947       \m[color]
948              Change to color with arbitrarily long name color.
949       \m[]   Switch back to previous color.
950       \Mc    Change filling color for closed drawn objects to color with one-
951              character name c.
952       \M(cl  Change filling color for closed drawn objects to color with two-
953              character name cl.
954       \M[color]
955              Change filling color for closed  drawn  objects  to  color  with
956              arbitrarily long name color.
957       \M[]   Switch to previous fill color.
958       \nr    The  numerical  value  stored  in the register variable with the
959              one-character name r.
960       \n(re  The numerical value stored in the  register  variable  with  the
961              two-character name re.
962       \n[reg]
963              The  numerical  value stored in the register variable with arbi‐
964              trarily long name reg.
965       \N’nTypeset the glyph with index n in the current font.  No  special
966              fonts  are  searched.   Useful  for adding (named) entities to a
967              document using the char request and friends.
968       \o’abc...
969              Overstrike glyphs a, b, c, etc.
970       \O0    Disable glyph output.  Mainly for internal use.
971       \O1    Enable glyph output.  Mainly for internal use.
972       \p     Break and spread output line.
973       \r     Reverse 1 em vertical motion (reverse line in nroff).
974       \R’name ±n
975              The same as .nr name ±n.
976       \s±N   Set/increase/decrease the point size to/by N scaled points; N is
977              a one-digit number in the range 1 to 9.  Same as ps request.
978       \s(±N
979       \s±(N  Set/increase/decrease the point size to/by N scaled points; N is
980              a two-digit number ≥1.  Same as ps request.
981       \s[±N]
982       \s±[N]
983       \s’±N
984       \s±’NSet/increase/decrease the point  size  to/by  N  scaled  points.
985              Same as ps request.
986       \S’NSlant output by N degrees.
987       \t     Non-interpreted horizontal tab.
988       \u     Reverse (up) 1/2 em vertical motion (1/2 line in nroff).
989       \v’NLocal vertical motion; move down N (up if negative).
990       \Ve    The  contents  of  the  environment  variable with one-character
991              name e.
992       \V(ev  The contents of the environment variable with two-character name
993              ev.
994       \V[env]
995              The  contents  of the environment variable with arbitrarily long
996              name env.
997       \w’string
998              The width of the glyph sequence string.
999       \x’NExtra line-space function (negative before, positive after).
1000       \X’string
1001              Output string as device control function.
1002       \Yn    Output string variable or macro with one-character name n  unin‐
1003              terpreted as device control function.
1004       \Y(nm  Output string variable or macro with two-character name nm unin‐
1005              terpreted as device control function.
1006       \Y[name]
1007              Output string variable or macro with arbitrarily long name  name
1008              uninterpreted as device control function.
1009       \zc    Print c with zero width (without spacing).
1010       \Z’anything
1011              Print  anything  and  then  restore  the horizontal and vertical
1012              position; anything may not contain tabs or leaders.
1013
1014       The escape sequences \e, \., \", \$, \*, \a, \n, \t, \g,  and  \newline
1015       are interpreted in copy mode.
1016
1017       Escape sequences starting with \( or \[ do not represent single charac‐
1018       ter escape sequences, but introduce escape names with two or more char‐
1019       acters.
1020
1021       If  a  backslash  is followed by a character that does not constitute a
1022       defined escape sequence, the backslash  is  silently  ignored  and  the
1023       character maps to itself.
1024
1025   Special Characters
1026       [Note:  ‘Special Characters’ is a misnomer; those entities are (output)
1027       glyphs, not (input) characters.]
1028
1029       Common special characters are predefined by  escape  sequences  of  the
1030       form  \(xy  with  characters x and y.  In groff, it is also possible to
1031       use the writing \[xy] as well.
1032
1033       Some of these special characters exist in the usual font while most  of
1034       them are only available in the special font.  Below you can see a small
1035       selection of the most important glyphs; a complete list can be found in
1036       groff_char(7).
1037
1038              \(Do   Dollar $
1039              \(Eu   Euro 
1040              \(Po   British pound sterling £
1041              \(aq   Apostrophe quote '
1042              \(bu   Bullet sign ·
1043              \(co   Copyright ©
1044              \(cq   Single closing quote (right) 
1045              \(ct   Cent ¢
1046              \(dd   Double dagger 
1047              \(de   Degree °
1048              \(dg   Dagger 
1049              \(dq   Double quote (ASCII 34) "
1050              \(em   Em-dash 
1051              \(en   En-dash 
1052              \(hy   Hyphen 
1053              \(lq   Double quote left 
1054              \(oq   Single opening quote (left) 
1055              \(rg   Registered sign ®
1056              \(rq   Double quote right 
1057              \(rs   Printable backslash character \
1058              \(sc   Section sign §
1059              \(tm   Trademark symbol 
1060              \(ul   Underline character _
1061              \(==   Identical 
1062              \(>=   Larger or equal 
1063              \(<=   Less or equal 
1064              \(!=   Not equal 
1065              \(->   Right arrow 
1066              \(<-   Left arrow 
1067              \(+-   Plus-minus sign ±
1068
1069   Unicode Characters
1070       There  is  the  extended  escape u that allows to include all available
1071       Unicode characters into some roff file.
1072
1073       \[uxxxx]
1074              u is the escape name.  xxxx is a hexadecimal  number  of  4  hex
1075              digits, such as 0041 for the letter A, see \[u0041].
1076
1077       \[uyyyyy]
1078              u  is  the  escape name.  yyyyy is a hexadecimal number of 5 hex
1079              digits, such as 2FA1A for a Chinese looking  character  for  CJK
1080              Compatibility Ideographs Supplement, see \[u2FA1A].
1081
1082       Both  hexadecimal collections mean the corresponding Unicode code for a
1083       character.
1084
1085       \[uhex1_hex2]
1086       \[uhex1_hex2_hex3]
1087              hex1, hex2, and hex3 are all Unicode hexadecimal codes (4  or  5
1088              hex  digits) that are used for overstriking, e.g.  \[u0041_0301]
1089              is A acute Á.
1090
1091       The availability of the Unicode characters depends on  the  used  font.
1092       For  text mode, the device -Tutf8 is quite complete, for troff modes it
1093       might happen that some  or  many  characters  will  not  be  displayed.
1094       Please check your fonts.
1095
1096   Strings
1097       Strings  are  defined  by the ds request and can be retrieved by the \*
1098       escape sequence.
1099
1100       Strings share their name space with  macros.   So  strings  and  macros
1101       without  arguments  are  roughly  equivalent;  it is possible to call a
1102       string like a macro and vice-versa, but  this  often  leads  to  unpre‐
1103       dictable  results.   The following string is the only one predefined in
1104       groff.
1105
1106       \*[.T]    The name of the current output device as specified by the  -T
1107                 command line option.
1108

REGISTERS

1110       Registers  are  variables that store a value.  In groff, most registers
1111       store numerical values (see section NUMERICAL EXPRESSIONS  above),  but
1112       some can also hold a string value.
1113
1114       Each  register is given a name.  Arbitrary registers can be defined and
1115       set with the nr request.
1116
1117       The value stored in a register can be retrieved by the escape sequences
1118       introduced by \n.
1119
1120       Most  useful  are  predefined registers.  In the following the notation
1121       name is used to refer to register name to  make  clear  that  we  speak
1122       about  registers.   Please keep in mind that the \n[] decoration is not
1123       part of the register name.
1124
1125   Read-only Registers
1126       The following registers have predefined values that should not be modi‐
1127       fied  by  the  user  (usually,  registers starting with a dot are read-
1128       only).  Mostly, they provide information on  the  current  settings  or
1129       store results from request calls.
1130
1131       \n[$$]    The process ID of troff.
1132       \n[.$]    Number of arguments in the current macro or string.
1133       \n[.a]    Post-line extra line-space most recently utilized using \x.
1134       \n[.A]    Set to 1 in troff if option -A is used; always 1 in nroff.
1135       \n[.b]    The emboldening offset while .bd is active.
1136       \n[.br]   Within  a  macro,  set to 1 if macro called with the ‘normal’
1137                 control character, and to 0 otherwise.
1138       \n[.c]    Current input line number.
1139       \n[.C]    1 if compatibility mode is in effect, 0 otherwise.
1140       \n[.cdp]  The depth of the last glyph added to the current environment.
1141                 It is positive if the glyph extends below the baseline.
1142       \n[.ce]   The  number  of lines remaining to be centered, as set by the
1143                 ce request.
1144       \n[.cht]  The height of the last glyph added to  the  current  environ‐
1145                 ment.   It  is  positive if the glyph extends above the base‐
1146                 line.
1147       \n[.color]
1148                 1 if colors are enabled, 0 otherwise.
1149       \n[.csk]  The skew of the last glyph added to the current  environment.
1150                 The  skew of a glyph is how far to the right of the center of
1151                 a glyph the center of an accent over  that  glyph  should  be
1152                 placed.
1153       \n[.d]    Current  vertical place in current diversion; equal to regis‐
1154                 ter nl.
1155       \n[.ev]   The name or number of the  current  environment  (string-val‐
1156                 ued).
1157       \n[.f]    Current font number.
1158       \n[.F]    The name of the current input file (string-valued).
1159       \n[.fam]  The current font family (string-valued).
1160       \n[.fn]   The current (internal) real font name (string-valued).
1161       \n[.fp]   The number of the next free font position.
1162       \n[.g]    Always  1 in GNU troff.  Macros should use it to test if run‐
1163                 ning under groff.
1164       \n[.h]    Text base-line high-water mark on current page or diversion.
1165       \n[.H]    Available horizontal resolution in basic units.
1166       \n[.height]
1167                 The current font height as set with \H.
1168       \n[.hla]  The current hyphenation language as set by the hla request.
1169       \n[.hlc]  The number of immediately  preceding  consecutive  hyphenated
1170                 lines.
1171       \n[.hlm]  The  maximum  allowed number of consecutive hyphenated lines,
1172                 as set by the hlm request.
1173       \n[.hy]   The current hyphenation flags (as set by the hy request).
1174       \n[.hym]  The current hyphenation margin (as set by the hym request).
1175       \n[.hys]  The current hyphenation space (as set by the hys request).
1176       \n[.i]    Current indentation.
1177       \n[.in]   The indentation that applies to the current output line.
1178       \n[.int]  Positive if last output line contains \c.
1179       \n[.j]    The current adjustment mode.  It can be stored  and  used  to
1180                 set adjustment.  (n = 1, b = 1, l = 0, r = 5, c = 3).
1181       \n[.k]    The  current horizontal output position (relative to the cur‐
1182                 rent indentation).
1183       \n[.kern] 1 if pairwise kerning is enabled, 0 otherwise.
1184       \n[.l]    Current line length.
1185       \n[.L]    The current line spacing setting as set by .ls.
1186       \n[.lg]   The current ligature mode (as set by the lg request).
1187       \n[.linetabs]
1188                 The current line-tabs mode (as set by the linetabs request).
1189       \n[.ll]   The line length that applies to the current output line.
1190       \n[.lt]   The title length (as set by the lt request).
1191       \n[.m]    The current drawing color (string-valued).
1192       \n[.M]    The current background color (string-valued).
1193       \n[.n]    Length of text portion on previous output line.
1194       \n[.ne]   The amount of space that was needed in the  last  ne  request
1195                 that  caused a trap to be sprung.  Useful in conjunction with
1196                 register .trunc.
1197       \n[.ns]   1 if in no-space mode, 0 otherwise.
1198       \n[.o]    Current page offset.
1199       \n[.O]    The suppression nesting level (see \O).
1200       \n[.p]    Current page length.
1201       \n[.P]    1 if the current page  is  being  printed,  0  otherwise  (as
1202                 determined by the -o command line option).
1203       \n[.pe]   1 during page ejection, 0 otherwise.
1204       \n[.pn]   The  number  of  the  next page: either the value set by a pn
1205                 request, or the number of the current page plus 1.
1206       \n[.ps]   The current point size in scaled points.
1207       \n[.psr]  The last-requested point size in scaled points.
1208       \n[.pvs]  The current post-vertical line spacing.
1209       \n[.R]    The number of unused number registers.  Always 10000  in  GNU
1210                 troff.
1211       \n[.rj]   The  number  of  lines to be right-justified as set by the rj
1212                 request.
1213       \n[.s]    Current point size as a decimal fraction.
1214       \n[.slant]
1215                 The slant of the current font as set with \S.
1216       \n[.sr]   The last requested point size in points as a decimal fraction
1217                 (string-valued).
1218       \n[.ss]   The  value of the parameters set by the first argument of the
1219                 ss request.
1220       \n[.sss]  The value of the parameters set by the second argument of the
1221                 ss request.
1222       \n[.sty]  The current font style (string-valued).
1223       \n[.t]    Vertical distance to the next trap.
1224       \n[.T]    Set to 1 if option -T is used.
1225       \n[.tabs] A  string representation of the current tab settings suitable
1226                 for use as an argument to the ta request.
1227       \n[.trunc]
1228                 The amount of vertical space truncated by the  most  recently
1229                 sprung  vertical position trap, or, if the trap was sprung by
1230                 a ne request, minus the amount of vertical motion produced by
1231                 .ne.  Useful in conjunction with the register .ne.
1232       \n[.u]    Equal to 1 in fill mode and 0 in no-fill mode.
1233       \n[.U]    Equal to 1 in safer mode and 0 in unsafe mode.
1234       \n[.v]    Current vertical line spacing.
1235       \n[.V]    Available vertical resolution in basic units.
1236       \n[.vpt]  1 if vertical position traps are enabled, 0 otherwise.
1237       \n[.w]    Width of previous glyph.
1238       \n[.warn] The  sum  of  the number codes of the currently enabled warn‐
1239                 ings.
1240       \n[.x]    The major version number.
1241       \n[.y]    The minor version number.
1242       \n[.Y]    The revision number of groff.
1243       \n[.z]    Name of current diversion.
1244       \n[.zoom] Zoom factor for current font (in multiples of 1/1000th;  zero
1245                 if no magnification).
1246
1247   Writable Registers
1248       The following registers can be read and written by the user.  They have
1249       predefined default values, but these can be modified for customizing  a
1250       document.
1251
1252       \n[%]     Current page number.
1253       \n[c.]    Current input line number.
1254       \n[ct]    Character type (set by width function \w).
1255       \n[dl]    Maximal width of last completed diversion.
1256       \n[dn]    Height of last completed diversion.
1257       \n[dw]    Current day of week (1–7).
1258       \n[dy]    Current day of month (1–31).
1259       \n[hours] The number of hours past midnight.  Initialized at start-up.
1260       \n[hp]    Current horizontal position at input line.
1261       \n[llx]   Lower  left  x-coordinate  (in  PostScript  units) of a given
1262                 PostScript image (set by .psbb).
1263       \n[lly]   Lower left y-coordinate (in  PostScript  units)  of  a  given
1264                 PostScript image (set by .psbb).
1265       \n[ln]    Output line number.
1266       \n[lsn]   The number of leading spaces of an input line.
1267       \n[lss]   The  horizontal  space corresponding to the leading spaces of
1268                 an input line.
1269       \n[minutes]
1270                 The number of minutes after the hour.  Initialized at  start-
1271                 up.
1272       \n[mo]    Current month (1–12).
1273       \n[nl]    Vertical position of last printed text base-line.
1274       \n[opmaxx]
1275       \n[opmaxy]
1276       \n[opminx]
1277       \n[opminy]
1278                 These  four registers mark the top left and bottom right hand
1279                 corners of a box which encompasses all written glyphs.   They
1280                 are reset to -1 by \O0 or \O1.
1281       \n[rsb]   Like register sb, but takes account of the heights and depths
1282                 of glyphs.
1283       \n[rst]   Like register st, but takes account of the heights and depths
1284                 of glyphs.
1285       \n[sb]    Depth  of string below base line (generated by width function
1286                 \w).
1287       \n[seconds]
1288                 The number of  seconds  after  the  minute.   Initialized  at
1289                 start-up.
1290       \n[skw]   Right  skip width from the center of the last glyph in the \w
1291                 argument.
1292       \n[slimit]
1293                 If greater than 0, the maximum number of objects on the input
1294                 stack.  If ≤0 there is no limit, i.e., recursion can continue
1295                 until virtual memory is exhausted.
1296       \n[ssc]   The amount  of  horizontal  space  (possibly  negative)  that
1297                 should  be added to the last glyph before a subscript (gener‐
1298                 ated by width function \w).
1299       \n[st]    Height of string above base line (generated by width function
1300                 \w).
1301       \n[systat]
1302                 The  return  value  of  the system() function executed by the
1303                 last sy request.
1304       \n[urx]   Upper right x-coordinate (in PostScript  units)  of  a  given
1305                 PostScript image (set by .psbb).
1306       \n[ury]   Upper  right  y-coordinate  (in  PostScript units) of a given
1307                 PostScript image (set by .psbb).
1308       \n[year]  The current year (year 2000 compliant).
1309       \n[yr]    Current year minus 1900.  For  Y2K  compliance  use  register
1310                 year instead.
1311

UNDERLINING

1313       In  the  RUNOFF  language, the underlining was quite easy.  But in roff
1314       this is much more difficult.
1315
1316   Underlining with .ul
1317       There exists a groff request .ul (see above)  that  can  underline  the
1318       next  or further source lines in nroff, but in troff it produces only a
1319       font change into italic.  So this request is not really useful.
1320
1321   Underlining with .UL from ms
1322       In the ‘ms’ macro package in  tmac/s.tmac  groff_ms(7),  there  is  the
1323       macro .UL.  But this works only in troff, not in nroff.
1324
1325   Underlining macro definitions
1326       So  one can use the italic nroff idea from .ul and the troff definition
1327       in ms for writing a useful new macro, something like
1328              .de UNDERLINE
1329              . ie n \\$1\f[I]\\$2\f[P]\\$3
1330              . el \\$1\Z'\\$2'\v'.25m'\D'l \w'\\$2'u 0'\v'-.25m'\[rs]\$3
1331              ..
1332       If doclifter (1) makes trouble, change the macro  name  UNDERLINE  into
1333       some  2-letter  word,  like  Ul.  Moreover change the font writing from
1334       \f[P] to \fP.
1335
1336   Underlining without macro definitions
1337       If one does not want to use macro definitions, e.g. when doclifter gets
1338       lost, use the following:
1339              .ds u1 before
1340              .ds u2 in
1341              .ds u3 after
1342              .ie n \*[u1]\f[I]\*[u2]\f[P]\*[u3]
1343              .el \*[u1]\Z'\*[u2]'\v'.25m'\D'l \w'\*[u2]'u 0'\v'-.25m'\*[u3]
1344       Due  to doclifter, it might be necessary to change the variable writing
1345       \[xy] and \*[xy] into the strange ancient writing \*(xy and  \(xy,  and
1346       so on.
1347
1348       Then these lines could look like
1349              .ds u1 before
1350              .ds u2 in
1351              .ds u3 after
1352              .ie n \*[u1]\fI\*(u2\fP\*(u3
1353              .el \*(u1\Z'\*(u2'\v'.25m'\D'l \w'\*(u2'u 0'\v'-.25m'\*(u3
1354
1355       The result looks like
1356              before _i_n after
1357
1358   Underlining with Overstriking \z and \(ul
1359       There is another possibility for underlining by using overstriking with
1360       \zc (print c with zero width without spacing) and \(ul (underline char‐
1361       acter).   This  produces  the underlining of 1 character, both in nroff
1362       and in troff.
1363
1364       For example the underlining of a character say t looks like \z\[ul]t or
1365       \z\(ult
1366
1367       Longer  words  look  then  a bit strange, but a useful mode is to write
1368       each character into a whole own line.  To underlines  the  3  character
1369       part "tar" of the word "start":
1370              before s\
1371              \z\[ul]t\
1372              \z\[ul]a\
1373              \z\[ul]r\
1374              t after
1375       or
1376              before s\
1377              \z\(ult\
1378              \z\(ula\
1379              \z\(ulr\
1380              t after
1381
1382       The result looks like
1383              before s_t_a_rt after
1384

COMPATIBILITY

1386       The  differences of the groff language in comparison to classical troff
1387       as defined by [CSTR #54] are documented in groff_diff(7).
1388
1389       The groff system provides a compatibility mode, see groff(1) on how  to
1390       invoke this.
1391

BUGS

1393       Report bugs to the groff bug mailing list ⟨bug-groff@gnu.org⟩.  Include
1394       a complete, self-contained example that will allow the bug to be repro‐
1395       duced, and say which version of groff you are using.
1396

SEE ALSO

1398       The  main  source  of  information  for the groff language is the groff
1399       info(1) file.  Besides the gory details, it contains many examples.
1400
1401       groff(1)
1402              the usage of the groff program and pointers to the documentation
1403              and availability of the groff system.
1404
1405       groff_diff(7)
1406              the  differences  of the groff language as compared to classical
1407              roff.  This is the authoritative  document  for  the  predefined
1408              language elements that are specific to groff.
1409
1410       groff_char(7)
1411              the predefined groff special characters (glyphs).
1412
1413       groff_font(5)
1414              the specification of fonts and the DESC file.
1415
1416       roff(7)
1417              the  history  of  roff, the common parts shared by all roff sys‐
1418              tems, and pointers to further documentation.
1419
1420       [CSTR #54]
1421              Nroff/Troff  User's  Manual  by  Ossanna  &  Kernighan  ⟨http://
1422              cm.bell-labs.com/cm/cs/cstr/54.ps.gz⟩  — the bible for classical
1423              troff.
1424

COPYING

1426       This file is part of groff, the GNU roff type-setting system.
1427
1428       Copyright © 2000-2014 Free Software Foundation, Inc.
1429
1430       Permission is granted to copy, distribute and/or modify  this  document
1431       under  the  terms of the GNU Free Documentation License, Version 1.3 or
1432       any later version published by the Free Software  Foundation;  with  no
1433       Front-Cover Texts, and with no Back-Cover Texts.
1434
1435       A  copy  of the Free Documentation License is included as a file called
1436       FDL in the main directory of the groff  source  package.   It  is  also
1437       available in the internet at ⟨http://www.gnu.org/copyleft/fdl.html⟩.
1438

AUTHORS

1440       This    documentation    was    written   by   Bernd   Warken   ⟨groff-
1441       bernd.warken-72@web.de⟩  and  is  appended  and  maintained  by  Werner
1442       Lemberg ⟨wl@gnu.org⟩.
1443
1444
1445
1446Groff Version 1.22.3            4 November 2014                       GROFF(7)
Impressum