5 This file is part of groff, the GNU roff type-setting system.
7 Copyright (C) 2000 Free Software Foundation, Inc.
8 written by Bernd Warken <bwarken@mayn.de>
10 Last update: 29 Apr 2000
12 Permission is granted to copy, distribute and/or modify this document
13 under the terms of the GNU Free Documentation License, Version 1.1 or
14 any later version published by the Free Software Foundation; with the
15 Invariant Sections being AUTHOR, with no Front-Cover Texts, and with no
18 A copy of the Free Documentation License is included as a file called
19 fdl.txt in the main directory of the groff source package.
22 .\" --------------------------------------------------------------------
24 .\" --------------------------------------------------------------------
26 .if n .mso tmac.tty-char
28 .\" for formatting of single quotes in documenting code
30 .\" for formatting of double quotes, twice because of Emacs highlighting
38 . ds @tmp@ \\fB\\$1\\fP\\fI\\$2\\fP
46 . ds @tmp@ \&\\en[\\fB\\$1\\fP]
56 . IP "\\fB\&\\*[@tmp@]\\fP \\fI\&\\$*\\fP" 10n
60 .\" escape sequence synopsis
64 . IP "\\fB\\e\&\\*[@tmp@]\\fP\\fI\&\\$*\\fP"
68 .\" escape sequence synopsis
73 . IP "\\fB\\e\&\\*[@arg1@][\\fP\\fI\&\\*[@arg2@]\\fP\\fB]\&\\$*\\fP"
78 .\" escape sequence with quoted argument
82 . IP "\\fB\\e\&\\*[@tmp@]\\fP\\fI\\*q\&\\$*\\*q\\fP"
86 .\" 2-escapes (special characters)
90 . BR \\e(\&\\*[@tmp@] \ \ \ \\(\\*[@tmp@]
96 .\" 2-escapes (special characters) with extra argument
100 . BR \\e(\&\\*[@tmp@] \ \ \ \\$2
108 . ds OLDT@BS \\n[.tabs]
111 . ta 6n 9n 30n T 6n 9n
112 \\fB\\e(*\\$1\\fP\t\\fI\\(*\\$1\\fP\t\\$2\t\
113 \\fB\\e(*\\$3\\fP\t\\fI\\(*\\$3\\fP\t\\$4
117 \\fB\\e(*\\$1\\fP\t\\$2\t\
118 \\fB\\e(*\\$3\\fP\t\\$4
124 .\" synopsis for registers
132 .\" description of warnings
141 .\" --------------------------------------------------------------------
143 .\" --------------------------------------------------------------------
144 .TH GROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
146 groff \- a short reference for the GNU roff language
147 .\" --------------------------------------------------------------------
149 .\" --------------------------------------------------------------------
153 and is the free implementation of the roff type-setting system.
156 for a survey and the background of the groff system.
158 This document gives only short descriptions of the predefined roff
159 language elements as used in groff.
160 Both the classical features and the groff extensions are provided.
167 is compatible sith the classical system and provides proper extensions.
173 could be used as synonyms. However
175 slightly tends to refer more to the classical aspects, whereas
177 emphasizes the GNU extensions, and
179 is the general term for the language.
181 This file is not maintained, so it might already be out of date.
182 The full documentation with more detailed, actual, and concise information
187 .\" --------------------------------------------------------------------
189 .\" --------------------------------------------------------------------
190 The roff language elements add formatting information to a text file.
191 The fundamental elements are predefined commands and variables that make
192 roff a full-blown programming language.
194 There are two kinds of commands, possibly with arguments.
196 are written on a line of their own starting with a dot `.', whereas
198 are in-line formatting elements starting with a backslash `\e'.
199 User-defined formatting commands are called
201 and are used exactly like requests.
203 The roff language provides two kinds of variables.
205 are used to store character sequences, whereas
207 can store numerical values.
208 .\" --------------------------------------------------------------------
209 .SH "NUMERICAL EXPRESSIONS"
210 .\" --------------------------------------------------------------------
213 is a signed or unsigned integer or float with or without an appended
217 is a one-character abbreviation for a unit of measurement.
218 A number followed by a scale indicator signifies a size value.
219 By default, numerical values do not have a scale indicator, i.e., they are
222 The roff language defines the following scale indicators.
230 p@Point \(eq 1/72 inch
231 m@Em \(eq the font size in points (width of letter `m')
234 u@Basic unit for actual output device
235 v@Vertical line space in basic units
237 scaled point \(eq 1/\fIsizescale\fP of a point
238 (defined in font DESC)
242 .B Numerical expressions
243 are the common combinations of the numerical values defined above with
244 the arithmetical operators `+', `-', `*', `/', `%' (mod), the
245 comparative operators `==' (same as `='), `>', `<', `>=', `<=', the
246 logical operators `&' (and), `:' (or), `!' (not), and parentheses `(' and
251 added the following operators for numerical expressions:
271 as the default scaling indicator.
274 For details see the groff info file.
275 .\" --------------------------------------------------------------------
277 .\" --------------------------------------------------------------------
279 occur in tests raised by the
284 There are many different types of conditions.
288 A numerical expression
290 tests true if its value is\ >0.
300 is identical to string
306 is not identical to string
310 There is a small set of letters that can be used to denote conditional
316 c\fIch@True if there is a character \fIch\fP available.
318 True if there is a string, macro, diversion, or request named
321 e@Current page number is even.
322 o@Current page number is odd.
323 n@Formatter is \fBnroff\fR.
324 r\fIreg@True if there is a register named \fIreg\fP.
325 t@Formatter is \fBtroff\fR.
327 .\" --------------------------------------------------------------------
329 .\" --------------------------------------------------------------------
330 This section provides a short reference for the predefined requests.
331 In groff, request and macro names can be arbitrarily long.
332 No bracketing or marking of long names is needed.
334 Most requests take one or more arguments.
335 The arguments are separated by space characters; there is no inherent limit
336 for their length or number.
337 An argument can be enclosed by a pair of double quotes, this is very handy
338 if an argument contains space characters, e.g., "arg\ with\ space"
339 denotes a single argument.
341 Some requests have optional arguments with a different behaviour.
342 Not all of these details are outlined here.
343 Refer to the groff info file for the whole truth.
345 In the following request specifications, most argument names were chosen
347 Only the following denotations need clarification.
351 denotes a single character.
354 is an arbitrary numerical expression, signed or unsigned.
357 is a numerical expression that evaluates to an integer value.
360 has three meanings depending on its sign.
361 Without a sign, it means to replace
364 If preceded by a negative sign
366 the value of the numerical expression
368 must be subtracted from an already existing value inherent to the
370 If the sign is positive
373 To make a negative number an unsigned expression it can be preceded by a
377 A font may be specified as a font name or a font number.
380 means all characters up to the end of the line or within a
382 construct is interpreted.
384 .\" --------------------------------------------------------------------
385 .SS "REQUEST SHORT REFERENCE"
386 .\" --------------------------------------------------------------------
389 Complete line is a comment.
393 on standard error, exit program.
396 Begin line adjustment for output lines in current adjust mode.
399 Start line adjustment in mode mode
401 .RI ( c \(eq\fCl,r,b,n\fP).
408 .RI ( c \(eq\fC1,i,I,a,A\fP).
410 .REQ .aln alias register
411 Create alias name for
414 .REQ .als alias object
415 Create alias name for request, string, macro, or diversion
432 .REQ .as stringvar anything
438 .REQ .asciify diversion
439 Unformat special ASCII characters in
443 Print a backtrace of the input on stderr.
453 Embolden Special Font
459 Eject current page and begin new page.
462 Eject current page; next page number
464 (default scale indicator
468 Set the blank line macro to
475 Break out of a while loop.
478 Set nobreak control character to
482 Set control character to
486 Center the next input line.
494 Copy contents of file
496 unprocessed to stdout or to the diversion.
498 .REQ .cflags mode c1 c2 ...
514 .REQ .char c anything
521 Chop the last character off macro, string, or diversion
529 Finish the current iteration of a while loop.
532 Enable compatibility mode.
537 is zero disable compatibility mode, otherwise enable it.
540 Set constant character width mode for
548 Continuous underline in nroff, like
577 with compatibility enabled.
579 .REQ .ds stringvar anything
586 Set diversion trap to position
588 (default scale indicator
592 Set escape character to
596 Else part for if-else
602 will be run after the end of input.
605 Turn off escape character mechanism.
608 Switch to previous environment.
611 Push down environment number or name
616 Copy the contents of environment
618 to the current environment. No pushing or popping.
621 Exit from roff processing.
624 Set the current font family to
645 .REQ .fp n internal external
653 .REQ .fspecial font s1 s2...
654 When the current font is
663 Return to previous font.
667 Change to font name or number
673 .REQ .ftr font1 font2
680 Set hyphenation indicator character to
683 .REQ .hcode c1 code1 c2 code2 ...
684 Set the hyphenation code of character
695 Set the current hyphenation language to
699 Set the maximum number of consecutive hyphenated lines to
703 Read hyphenation patterns from
709 with exceptional hyphenation.
712 Switch to hyphenation mode
716 Set the hyphenation margin to
720 Set the hyphenation space to
723 .REQ .ie cond anything
731 .REQ .if cond anything
736 otherwise do nothing.
748 Change to previous indent value.
751 Change indent according to
753 (default scale indicator
757 Set an input-line count trap
764 is non-zero or missing, enable pairwise kerning, otherwise disable it.
767 Leader repetition character.
769 .REQ .length register anything
770 Write the length of the string
776 Set input line number to
786 Change to previous line length.
789 Set line length according to
793 default scale indicator
797 Change to the previous value of additional intra-line skip.
800 Set additional intra-line skip value to
804 vertical units (scale indicator
806 are skipped after each text output line.
812 Margin character off.
817 after each text line at actual distance from right margin.
820 Set margin character to
827 Mark current vertical position in
831 The same as the .so request except that
833 is also searched in the tmac directories.
836 No output-line adjusting.
849 No filling or adjusting of output-lines.
858 In line number mode, set number, multiple, spacing, and indent.
861 Do not number next line.
868 .REQ .nr register \(+-N M
877 Make the built-in condition
884 Turn no-space mode on.
889 .REQ .open stream filename
892 for writing and associate the stream named
896 .REQ .opena stream filename
902 Output vertical distance that was saved by the
907 Page number character.
915 Set page length to default
917 The current page length is stored in
921 Change page length to
923 (default scale indicator
927 Print macro names and sizes (number of blocks of 128 bytes).
930 Print only total of sizes of macros (number of 128 bytes blocks).
937 Print the names and contents of all currently defined number registers
941 Change to previous page offset. The current page offset is available in
949 Return to previous point-size.
955 Get the bounding box of a PostScript image
959 This behaves like the
961 request except that input comes from the standard output of
965 Print the names and positions of all traps (not including input line
966 traps and diversion traps) on stderr.
969 Remove the definitions of characters
978 Right justify the next
983 Remove request, macro, or string
987 Rename request, macro, or string
1003 Restore spacing; turn no-space mode off.
1008 to marked vertical place.
1011 Set the soft hyphen character to
1015 In a macro, shift the arguments by
1020 Include source file.
1028 Space vertical distance
1030 up or down according to sign of
1033 .REQ .special s1 s2 ...
1037 etc. are special and will be searched for characters not in the current font.
1040 Space-character size set to
1042 of the spacewidth in the current font.
1045 Space-character size set to
1047 and sentence space size set to
1049 of the spacewidth in the current font (\(eq1/3 em).
1057 .REQ .substring register n1 n2
1058 Replace the string in
1060 with the substring defined by the indices
1071 Save the vertical distance
1073 for later output with
1077 .REQ .sy command-line
1082 Set tabs after every position that is a multiple of
1084 .REQ .ta n1 n2 ... nn \fBT\fP r1 r2 ... rn
1085 Set tabs at positions
1103 Tab repetition character.
1108 .REQ .tkf font s1 n1 s2 n2
1109 Enable track kerning for
1112 .REQ .tl \*qleft\*qcenter\*qright\*q
1116 Transparently output the contents of file
1122 on terminal (UNIX standard message output).
1135 This is the same as the .tr request except that the translations do not
1136 apply to text that is transparently throughput into a diversion with
1140 Make the built-in condition
1147 Underline font set to
1149 (to be switched to by
1153 Underline (italicize in troff)
1158 Enable vertical position traps if
1160 is non-zero, disable them otherwise.
1163 Change to previous vertical base line spacing.
1166 Set vertical base line spacing to
1172 Set warnings code to
1176 Set location trap; negative means from page bottom.
1178 .REQ .while cond anything
1185 .REQ .write stream anything
1191 .\" --------------------------------------------------------------------
1192 .SH "ESCAPE SEQUENCES"
1193 .\" --------------------------------------------------------------------
1194 Escape sequences are in-line language elements introduced by a backslash
1196 and followed by an escape name and sometimes by a required argument.
1197 Input processing is continued directly after the escaped character or
1198 the argument resp. without an intervening separation character.
1199 So there must be a way to determine the end of the escape name and the end
1202 This is done by enclosing names (escape name and arguments consisting of
1203 a variable name) by a pair of brackets
1205 and constant arguments (number expressions and characters) by apostrophes
1207 .IR \*qconstant\*q .
1209 There are abbreviations for short names.
1210 Two character escape names can be specified by an opening parenthesis like
1212 without a closing counterpart.
1213 And all one-character names different from the special characters
1217 can even be specified without a marker in the form
1220 Constant arguments of length\ 1 can omit the marker apostrophes, too, but
1221 there is no two-character analogue.
1223 While 1-character escape sequences are mainly used for in-line functions
1224 and system related tasks, the 2-letter names following the
1226 construct are used for special characters predefined by the roff system.
1229 mostly denote user defined named characters (see the
1232 .\" --------------------------------------------------------------------
1233 .SS "SINGLE CHARACTER ESCAPES"
1234 .\" --------------------------------------------------------------------
1237 reduces to a single backslash, useful to delay its interpretation as
1238 escape character in copy mode.
1239 For a printable backslash, use
1242 The acute accent \(aa; same as
1244 Unescaped: apostrophe, right quotation mark, single quote (ASCII 0x27).
1246 The grave accent \(ga; same as
1248 Unescaped: left quote, backquote (ASCII 0x60).
1250 The \- sign in the current font.
1252 An uninterpreted dot (period), even at start of line.
1254 Unpaddable space-size space character (no line break).
1258 1/6 em narrow space character; zero width in nroff.
1260 1/12 em half-narrow space character; zero width in nroff.
1262 Non-printable, zero width character.
1264 Transparent line indicator.
1266 Beginning of comment.
1268 Default optional hyphenation character.
1270 The string stored in the string variable with 1-character name
1273 The string stored in the string variable with 2-character name
1276 The string stored in the string variable with arbitrary length name
1279 The name by which the current macro was invoked. The
1281 request can make a macro have more than one name.
1283 Macro argument with 1-place number
1287 is a digit between 1 and 9.
1289 Macro argument with 2-digit number
1292 Macro argument with number
1296 is a numerical expression evaluating to an integer >=1.
1298 In a macro, the concatenation of all the arguments separated by spaces.
1300 In a macro, the concatenation of all the arguments with each surrounded
1301 by double quotes, and separated by spaces.
1302 .ESC ? anything\fB?\fP
1303 In a diversion, this will transparently embed
1307 is read in copy mode.
1309 Increases the width of the preceding character so that the spacing
1310 between that character and the following character will be correct if
1311 the following character is a roman character.
1313 Modifies the spacing of the following character so that the spacing
1314 between that character and the preceding character will correct if the
1315 preceding character is a roman character.
1319 except that it behaves like a character declared with the cflags
1320 request to be transparent for the purposes of end of sentence
1323 Unbreakable space that stretches like a normal inter-word space when a
1326 Everything up to and including the next newline is ignored. This is
1327 interpreted in copy mode. This is like
1329 except the ignoring of the terminating newline.
1331 Begin conditional input.
1333 End conditional input.
1335 Ignored newline, for continuation lines.
1337 The special character with 2-character name
1340 .BR "SPECIAL CHARACTERS" .
1342 The named character with arbitrary length name
1345 Non-interpreted leader character.
1349 acceptable as name of a string, macro, diversion, register,
1350 environment or font it is
1355 Bracket building function.
1357 Interrupt text processing.
1359 The character called
1363 but compatible to other roff versions.
1365 Forward (down) 1/2 em vertical unit (1/2 line in nroff).
1367 Draw a graphical element defined by the characters in
1369 see groff info file for details.
1371 Printable version of the current escape character.
1373 Equivalent to an escape character, but is not interpreted in copy-mode.
1375 Change to font with 1-character name or 1-digit number
1378 Change to font with 2-characer name or 2-digit number
1381 Change to font with arbitrary length name or number expression
1384 Return format of register with name
1393 Local horizontal motion; move right
1397 Set height of current font to
1400 Mark horizontal input place in register with arbitrary length name
1407 Horizontal line drawing function (optionally using character
1410 Vertical line drawing function (optionally using character
1413 The numerical value stored in the register variable with the 1-character
1417 The numerical value stored in the register variable with the 2-character
1421 The numerical value stored in the register variable with arbitrary
1425 Typeset the character with code
1427 in the current font,
1429 No special fonts searched.
1431 Overstrike characters
1437 Break and spread output line.
1439 Reverse 1 em vertical motion (reverse line in nroff).
1446 Set the point size to
1448 scaled points. Note the alternative forms
1450 .BIP \es \*q\(+-N\*q ,
1451 .BIP \es \(+-\*qN\*q ,
1463 Non-interpreted horizontal tab.
1465 Reverse (up) 1/2 em vertical motion (1/2 line in nroff).
1467 Local vertical motion; move down
1471 The contents of the environment variable
1478 The width of the character sequence
1481 Extra line-space function (negative before, positive after).
1485 as device control function.
1487 Output string variable or macro
1489 uninterpreted as device control function.
1497 with zero width (without spacing).
1501 and then restore the horizontal and vertical position;
1503 may not contain tabs or leaders.
1506 The escape sequences
1518 are interpreted in copy mode.
1520 Escape sequences starting with
1524 do not represent single character escape sequences, but introduce escape
1525 names with two or more characters.
1527 If a backslash is followed by a character that does not constitute a
1528 defined escape sequence the backslash is silently ignored and the
1529 character maps to itself.
1530 .\" --------------------------------------------------------------------
1531 .SS "SPECIAL CHARACTERS"
1532 .\" --------------------------------------------------------------------
1533 Common special characters are predefined by escape sequences of the form
1539 Some of these exist in the usual font while most of them are only
1540 available in the special font.
1543 .ESc aa Acute accent
1544 .ESc ap Approximately
1548 Bell sign, former AT&T copyright mark, not implemented in groff.
1550 .ESc bv ? Vertical bar
1551 .ESc ca Cap operator
1555 .ESc cu Cup operator
1557 .ESc di Division sign
1558 .ESc dd Double dagger
1569 .ESc fm ? Kind of prime
1570 .ESc ga Grave accent
1571 .ESc gr ? Nabla operator
1573 .ESc ib Identical or subset
1575 .ESc ip Identical or superset
1576 .ESc is Integral sign
1578 .ESc lc Left ceiling
1581 .ESc lk ? Left (k)urley
1583 .ESc mi Minus sign; same as \e\-
1585 .ESc mu Multiplication sign
1586 .ESc no Logical NOT sign
1587 .ESc or Logical OR sign
1588 .ESc pd Partial differential
1590 .ESc pt Proportional
1591 .ESc rb Right bottom
1592 .ESc rc Right ceiling
1597 .ESc rk ? Right (k)urley
1599 .ESc ru Ruler character
1601 .ESc sc Section sign
1606 .ESc ts Terminal sigma
1608 .ESc ul Underline character
1611 .ESc 34 Three quarter
1613 .ESc >= Larger or equal
1614 .ESc <= Less or equal
1616 .EScx \-> \(-> Right arrow
1617 .EScx <\- \(<- Left arrow
1619 .EScx +\- \(+- Plus-minus sign
1620 .ESc ~= Approximately equal
1623 Greek letters are defined by appending the corresponding roman character
1624 to the initial sequence
1626 being a 2-letter sequence with an asterisk as its first letter.
1629 is defined as \fC\e(*a\fP.
1631 .GREEK a alpha A Alpha
1632 .GREEK b beta B Beta
1634 .GREEK d delta D Delta
1635 .GREEK e epsilon E Epsilon
1637 .GREEK g gamma G Gamma
1638 .GREEK h theta H Theta
1639 .GREEK i iota I Iota
1640 .GREEK k kappa K Kappa
1641 .GREEK l lambda L Lambda
1644 .GREEK o omikron O Omikron
1648 .GREEK s sigma S Sigma
1650 .GREEK u ypsilon U Ypsilon
1651 .GREEK w omega W Omega
1654 .GREEK z zeta Z Zeta
1656 .ds OLDT@BS \n[.tabs]
1659 In the order of the Greek alphabet this looks like
1662 \(*a \(*b \(*g \(*d \(*e \(*z \(*g \(*y \
1663 \(*h \(*i \(*k \(*l \(*m \(*n \(*c \(*o \
1664 \(*p \(*r \(*s \(*t \(*u \(*f \(*x \(*q \(*z
1671 \(*A \(*B \(*G \(*D \(*E \(*Z \(*G \(*Y \
1672 \(*H \(*I \(*K \(*L \(*M \(*N \(*C \(*O \
1673 \(*P \(*R \(*S \(*T \(*U \(*F \(*X \(*Q \(*Z
1681 .\" --------------------------------------------------------------------
1683 .\" --------------------------------------------------------------------
1684 Registers are variables that store a value.
1685 In groff, most registers store numerical values (see section
1686 .B NUMERICAL EXPRESSIONS
1687 above), but some can also hold a string value.
1689 Each register is given a name.
1690 Arbitrary registers can be defined and set with the request
1694 The value stored in a register can be retrieved by the escape sequences
1698 Most useful are predefined registers.
1699 In the following the notation
1701 is used to refer to a register called
1703 to make clear that we speak about registers.
1704 Please keep in mind that the
1706 decoration is not part of the register name.
1707 .\" --------------------------------------------------------------------
1708 .SS "READ-ONLY REGISTERS"
1709 .\" --------------------------------------------------------------------
1710 The following registers have predefined values that should not be
1711 modified by the user (usually, registers starting with a dot a read-only).
1712 Mostly, they provide information on the current settings or store results
1716 .REG .$ Number of arguments in the current macro.
1722 is used; always\ 1 in
1724 .REG .H Available horizontal resolution in basic units.
1730 is used; always\ 0 in
1732 .REG .V Available vertical resolution in basic units.
1734 Post-line extra line-space most recently utilized using
1736 .REG .C 1 if compatibility mode is in effect, 0 otherwise.
1737 .REG .c Number of lines read from current input file.
1739 The depth of the last character added to the current environment.
1740 It is positive if the character extends below the baseline.
1742 The number of lines remaining to be centered, as set by the
1746 The height of the last character added to the current environment.
1747 It is positive if the character extends above the baseline.
1749 The skew of the last character added to the current environment.
1750 The skew of a character is how far to the right of the center of a character
1751 the center of an accent over that character should be placed.
1753 Current vertical place in current diversion; equal to register
1755 .REG .ev The name or number of the current environment (string-valued).
1756 .REG .f Current font number.
1757 .REG .fam The current font family (string-valued).
1758 .REG .fp The number of the next free font position.
1760 Always 1 in GNU troff.
1761 Macros should use it to test if running under
1763 .REG .h Text base-line high-water mark on current page or diversion.
1765 The current hyphenation language as set by the
1769 The number of immediately preceding consecutive hyphenated lines.
1771 The maximum allowed number of consecutive hyphenated lines, as set by
1776 The current hyphenation flags (as set by the
1780 The current hyphenation margin (as set by the
1784 The current hyphenation space (as set by the
1787 .REG .i Current ident.
1788 .REG .in The indent that applies to the current output line.
1791 if pairwise kerning is enabled,
1793 .REG .l Current line length.
1795 The current ligature mode (as set by the
1798 .REG ll The line length that applies to the current output line.
1800 The title length (as set by the
1803 .REG .n Length of text portion on previous output line.
1805 The amount of space that was needed in the last
1807 request that caused a trap to be sprung.
1808 Useful in conjunction with
1810 .REG .o Current page offset.
1811 .REG .p Current page length.
1813 The number of the next page: either the value set by a
1815 request, or the number of the current page plus\ 1.
1816 .REG .ps The current pointsize in scaled points.
1817 .REG .psr The last-requested pointsize in scaled points.
1819 The number of lines to be right-justified as set by the rj request.
1820 .REG .s Current point size.
1822 The last requested pointsize in points as a decimal fraction
1824 .REG .t Distance to the next trap.
1826 A string representation of the current tab settings suitable for use as
1831 The amount of vertical space truncated by the most recently sprung
1832 vertical position trap, or, if the trap was sprung by a
1834 request, minus the amount of vertical motion produced by
1837 In other words, at the point a trap is sprung, it represents the difference
1838 of what the vertical position would have been but for the trap, and what the
1839 vertical position actually is.
1840 Useful in conjunction with the
1844 The value of the parameters set by the first argument of the
1848 The value of the parameters set by the second argument of the
1851 .REG .u Equal to 1 bin fill mode and 0 in nofill mode.
1852 .REG .v Current vertical line spacing.
1855 if vertical position traps are enabled,
1858 .REG .w Width of previous character.
1860 The sum of the number codes of the currently enabled warnings.
1861 .REG .x The major version number.
1862 .REG .y The minor version number.
1863 .REG .Y The revision number of groff.
1864 .REG .z Name of current diversion.
1866 Lower left x-coordinate (in PostScript units) of a given PostScript
1870 Lower left y-coordinate (in PostScript units) of a given PostScript
1875 but takes account of the heights and depths of characters.
1879 but takes account of the heights and depths of characters.
1881 Depth of string below base line (generated by width function
1884 Right skip width from the center of the last character in the
1888 The amount of horizontal space (possibly negative) that should be added
1889 to the last character before a subscript.
1891 Height of string above base line (generated by width function
1894 Upper right x-coordinate (in PostScript units) of a given PostScript
1898 Upper right y-coordinate (in PostScript units) of a given PostScript
1902 .\" --------------------------------------------------------------------
1903 .SS "WRITABLE REGISTERS"
1904 .\" --------------------------------------------------------------------
1905 The following registers can be read and written by the user.
1906 They have predefined default values, but these can be modified for
1907 customizing a document.
1910 .REG % Current page number.
1911 .REG ct Character type (set by width function
1913 .REG dl Maximal width of last completed diversion.
1914 .REG dw Current day of week (1-7).
1915 .REG dy Current day of month (1-31).
1916 .REG hp Current horizontal position at input line.
1917 .REG ln Output line number.
1918 .REG mo Current month (1-12).
1919 .REG nl Vertical position of last printed text base-line.
1921 If greater than 0, the maximum number of objects on the input stack.
1922 If <=0 there is no limit, i.e., recursion can continue until virtual memory
1925 The return value of the
1927 function executed by the last
1930 .REG year The current year (year 2000 compliant).
1932 Current year minus 1900. For Y2K compliance use register
1936 .\" --------------------------------------------------------------------
1938 .\" --------------------------------------------------------------------
1939 Each warning generated by groff is identified by a name and a code
1940 number. The codes are powers of 2 to allow bit-encoding with a single
1941 integer. There are also names that can be used to refer to groups of
1944 The name associated with a warning is used by the
1949 the number code is used by the
1962 Intended to cover all warnings with traditional macro packages.
1964 In fill mode, lines which could not be broken so that their length was
1965 less than the line length. This is enabled by default.
1967 Non-existent characters. This is enabled by default.
1969 Missing or mismatched closing delimiters.
1975 without an argument when there is no current diversion.
1979 request with no matching
1982 .Warning escape 32768
1983 Unrecognized escape sequence. Then the escape character is ignored.
1984 .Warning font 131072
1985 Non-existent fonts. This is enabled by default.
1987 Illegal escapes in text ignored with the
1989 request. These are conditions that are errors when they occur outside
1992 Use of undefined strings, macros, and diversions. Automatically handled
1993 as empty. Usually, only one warning per name.
1994 .Warning missing 8192
1995 Request that is missing non-optional arguments.
1996 .Warning input 16384
1997 Illegal input character.
1999 Invalid numeric expressions. This is enabled by default.
2001 Out of range arguments.
2003 Use of undefined number register. Automatically defined as having
2004 value 0. Usually, only one warning per name.
2005 .Warning right-brace 4096
2008 where a number was expected.
2010 Meaningless scaling indicators.
2011 .Warning space 65536
2012 Missing space between a request or macro and its argument. Then no
2013 macro is automatically defined. This is enabled by default. This
2014 warning will never occur in compatibility mode.
2016 Dubious syntax in numeric expressions.
2018 Inappropriate use of a tab character (either in an unquoted macro
2019 argument or where a number was expected).
2025 tab (@), box, expand;
2026 c c c | c c c | c c c
2027 R RI CB | R RI CB | R RI CB.
2028 Bit@Code@Warning@Bit@Code@Warning@Bit@Code@Warning
2030 0@1@char@8@256@di@16@65536@space
2031 1@2@number@9@512@mac@17@131072@font
2032 2@4@break@10@1024@reg@18@262144@ig
2033 3@8@delim@11@2048@tab
2034 4@16@el@12@4096@right-brace
2035 5@32@scale@13@8192@missing
2036 6@64@range@14@16384@input
2037 7@128@syntax@15@32768@escape
2040 .\" --------------------------------------------------------------------
2042 .\" --------------------------------------------------------------------
2045 .B compatibility mode
2046 that allows to process roff code written for classical
2048 or for other implementations of roff in a consistent way.
2050 Compatibility mode can be turned on with the
2052 command line option, and turned on or off with the
2054 request. The number register
2056 is 1 if compatibility mode is on, 0 otherwise.
2058 This became necessary because the GNU concept for long names causes some
2066 as defining a string
2072 will interpret this as a call of a macro named
2081 as references to a string or number register called
2086 however, this will normally be interpreted as the start of a long name.
2091 groff will interpret these things in the traditional way, but long names
2094 On the other hand, groff in
2096 does not allow to use the escape sequences
2112 in names of strings, macros, diversions, number registers, fonts or
2113 environments, whereas
2117 escape sequence can be helpful in avoiding these escape sequences in
2120 Fractional pointsizes cause one noteworthy incompatibility.
2126 request ignores scale indicators and so
2132 will set the pointsize to 10 points, whereas in groff native mode the
2133 pointsize will be set to 10 scaled points.
2137 mode, there is a fundamental difference between unformatted input
2138 characters, and formatted output characters.
2139 Everything that affects how an output character will be output is stored
2140 with the character; once an output character has been constructed it is
2141 unaffected by any subsequent requests that are executed, including the
2150 Normally output characters are constructed from input characters at the
2151 moment immediately before the character is added to the current output
2153 Macros, diversions and strings are all, in fact, the same type of object;
2154 they contain lists of input characters and output characters in any
2157 An output character does not behave like an input character for the
2158 purposes of macro processing; it does not inherit any of the special
2159 properties that the input character from which it was constructed might
2161 The following example will make things clearer.
2177 this will be printed as
2179 So each pair of input backslashes
2181 is turned into a single output backslash
2183 and the resulting output backslashes are not interpreted as escape
2184 characters when they are reread.
2187 would interpret them as escape characters when they were reread and
2188 would end up printing a single backslash
2191 The correct way to get a printable
2195 escape sequence. This will always print a single instance of the
2196 current escape character, regardless of whether or not it is used in a
2197 diversion. It will also work in both GNU mode and compatibility mode.
2199 To store an escape sequence in a diversion that will be interpreted when
2200 the diversion is reread, either the traditional
2202 transparent output facility or the
2205 escape sequence can be used.
2206 .\" --------------------------------------------------------------------
2208 .\" --------------------------------------------------------------------
2209 At the moment, the documentation of the groff system is in a state of
2210 change and evolution. It is possible that there are small
2211 inconsistencies between different documents temporarily.
2212 .\" --------------------------------------------------------------------
2214 .\" --------------------------------------------------------------------
2215 This document is part of the GNU roff distribution. It was written by
2216 Bernd Warken <bwarken@mayn.de>.
2218 It is distributed under the terms of the GFDL (GNU Free Documentation
2219 License) version 1.1 or later. You should have received a copy of the
2220 GFDL on your system, it is also available on-line under
2221 .IR <http://www.gnu.org/copyright/fdl.html> .
2223 Formerly, the extensions of the groff language were kept in the manual
2225 .BR troff (@MAN1EXT@).
2226 This document contains the essential parts of that documentation, but
2227 the gory details were left for the groff info file.
2228 .\" --------------------------------------------------------------------
2230 .\" --------------------------------------------------------------------
2231 The main source of information for the groff language is the
2236 For a survey of the groff system and further documentation pointers see
2237 .BR roff (@MAN7EXT@).
2239 The formatter programs are described in
2240 .BR groff (@MAN1EXT@)
2242 .BR troff (@MAN1EXT@).
2246 documentation is available on-line at
2247 .I http://cm.bell-labs.com/cm/cs/cstr.html
2249 .IR http://www.kohala.com/start/troff/ .