5 Last update: 17 Feb 2005
7 This file is part of groff, the GNU roff type-setting system.
9 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
10 Free Software Foundation, Inc.
11 written by Bernd Warken <bwarken@mayn.de>
12 maintained by Werner Lemberg <wl@gnu.org>
14 Permission is granted to copy, distribute and/or modify this document
15 under the terms of the GNU Free Documentation License, Version 1.1 or
16 any later version published by the Free Software Foundation; with the
17 Invariant Sections being this .ig-section and AUTHORS, with no
18 Front-Cover Texts, and with no Back-Cover Texts.
20 A copy of the Free Documentation License is included as a file called
21 FDL in the main directory of the groff source package.
24 .\" --------------------------------------------------------------------
26 .\" --------------------------------------------------------------------
45 .\" --------------------------------------------------------------------
46 .\" start of macro definitions
55 .c ---------------------------------------------------------------------
58 .c All arguments are printed as text.
63 .c ---------------------------------------------------------------------
64 .c .ExecFF macro font1 font2 text1 text2 text1 text2 ...
66 .c Concat text arguments using alternating fonts and feed into macro.
67 .c For a trailing punctuation, terminate the call with \c.
82 . as @s \f[\*[@f1]]\*[@a]\f[]\"
87 . as @s \f[\*[@f2]]\*[@a]\f[]\"
90 . \*[@m] "\*[@s]\f[R]"
91 . ft P \" to make \c happy
99 .c --------- command line option ---------
106 .c --------- characters ---------
109 . ExecFF Text CB R \$*
114 . ExecFF Text R CB \[oq] \*[@1] "\[cq]\$*"
120 . ExecFF Text R CB \[lq] \*[@1] "\[rq]\$*"
123 .c --------- requests ---------
125 .c synopsis of a request
131 . ie (\n[.$] = 0) \{\
133 . Text \f[CB]\*[@1]\f[]
137 . Text \f[CB]\*[@1]\~\f[]\f[I]\$*\f[]
141 .c reference of a request
146 .c --------- numerical elements ---------
148 .c number with a trailing unit
150 . Text \$1\^\f[CB]\$2\f[]\$3\f[R]
154 .c representation of units within the text
156 . Text \f[CB]\$1\f[]\$2\f[R]
160 .c representation of mathematical operators within the text
166 .c --------- escape sequences ---------
168 .c ---------------------------------------------------------------------
171 .c Synopsis of an escape sequence, optionally with argument
172 .c Args : 1 or 2; `name' obligatory, `arg' optional
173 .c name : suitable name for an escape sequence (c, (xy, [long])
174 .c arg : arbitrary word
175 .c Result : prints \namearg, where `name' is in CB, `arg' in I
179 . ab .ESC needs 1 or 2 arguments.
180 . ExecFF IP CB I "\[rs]\$1" "\,\$2\/"
182 .c ---------------------------------------------------------------------
185 .c Synopsis for escape sequence with a bracketed long argument
186 .c Args : 2 obligatory
187 .c name : suitable name for an escape sequence (c, (xy, [long])
188 .c arg : arbitrary text
189 .c Result : prints \name[arg], where `name' is in CB, `arg' in I
193 . ab .ESC[] needs exactly 2 arguments.
194 . ExecFF IP CB I "\[rs]\$1\[lB]" "\h'-0.2m'\$2\h'-0.15m'" \[rB]
196 .c ---------------------------------------------------------------------
199 .c Synopsis for escape sequence with a bracketed long argument
200 .c Args : 2 obligatory
201 .c name : suitable name for an escape sequence (c, (xy, [long])
202 .c arg : arbitrary text
203 .c Result : prints \name'arg', where `name' is in CB, `arg' in I
207 . ab .ESCq needs exactly 2 argument.
208 . ExecFF IP CB I "\[rs]\$1\[cq]" "\h'-0.3m'\$2" \[cq]
210 .c ---------------------------------------------------------------------
213 .c Synopsis for escape sequence with a bracketed long argument
214 .c Args : 1 obligatory
215 .c arg : arbitrary text
216 .c Result : prints `\?arg?', where the `?' are in CB, `arg' in I
220 . ab .ESC? needs exactly 1 arguments.
221 . ExecFF IP CB I \[rs]? "\$1" ?
223 .c ---------------------------------------------------------------------
226 .c Reference of an escape sequence (no args), possibly punctuation
227 .c Args : 1 obligatory
228 .c name : suitable name for an escape sequence (c, (xy, [long])
230 .c Result : prints \name, where `name' is in B, `punct' in R
234 . ab .esc needs 1 or 2 arguments.
237 .c ---------------------------------------------------------------------
238 .c .escarg name arg [punct]
240 .c Reference of an escape sequence (no args)
241 .c Args : 1 obligatory, 1 optional
242 .c name : suitable name for an escape sequence (c, (xy, [long])
243 .c arg : arbitrary word
244 .c Result : prints \namearg, where
245 .c `name' is in B, `arg' in I
249 . ab .esc needs 2 or 3 arguments.
250 . Text \f[B]\[rs]\$1\f[]\f[I]\$2\f[]\$3
252 .c ---------------------------------------------------------------------
253 .c .esc[] name arg [punct]
255 .c Reference for escape sequence with a bracketed long argument
256 .c Args : 2 obligatory
257 .c name : suitable name for an escape sequence (c, (xy, [long])
258 .c arg : arbitrary text
259 .c Result : prints \name[arg], where `name' is in CB, `arg' in CI
263 . ab .esc[] needs 2 or 3 arguments.
264 . Text \f[B]\[rs]\$1\[lB]\f[]\f[I]\$2\f[]\f[B]\[rB]\f[]\$3
267 .c ---------------------------------------------------------------------
270 .c Reference for escape sequence with a bracketed long argument
271 .c Args : 2 obligatory
272 .c name : suitable name for an escape sequence (c, (xy, [long])
273 .c arg : arbitrary text
274 .c Result : prints \name'arg', where `name' is in CB, `arg' in CI
278 . ab .escq needs 2 arguments.
279 . Text \f[B]\[rs]\$1\[cq]\f[]\f[I]\$2\f[]\f[B]\[cq]\f[]\$3
282 .c --------- strings ---------
284 .c synopsis for string, with \*[]
289 . ExecFF Text R CB \[rs]*[ \*[@1]\f[]\f[R]] \$*
292 .c synopsis for a long string
296 . Text \f[CB]\[rs]*\[lB]\$1\[rB]\f[]\$2
300 .c --------- registers ---------
302 .c synopsis for registers, with \n[]
307 . ExecFF Text R CB \[rs]n[ \*[@1]\f[]\f[R]] \$*
310 .c reference of a register, without decoration
317 .\" end of macro definitions
320 .\" --------------------------------------------------------------------
322 .\" --------------------------------------------------------------------
324 .TH GROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
326 groff \- a short reference for the GNU roff language
329 .\" --------------------------------------------------------------------
331 .\" --------------------------------------------------------------------
337 and is the free implementation of the roff type-setting system.
341 for a survey and the background of the groff system.
344 This document gives only short descriptions of the predefined roff
345 language elements as used in groff.
347 Both the classical features and the groff extensions are provided.
355 is compatible with the classical system and provides proper
363 could be used as synonyms.
367 slightly tends to refer more to the classical aspects, whereas
369 emphasizes the GNU extensions, and
371 is the general term for the language.
374 This file is only a short version of the complete documentation that
378 file, which contains more detailed, actual, and concise information.
381 The general syntax for writing groff documents is relatively easy, but
382 writing extensions to the roff language can be a bit harder.
385 The roff language is line-oriented.
387 There are only two kinds of lines, control lines and text lines.
389 The control lines start with a control character, by default a period
393 all other lines are text lines.
397 represent commands, optionally with arguments.
399 They have the following syntax.
401 The leading control character can be followed by a command name;
402 arguments, if any, are separated by blanks from the command name and
403 among themselves, for example,
407 .Text .command_name arg1 arg2
411 For indentation, any number of space or tab characters can be inserted
412 between the leading control character and the command name, but the
413 control character must be on the first position of the line.
417 represent the parts that will be printed.
418 They can be modified by escape sequences, which are recognized by a
420 .squoted_char \[rs] .
421 These are in-line or even in-word formatting elements or functions.
423 Some of these take arguments separated by single quotes
425 others are regulated by a length encoding introduced by an open
428 or enclosed in brackets
434 The roff language provides flexible instruments for writing language
435 extension, such as macros.
437 When interpreting macro definitions, the roff system enters a special
438 operating mode, called the
442 The copy mode behavior can be quite tricky, but there are some rules
443 that ensure a safe usage.
446 Printable backslashes must be denoted as
450 represents the current escape character.
452 To get a backslash glyph, use
457 Double all backslashes.
459 Begin all text lines with the special non-spacing character
463 This does not produce the most efficient code, but it should work as a
466 For better strategies, see the groff info file and
467 .BR groff_tmac (@MAN5EXT@).
470 Reading roff source files is easier, just reduce all double backslashes
471 to a single one in all macro definitions.
474 .\" --------------------------------------------------------------------
476 .\" --------------------------------------------------------------------
478 The roff language elements add formatting information to a text file.
480 The fundamental elements are predefined commands and variables that
481 make roff a full-blown programming language.
484 There are two kinds of roff commands, possibly with arguments.
486 are written on a line of their own starting with a dot
492 are in-line functions and in-word formatting elements starting with a
494 .squoted_char \[rs] .
497 The user can define her own formatting commands using the
501 These commands are called
503 but they are used exactly like requests.
505 Macro packages are pre-defined sets of macros written in the groff
508 A user's possibilities to create escape sequences herself is very
509 limited, only special characters can be mapped.
512 The groff language provides several kinds of variables with
513 different interfaces.
515 There are pre-defined variables, but the user can define her own
520 variables store character sequences.
522 They are set with the
524 request and retrieved by the
528 Strings can have variables.
532 variables can store numerical values, numbers with a scale unit, and
533 occasionally string-like objects.
535 They are set with the
537 request and retrieved by the
543 allow the user to temporarily store global formatting parameters like
544 line length, font size, etc.\& for later reuse.
552 are identified either by a name or by an internal number.
554 The current font is chosen by the
560 Each device has special fonts, but the following fonts are available
563 is the standard font Roman.
573 and is available everywhere, but on text devices it is displayed as an
574 underlined Roman font.
576 For the graphical output devices, there exist constant-width pendants
582 On text devices, all characters have a constant width anyway.
585 Moreover, there are some advanced roff elements.
589 stores information into a macro for later usage.
593 is a positional condition like a certain number of lines from page top
594 or in a diversion or in the input.
596 Some action can be prescribed to be run automatically when the
600 More detailed information and examples can be found in the groff info
604 .\" --------------------------------------------------------------------
605 .SH "CONTROL CHARACTERS"
606 .\" --------------------------------------------------------------------
608 There is a small set of characters that have a special controlling
609 task in certain conditions.
613 A dot is only special at the beginning of a line or after the
614 condition in the requests
620 There it is the control character that introduces a request (or macro).
622 The special behavior can be delayed by using the
628 request, the control character can be set to a different character,
631 a non-special character.
633 In all other positions, it just means a dot character.
635 In text paragraphs, it is advantageous to start each sentence at a
640 The single quote has two controlling tasks.
642 At the beginning of a line and in the conditional requests it is the
643 non-breaking control character.
645 That means that it introduces a request like the dot, but with the
646 additional property that this request doesn't cause a linebreak.
650 request, the non-break control character can be set to a different
654 As a second task, it is the most commonly used argument separator in
655 some functional escape sequences (but any pair of characters not part
656 of the argument will work).
658 In all other positions, it denotes the single quote or apostrophe
661 Groff provides a printable representation with the
667 The double quote is used to enclose arguments in requests, macros, and
674 requests, a leading double quote in the argument will be stripped off,
675 making everything else afterwards the string to be defined (enabling
678 The escaped double quote
680 introduces a comment.
682 Otherwise, it is not special.
684 Groff provides a printable representation with the
690 The backslash usually introduces an escape sequence (this can be
695 A printed version of the escape character is the
697 escape; a backslash glyph can be obtained by
701 The open parenthesis is only special in escape sequences when
702 introducing an escape name or argument consisting of exactly two
705 In groff, this behavior can be replaced by the \f[CB][]\f[] construct.
708 The opening bracket is only special in groff escape sequences; there
709 it is used to introduce a long escape name or long escape argument.
711 Otherwise, it is non-special, e.g.\& in macro calls.
714 The closing bracket is only special in groff escape sequences; there
715 it terminates a long escape name or long escape argument.
717 Otherwise, it is non-special.
720 Space characters are only functional characters.
722 They separate the arguments in requests, macros, and strings, and the words
725 They are subject to groff's horizontal spacing calculations.
727 To get a defined space width, escape sequences like
728 .squoted_char "\[rs]\ "
729 (this is the escape character followed by a space),
736 .IP \f[CI]newline\f[]
737 In text paragraphs, newlines mostly behave like space characters.
739 Continuation lines can be specified by an escaped newline, i.e., by
740 specifying a backslash
742 as the last character of a line.
744 If a tab character occurs during text the interpreter makes a
745 horizontal jump to the next pre-defined tab position.
747 There is a sophisticated interface for handling tab positions.
750 .\" --------------------------------------------------------------------
751 .SH "NUMERICAL EXPRESSIONS"
752 .\" --------------------------------------------------------------------
756 is a signed or unsigned integer or float with or without an appended
761 is a one-character abbreviation for a unit of measurement.
763 A number followed by a scaling indicator signifies a size value.
765 By default, numerical values do not have a scaling indicator, i.e., they
771 language defines the following scaling indicators.
788 Pica\ \[eq]\ 1/6\ inch
792 Point\ \[eq]\ 1/72\ inch
796 Em\ \[eq]\ \f[R]the font size in points (width of letter `\f[CR]m\f[R]')
800 100\^th \f[R]of an \f[CR]Em
808 Basic unit for actual output device
812 Vertical line space in basic units
813 scaled point\ \[eq]\ 1/\f[CI]sizescale\f[R] of a point (defined in
814 font \f[I]DESC\f[] file)
823 .B Numerical expressions
824 are combinations of the numerical values defined above with the
825 following arithmetical operators already defined in classical troff.
889 Grouping of expressions
893 Close current grouping
901 added the following operators for numerical expressions:
908 .ExecFF Text I CB e1 >? e2
915 .ExecFF Text I CB e1 <? e2
922 .ExecFF Text CB I ( c ; e )
927 as the default scaling indicator.
933 For details see the groff info file.
936 .\" --------------------------------------------------------------------
938 .\" --------------------------------------------------------------------
941 occur in tests raised by the
948 The following table characterizes the different types of conditions.
956 A numerical expression
958 yields true if its value is greater than\~0.
970 is identical to string\~\c
977 is not identical to string\~\c
982 True if there is a character\~\c
988 True if there is a string, macro, diversion, or request called
993 Current page number is even.
997 Current page number is odd.
1001 True if there is a color called
1011 True if there is a register named
1021 True if there exists a font named
1026 True if a style named
1028 has been registered.
1034 .\" --------------------------------------------------------------------
1036 .\" --------------------------------------------------------------------
1038 This section provides a short reference for the predefined requests.
1040 In groff, request and macro names can be arbitrarily long.
1042 No bracketing or marking of long names is needed.
1045 Most requests take one or more arguments.
1047 The arguments are separated by space characters (no tabs!); there is
1048 no inherent limit for their length or number.
1050 An argument can be enclosed by a pair of double quotes.
1052 This is very handy if an argument contains space characters, e.g.,
1053 .RI \[dq] "arg with space" \[dq]
1054 denotes a single argument.
1057 Some requests have optional arguments with a different behaviour.
1059 Not all of these details are outlined here.
1061 Refer to the groff info file and
1062 .BR groff_diff (@MAN7EXT@)
1066 In the following request specifications, most argument names were
1067 chosen to be descriptive.
1069 Only the following denotations need clarification.
1077 denotes a single character.
1081 a font either specified as a font name or a font number.
1085 all characters up to the end of the line or within
1092 is a numerical expression that evaluates to an integer value.
1096 is an arbitrary numerical expression, signed or unsigned.
1100 has three meanings depending on its sign, described below.
1106 If an expression defined as
1110 sign the resulting value of the expression will be added to an already
1111 existing value inherent to the related request, e.g.\& adding to a number
1114 If the expression starts with a
1116 the value of the expression will be subtracted from the request value.
1121 replaces the existing value directly.
1123 To assign a negative number either prepend\~0 or enclose the negative
1124 number in parentheses.
1127 .\" --------------------------------------------------------------------
1128 .SS "Request Short Reference"
1129 .\" --------------------------------------------------------------------
1134 Empty line, ignored.
1136 Useful for structuring documents.
1138 .REQ .\[rs]\[dq] anything
1139 Complete line is a comment.
1144 on standard error, exit program.
1147 Begin line adjustment for output lines in current adjust mode.
1150 Start line adjustment in mode
1152 (\f[CI]c\f[]\f[CR]\|\^\[eq]\|l,r,b,n\f[]).
1159 (\f[CI]c\f[]\f[CR]\|\^\[eq]\|l,i,I,a,A\f[]).
1161 .REQ .aln alias register
1162 Create alias name for
1165 .REQ .als alias object
1166 Create alias name for request, string, macro, or diversion
1186 but with compatibility mode switched off during macro expansion.
1191 but with compatibility mode switched off during macro expansion.
1194 Append to a macro whose name is contained in the string register
1201 Append to a macro indirectly.
1205 are string registers whose contents are interpolated for the macro name
1206 and the end macro, respectively.
1211 but with compatibility mode switched off during macro expansion.
1213 .REQ .ami1 macro end
1216 but with compatibility mode switched off during macro expansion.
1218 .REQ .as stringvar anything
1224 .REQ .as1 stringvar anything
1227 but with compatibility mode switched off during string expansion.
1229 .REQ .asciify diversion
1230 Unformat ASCII characters, spaces, and some escape sequences in
1234 Print a backtrace of the input on stderr.
1244 Embolden Special Font
1246 when current font is
1250 Unset the blank line macro.
1253 Set the blank line macro to
1257 End current diversion.
1262 omitting a partially filled line.
1265 End current diversion.
1268 Divert and append to
1270 omitting a partially filled line.
1273 Eject current page and begin new page.
1276 Eject current page; next page number
1283 Break and spread output line.
1288 Break out of a while loop.
1291 Reset no-break control character to
1295 Set no-break control character to
1299 Reset control character to
1303 Set control character to
1307 Center the next input line.
1315 Copy contents of file
1317 unprocessed to stdout or to the diversion.
1319 .REQ .cflags mode c1 c2 .\|.\|.\&
1335 .REQ .char c anything
1342 Chop the last character off macro, string, or diversion
1355 is zero disable colors, otherwise enable them.
1357 .REQ .composite from to
1362 while constructing a composite glyph name.
1365 Finish the current iteration of a while loop.
1368 Enable compatibility mode.
1373 is zero disable compatibility mode, otherwise enable it.
1376 Set constant character width mode for
1384 Continuous underline in nroff, like
1389 End current diversion.
1392 Divert and append to
1412 but with compatibility mode switched off during macro expansion.
1417 but with compatibility mode switched off during macro expansion.
1419 .REQ .defcolor color scheme component
1420 Define or redefine a color with name
1431 can be single components specified as fractions in the range 0 to 1
1432 (default scaling indicator\~\c
1433 .scaleindicator f ),
1434 as a string of two-digit hexadecimal color components with a leading
1436 or as a string of four-digit hexadecimal components with two leading
1443 Define or redefine a macro whose name is contained in the string register
1450 Define or redefine a macro indirectly.
1454 are string registers whose contents are interpolated for the macro name
1455 and the end macro, respectively.
1460 but with compatibility mode switched off during macro expansion.
1462 .REQ .dei1 macro end
1465 but with compatibility mode switched off during macro expansion.
1468 End current diversion.
1477 with compatibility mode disabled.
1479 .REQ .ds stringvar anything
1485 .REQ .ds1 stringvar anything
1488 but with compatibility mode switched off during string expansion.
1491 Set diversion trap to position
1493 (default scaling indicator\~\c
1494 .scaleindicator v ).
1497 Reset escape character to
1498 .squoted_char \[rs] .
1501 Set escape character to
1505 Restore escape character saved with
1509 Save current escape character.
1512 Else part for if-else (\c
1519 will be run after the end of input.
1522 Turn off escape character mechanism.
1525 Switch to previous environment.
1528 Push down environment number or name
1533 Copy the contents of environment
1535 to the current environment.
1536 No pushing or popping.
1539 Exit from roff processing.
1542 Return to previous font family.
1545 Set the current font family to
1549 Disable field mechanism.
1552 Set field delimiter to
1554 and pad character to space.
1557 Set field delimiter to
1559 and pad character to
1562 .REQ .fchar c anything
1563 Define fallback character
1569 Set fill color to previous fill color.
1579 Flush output buffer.
1587 .REQ .fp n internal external
1588 Mount font with long
1595 .REQ .fschar f c anything
1596 Define fallback character
1604 Reset list of special fonts for
1608 .REQ .fspecial font s1 s2 .\|.\|.\&
1609 When the current font is
1618 Return to previous font.
1625 Change to font name or number
1631 .REQ .ftr font1 font2
1638 Set glyph color to previous glyph color.
1645 Remove additional hyphenation indicator character.
1648 Set up additional hyphenation indicator character\~\c
1651 .REQ .hcode c1 code1 c2 code2 .\|.\|.\&
1652 Set the hyphenation code of character
1663 Set the current hyphenation language to
1667 Set the maximum number of consecutive hyphenated lines to
1671 Read hyphenation patterns from
1675 Append hyphenation patterns from
1679 Set input mapping for
1685 with exceptional hyphenation.
1688 Switch to hyphenation mode
1692 Set the hyphenation margin to
1694 (default scaling indicator\~\c
1695 .scaleindicator m ).
1698 Set the hyphenation space to
1701 .REQ .ie cond anything
1709 .REQ .if cond anything
1714 otherwise do nothing.
1726 Change to previous indent value.
1729 Change indent according to
1731 (default scaling indicator\~\c
1732 .scaleindicator m ).
1735 Set an input-line count trap for the next
1742 but count lines interrupted with
1747 Enable pairwise kerning.
1752 is zero, disable pairwise kerning, otherwise enable it.
1755 Remove leader repetition character.
1758 Set leader repetition character to\~\c
1761 .REQ .length register anything
1762 Write the length of the string
1768 Enable line-tabs mode (i.e., calculate tab positions relative to output
1774 is zero, disable line-tabs mode, otherwise enable it.
1777 Set input line number to
1781 Set input line number to
1791 Change to previous line length.
1794 Set line length according to
1797 .scalednumber 6.5 i ,
1798 default scaling indicator\~\c
1799 .scaleindicator m ).
1802 Change to the previous value of additional intra-line skip.
1805 Set additional intra-line skip value to
1809 blank lines are inserted after each text output line.
1812 Length of title (default scaling indicator\~\c
1813 .scaleindicator m ).
1816 Margin character off.
1821 after each text line at actual distance from right margin.
1824 Set margin character to
1828 from right margin (default scaling indicator\~\c
1829 .scaleindicator m ).
1832 Mark current vertical position in
1836 The same as the .so request except that
1838 is searched in the tmac directories.
1841 No output-line adjusting.
1844 Need a one-line vertical space.
1849 vertical space (default scaling indicator\~\c
1850 .scaleindicator v ).
1853 No filling or adjusting of output-lines.
1861 .REQ .nm \[+-]N \fR[\fPM \fR[\fPS \fR[\fPI\fR]]]\fP
1862 In line number mode, set number, multiple, spacing, and indent.
1865 Do not number next line.
1876 .REQ .nr register \[+-]N M
1885 Make the built-in condition
1892 Turn no-space mode on.
1895 Immediately jump to end of current file.
1900 .REQ .open stream filename
1903 for writing and associate the stream named
1907 .REQ .opena stream filename
1913 Output vertical distance that was saved by the
1920 directly to intermediate output, allowing leading whitespace if
1924 (which will be stripped off).
1927 Reset page number character to\~\c
1931 Page number character.
1939 Set page length to default
1940 .scalednumber 11 i .
1941 The current page length is stored in
1945 Change page length to
1947 (default scaling indicator\~\c
1948 .scaleindicator v ).
1951 Print macro names and sizes (number of blocks of 128 bytes).
1954 Print only total of sizes of macros (number of 128 bytes blocks).
1961 Print the names and contents of all currently defined number registers
1965 Change to previous page offset.
1967 The current page offset is available in
1975 Return to previous point-size.
1981 Get the bounding box of a PostScript image
1985 This behaves like the
1987 request except that input comes from the standard output of
1991 Print the names and positions of all traps (not including input line
1992 traps and diversion traps) on stderr.
1995 Change to previous post-vertical line spacing.
1998 Change post-vertical line spacing according to
2000 (default scaling indicator\~\c
2001 .scaleindicator p ).
2003 .REQ .rchar c1 c2 .\|.\|.\&
2004 Remove the definitions of characters
2013 Return from a macro.
2015 .REQ .return anything
2016 Return twice, namely from the macro at the current level and from the macro
2019 .REQ .rfschar f c1 c2 .\|.\|.\&
2020 Remove the definitions of characters
2028 Right justify the next
2033 Remove request, macro, or string
2037 Rename request, macro, or string
2053 Restore spacing; turn no-space mode off.
2058 to marked vertical place (default scaling indicator\~\c
2059 .scaleindicator v ).
2061 .REQ .schar c anything
2062 Define global fallback character
2068 Reset soft hyphen character to
2072 Set the soft hyphen character to
2076 In a macro, shift the arguments by
2080 .REQ .sizes s1 s2 .\|.\|.\& sn \fB[0]\fP
2081 Set available font sizes similar to the
2088 Include source file.
2091 Skip one line vertically.
2094 Space vertical distance
2096 up or down according to sign of
2098 (default scaling indicator\~\c
2099 .scaleindicator v ).
2102 Reset global list of special fonts to be empty.
2104 .REQ .special s1 s2 .\|.\|.\&
2108 etc.\& are special and will be searched for characters not in the
2112 Toggle the spread warning on and off without changing its value.
2114 .REQ .spreadwarn limit
2115 Emit a warning if each space in an output line is widened by
2117 or more (default scaling indicator\~\c
2118 .scaleindicator m ).
2121 Space-character size set to
2123 of the spacewidth in the current font.
2126 Space-character size set to
2128 and sentence space size set to
2130 of the spacewidth in the current font (\f[CR]\[eq]1/3 em\f[]).
2138 .REQ .substring xx n1 n2
2139 Replace the string named
2141 with the substring defined by the indices
2152 Save the vertical distance
2154 for later output with
2158 .REQ .sy command-line
2163 Set tabs after every position that is a multiple of
2165 (default scaling indicator\~\c
2166 .scaleindicator m ).
2167 .REQ .ta n1 n2 .\|.\|.\& nn \f[CB]T\f[] r1 r2 .\|.\|.\& rn
2168 Set tabs at positions
2186 .\"Restore internally saved tab positions.
2189 .\"Save tab positions internally.
2192 Remove tab repition character.
2194 Set tab repetition character to\~\c
2198 Temporary indent next line (default scaling indicator\~\c
2199 .scaleindicator m ).
2201 .REQ .tkf font s1 n1 s2 n2
2202 Enable track kerning for
2205 .REQ .tl \f[CB]\[cq]\f[]left\f[CB]\[cq]\f[]center\f[CB]\[cq]\f[]right\f[CB]\[cq]\f[]
2211 on terminal (UNIX standard message output).
2216 on terminal (UNIX standard message output), allowing leading
2221 (which will be stripped off).
2226 without emitting a final newline.
2228 .REQ .tr abcd.\|.\|.\&
2239 Transparently output the contents of file
2242 .REQ .trin abcd.\|.\|.\&
2243 This is the same as the
2245 request except that the
2247 request will use the character code (if any) before the character
2250 .REQ .trnt abcd.\|.\|.\&
2251 This is the same as the
2253 request except that the translations do not apply to text that is
2254 transparently throughput into a diversion with
2258 Make the built-in condition
2265 Underline font set to
2267 (to be switched to by
2271 Underline (italicize in troff)
2275 .REQ .unformat diversion
2276 Unformat space characters and tabs, preserving font information in
2279 Enable vertical position traps if
2281 is non-zero, disable them otherwise.
2284 Change to previous vertical base line spacing.
2287 Set vertical base line spacing according to
2289 (default scaling indicator\~\c
2290 .scaleindicator p ).
2292 .scalednumber 12 p .
2295 Set warnings code to
2299 Set scaling indicator used in warnings to
2303 Remove (first) trap at position
2307 Set location trap; negative means from page bottom.
2309 .REQ .while cond anything
2316 .REQ .write stream anything
2322 .REQ .writec stream anything
2325 without emitting a final newline.
2327 .REQ .writem stream xx
2328 Write contents of macro or string
2336 Besides these standard groff requests, there might be further macro
2338 They can originate from a macro package (see
2339 .BR roff (@MAN7EXT@)
2340 for an overview) or from a preprocessor.
2343 Preprocessor macros are easy to be recognized.
2345 They enclose their code into a pair of characteristic macros.
2349 box, center, tab (@);
2352 preprocessor@start macro@ end macro
2359 soelim@\f[I]none@\f[I]none
2365 .\" --------------------------------------------------------------------
2366 .SH "ESCAPE SEQUENCES"
2367 .\" --------------------------------------------------------------------
2369 Escape sequences are in-line language elements usually introduced by a
2372 and followed by an escape name and sometimes by a required argument.
2374 Input processing is continued directly after the escaped character or
2375 the argument resp.\& without an intervening separation character.
2377 So there must be a way to determine the end of the escape name and the
2378 end of the argument.
2381 This is done by enclosing names (escape name and arguments consisting
2382 of a variable name) by a pair of brackets
2383 .BI \[lB] name \[rB]
2384 and constant arguments (number expressions and characters) by
2385 apostrophes (ASCII 0x27) like
2386 .BI \[cq] constant \[cq] \f[R].
2389 There are abbreviations for short names.
2391 Two character escape names can be specified by an opening parenthesis
2394 without a closing counterpart.
2396 And all one-character names different from the special characters
2400 can even be specified without a marker in the form
2404 Constant arguments of length\~1 can omit the marker apostrophes, too,
2405 but there is no two-character analogue.
2408 While 1-character escape sequences are mainly used for in-line
2409 functions and system related tasks, the 2-letter names following the
2411 construct are used for special characters predefined by the roff system.
2413 Escapes sequences with names of more than two characters
2415 denote user defined named characters (see the
2420 .\" --------------------------------------------------------------------
2421 .SS "Single Character Escapes"
2422 .\" --------------------------------------------------------------------
2426 .\" --------- comments ---------
2429 Beginning of a comment.
2431 Everything up to the end of the line is ignored.
2434 Everything up to and including the next newline is ignored.
2436 This is interpreted in copy mode.
2440 except that the terminating newline is ignored as well.
2442 .\" --------- strings ---------
2445 The string stored in the string variable with 1-character name
2449 The string stored in the string variable with 2-character name
2452 .ESC[] * "stringvar arg1 arg2 .\|.\|."
2453 The string stored in the string variable with arbitrary length name
2461 .\" --------- macro arguments ---------
2464 The name by which the current macro was invoked.
2468 request can make a macro have more than one name.
2471 Macro or string argument with 1-place number
2475 is a digit between 1 and 9.
2478 Macro or string argument with 2-digit number
2482 Macro or string argument with number
2486 is a numerical expression evaluating to an integer \[>=]1.
2489 In a macro or string, the concatenation of all the arguments separated
2493 In a macro or string, the concatenation of all the arguments with each
2494 surrounded by double quotes, and separated by spaces.
2496 .\" --------- escaped characters ---------
2499 reduces to a single backslash; useful to delay its interpretation as
2500 escape character in copy mode.
2502 For a printable backslash, use
2506 to be independent from the current escape character.
2509 The acute accent \[aa]; same as
2511 Unescaped: apostrophe, right quotation mark, single quote (ASCII 0x27).
2514 The grave accent \[ga]; same as
2516 Unescaped: left quote, backquote (ASCII 0x60).
2519 The \- sign in the current font.
2522 An uninterpreted dot (period), even at start of line.
2525 Default optional hyphenation character.
2528 Transparent line indicator.
2531 In a diversion, this will transparently embed
2535 is read in copy mode.
2537 See also the escape sequences
2543 .\" --------- spacing ---------
2546 Unpaddable space-size space character (no line break).
2552 1/6\ em narrow space character; zero width in nroff.
2555 1/12\ em half-narrow space character; zero width in nroff.
2558 Non-printable, zero width character.
2563 except that it behaves like a character declared with the cflags
2564 request to be transparent for the purposes of end of sentence
2568 Increases the width of the preceding character so that the spacing
2569 between that character and the following character will be correct if
2570 the following character is a roman character.
2573 Modifies the spacing of the following character so that the spacing
2574 between that character and the preceding character will correct if the
2575 preceding character is a roman character.
2578 Unbreakable space that stretches like a normal inter-word space when a
2582 Inserts a zero-width break point (similar to
2584 but without a soft hyphen character).
2587 Ignored newline, for continuation lines.
2589 .\" --------- structuring ---------
2592 Begin conditional input.
2595 End conditional input.
2597 .\" --------- longer escape names ---------
2600 The special character with 2-character name
2603 .BR "Special Characters" .
2606 The named character (or rather glyph) with arbitrary length name
2609 .ESC[] "" "comp1 comp2 .\|.\|."
2610 A composite glyph with components
2615 .\" --------- alphabetical escapes ---------
2618 Non-interpreted leader character.
2623 is acceptable as a name of a string, macro, diversion, register,
2624 environment or font it expands to\~1, and to\~0 otherwise.
2626 .ESCq b abc.\|.\|.\&
2627 Bracket building function.
2632 is acceptable as a valid numeric expression it expands to\~1, and
2636 Interrupt text processing.
2639 The character called
2643 but compatible to other roff versions.
2646 Forward (down) 1/2 em vertical unit (1/2 line in nroff).
2649 Draw a graphical element defined by the characters in
2651 see groff info file for details.
2654 Printable version of the current escape character.
2657 Equivalent to an escape character, but is not interpreted in copy-mode.
2660 Change to font with 1-character name or 1-digit number
2664 Switch back to previous font.
2667 Change to font with 2-character name or 2-digit number
2671 Change to font with arbitrary length name or number expression
2675 Switch back to previous font.
2678 Change to font family with 1-character name
2682 Change to font family with 2-character name
2686 Change to font family with arbitrary length name
2690 Switch back to previous font family.
2693 Return format of register with name
2704 Local horizontal motion; move right
2709 Set height of current font to
2713 Mark horizontal input place in register with arbitrary length name
2721 Horizontal line drawing function (optionally using character
2725 Vertical line drawing function (optionally using character
2738 Switch back to previous color.
2741 Change filling color for closed drawn objects to color
2750 Switch to previous fill color.
2753 The numerical value stored in the register variable with the
2758 The numerical value stored in the register variable with the
2763 The numerical value stored in the register variable with arbitrary
2768 Typeset the character with code
2770 in the current font, no special fonts are searched.
2772 Useful for adding characters to a font using the
2776 .ESCq o abc.\|.\|.\&
2777 Overstrike characters
2784 Disable glyph output.
2786 Mainly for internal use.
2789 Enable glyph output.
2791 Mainly for internal use.
2794 Break and spread output line.
2797 Reverse 1\ em vertical motion (reverse line in nroff).
2799 .ESCq R "name\~\[+-]n"
2806 Set the point size to
2810 Note the alternative forms
2811 .BI \[rs]s \[+-] [ N ]\c
2813 .BI \[rs]s' \[+-]N '\c
2815 .BI \[rs]s \[+-] ' N '\c
2817 .escarg s( \[+-]xy\c
2819 .BI \[rs]s \[+-] ( xy\c
2832 Non-interpreted horizontal tab.
2835 Reverse (up) 1/2 em vertical motion (1/2 line in nroff).
2838 Local vertical motion; move down
2843 The contents of the environment variable
2852 The width of the character sequence
2856 Extra line-space function (negative before, positive after).
2861 as device control function.
2864 Output string variable or macro
2866 uninterpreted as device control function.
2876 with zero width (without spacing).
2881 and then restore the horizontal and vertical position;
2883 may not contain tabs or leaders.
2887 The escape sequences
2899 are interpreted in copy mode.
2902 Escape sequences starting with
2906 do not represent single character escape sequences, but introduce escape
2907 names with two or more characters.
2910 If a backslash is followed by a character that does not constitute a
2911 defined escape sequence the backslash is silently ignored and the
2912 character maps to itself.
2915 .\" --------------------------------------------------------------------
2916 .SS "Special Characters"
2917 .\" --------------------------------------------------------------------
2919 Common special characters are predefined by escape sequences of the
2927 Some of these exist in the usual font while most of them are only
2928 available in the special font.
2930 Below you'll find a selection of the most important glyphs; a complete
2931 list can be found in
2932 .BR groff_char (@MAN7EXT@).
2950 Printable double quote
2958 Printable backslash character
2981 .\" --------------------------------------------------------------------
2983 .\" --------------------------------------------------------------------
2985 Strings are defined by the
2987 request and can be retrieved by the
2992 Strings share their name space with macros.
2994 So strings and macros without arguments are roughly equivalent; it is
2995 possible to call a string like a macro and vice-versa, but this often
2996 leads to unpredictable results.
2998 The following strings are predefined in groff.
3001 The name of the current output device as specified by the
3003 command line option.
3006 .\" --------------------------------------------------------------------
3008 .\" --------------------------------------------------------------------
3010 Registers are variables that store a value.
3011 In groff, most registers store numerical values (see section
3012 .B NUMERICAL EXPRESSIONS
3013 above), but some can also hold a string value.
3016 Each register is given a name.
3017 Arbitrary registers can be defined and set with the request
3022 The value stored in a register can be retrieved by the escape sequences
3027 Most useful are predefined registers.
3029 In the following the notation
3031 is used to refer to a register called
3033 to make clear that we speak about registers.
3035 Please keep in mind that the
3037 decoration is not part of the register name.
3040 .\" --------------------------------------------------------------------
3041 .SS "Read-only Registers"
3042 .\" --------------------------------------------------------------------
3044 The following registers have predefined values that should not be
3045 modified by the user (usually, registers starting with a dot a
3048 Mostly, they provide information on the current settings or store
3049 results from request calls.
3055 Number of arguments in the current macro or string.
3058 Post-line extra line-space most recently utilized using
3066 is used; always\~1 in
3070 Current input line number.
3073 1\~if compatibility mode is in effect, 0\~otherwise.
3076 The depth of the last character added to the current environment.
3077 It is positive if the character extends below the baseline.
3080 The number of lines remaining to be centered, as set by the
3085 The height of the last character added to the current environment.
3086 It is positive if the character extends above the baseline.
3089 1\~if colors are enabled, 0\~otherwise.
3092 The skew of the last character added to the current environment.
3093 The skew of a character is how far to the right of the center of a character
3094 the center of an accent over that character should be placed.
3097 Current vertical place in current diversion; equal to
3101 The name or number of the current environment (string-valued).
3104 Current font number.
3107 The current font family (string-valued).
3110 The current (internal) real font name (string-valued).
3113 The number of the next free font position.
3116 Always 1 in GNU troff.
3118 Macros should use it to test if running under groff.
3121 Text base-line high-water mark on current page or diversion.
3124 Available horizontal resolution in basic units.
3127 The current font height as set with
3131 The current hyphenation language as set by the
3136 The number of immediately preceding consecutive hyphenated lines.
3139 The maximum allowed number of consecutive hyphenated lines, as set by
3145 The current hyphenation flags (as set by the
3150 The current hyphenation margin (as set by the
3155 The current hyphenation space (as set by the
3163 The indent that applies to the current output line.
3166 Positive if last output line contains
3170 1\~if pairwise kerning is enabled, 0\~otherwise.
3173 Current line length.
3176 The current ligature mode (as set by the
3181 The current line-tabs mode (as set by the
3186 The line length that applies to the current output line.
3189 The title length (as set by the
3194 The current drawing color (string-valued).
3197 The current background color (string-valued).
3200 Length of text portion on previous output line.
3203 The amount of space that was needed in the last
3205 request that caused a trap to be sprung.
3207 Useful in conjunction with
3211 1\~if in no-space mode, 0\~otherwise.
3214 Current page offset.
3217 Current page length.
3220 1\~during page ejection, 0\~otherwise.
3223 The number of the next page: either the value set by a
3225 request, or the number of the current page plus\ 1.
3228 The current pointsize in scaled points.
3231 The last-requested pointsize in scaled points.
3234 The current post-vertical line spacing.
3237 The number of lines to be right-justified as set by the rj request.
3240 Current point size as a decimal fraction.
3243 The slant of the current font as set with
3247 The last requested pointsize in points as a decimal fraction
3251 The value of the parameters set by the first argument of the
3256 The value of the parameters set by the second argument of the
3261 The current font style (string-valued).
3264 Distance to the next trap.
3273 A string representation of the current tab settings suitable for use
3274 as an argument to the
3279 The amount of vertical space truncated by the most recently sprung
3280 vertical position trap, or, if the trap was sprung by a
3282 request, minus the amount of vertical motion produced by
3285 In other words, at the point a trap is sprung, it represents
3286 the difference of what the vertical position would have been but for
3287 the trap, and what the vertical position actually is.
3289 Useful in conjunction with the
3293 Equal to 1 in fill mode and 0 in nofill mode.
3296 Equal to 1 in safer mode and 0 in unsafe mode.
3299 Current vertical line spacing.
3302 Available vertical resolution in basic units.
3305 1\~ if vertical position traps are enabled, 0\~otherwise.
3308 Width of previous character.
3311 The sum of the number codes of the currently enabled warnings.
3314 The major version number.
3317 The minor version number.
3320 The revision number of groff.
3323 Name of current diversion.
3327 .\" --------------------------------------------------------------------
3328 .SS "Writable Registers"
3329 .\" --------------------------------------------------------------------
3331 The following registers can be read and written by the user.
3332 They have predefined default values, but these can be modified for
3333 customizing a document.
3338 Current page number.
3341 Current input line number.
3344 Character type (set by width function
3348 Maximal width of last completed diversion.
3351 Height of last completed diversion.
3354 Current day of week (1-7).
3357 Current day of month (1-31).
3360 The number of hours past midnight.
3362 Initialized at start-up.
3365 Current horizontal position at input line.
3368 Lower left x-coordinate (in PostScript units) of a given PostScript
3373 Lower left y-coordinate (in PostScript units) of a given PostScript
3381 The number of minutes after the hour.
3383 Initialized at start-up.
3386 Current month (1-12).
3389 Vertical position of last printed text base-line.
3394 but takes account of the heights and depths of characters.
3399 but takes account of the heights and depths of characters.
3402 Depth of string below base line (generated by width function
3406 The number of seconds after the minute.
3408 Initialized at start-up.
3411 Right skip width from the center of the last character in the
3416 If greater than 0, the maximum number of objects on the input stack.
3418 If \[<=]0 there is no limit, i.e., recursion can continue until virtual
3419 memory is exhausted.
3422 The amount of horizontal space (possibly negative) that should be
3423 added to the last character before a subscript (generated by width
3428 Height of string above base line (generated by width function
3432 The return value of the
3434 function executed by the last
3439 Upper right x-coordinate (in PostScript units) of a given PostScript
3444 Upper right y-coordinate (in PostScript units) of a given PostScript
3449 The current year (year 2000 compliant).
3452 Current year minus 1900.
3454 For Y2K compliance use
3461 .\" --------------------------------------------------------------------
3463 .\" --------------------------------------------------------------------
3465 The differences of the groff language in comparison to classical troff
3469 .BR groff_diff (@MAN7EXT@).
3472 The groff system provides a compatibility mode, see
3473 .BR groff (@MAN1EXT@)
3474 on how to invoke this.
3477 .\" --------------------------------------------------------------------
3479 .\" --------------------------------------------------------------------
3482 .MTO bug-groff@gnu.org "groff bug mailing list" .
3483 Include a complete, self-contained example that will allow the bug to
3484 be reproduced, and say which version of groff you are using.
3487 .\" --------------------------------------------------------------------
3489 .\" --------------------------------------------------------------------
3491 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
3492 Free Software Foundation, Inc.
3495 This document is distributed under the terms of the FDL (GNU Free
3496 Documentation License) version 1.1 or later.
3498 You should have received a copy of the FDL on your system, it is also
3499 available on-line at the
3500 .URL http://\:www.gnu.org/\:copyleft/\:fdl.html "GNU copyleft site" .
3503 This document is part of
3505 the GNU roff distribution.
3508 .MTO bwarken@mayn.de "Bernd Warken" ;
3510 .MTO wl@gnu.org "Werner Lemberg" .
3513 .\" --------------------------------------------------------------------
3515 .\" --------------------------------------------------------------------
3518 The main source of information for the groff language is the
3523 Besides the gory details, it contains many examples.
3526 .BR groff (@MAN1EXT@)
3527 the usage of the groff program and pointers to the documentation and
3528 availability of the groff system.
3531 .BR groff_diff (@MAN7EXT@)
3532 the differences of the groff language as compared to classical roff.
3534 This is the authoritative document for the predefined language
3535 elements that are specific to groff.
3538 .BR groff_char (@MAN7EXT@)
3539 the predefined groff characters (glyphs).
3542 .BR groff_font (@MAN5EXT@)
3543 the specification of fonts and the DESC file.
3546 .BR roff (@MAN7EXT@)
3547 the history of roff, the common parts shared by all roff systems, and
3548 pointers to further documentation.
3552 .URL http://\:cm.bell-labs.com/\:cm/\:cs/\:54.ps \
3553 "Nroff/\:Troff User's Manual by Osanna & Kernighan"
3554 \[em] the bible for classical troff.
3558 .\" --------------------------------------------------------------------
3560 .\" --------------------------------------------------------------------
3562 .\" Local Variables: