5 Last update: 26 Oct 2006
7 This file is part of groff, the GNU roff type-setting system.
9 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
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 is 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 do 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 is 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 is 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 is 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.
1467 .REQ .device anything
1470 to the intermediate output as a device control function.
1473 Write contents of macro or string
1475 uninterpreted to the intermediate output as a device control function.
1478 End current diversion.
1487 with compatibility mode disabled.
1489 .REQ .ds stringvar anything
1495 .REQ .ds1 stringvar anything
1498 but with compatibility mode switched off during string expansion.
1501 Set diversion trap to position
1503 (default scaling indicator\~\c
1504 .scaleindicator v ).
1507 Reset escape character to
1508 .squoted_char \[rs] .
1511 Set escape character to
1515 Restore escape character saved with
1519 Save current escape character.
1522 Else part for if-else (\c
1529 is run after the end of input.
1532 Turn off escape character mechanism.
1535 Switch to previous environment.
1538 Push down environment number or name
1543 Copy the contents of environment
1545 to the current environment.
1546 No pushing or popping.
1549 Exit from roff processing.
1552 Return to previous font family.
1555 Set the current font family to
1559 Disable field mechanism.
1562 Set field delimiter to
1564 and pad character to space.
1567 Set field delimiter to
1569 and pad character to
1572 .REQ .fchar c anything
1573 Define fallback character
1579 Set fill color to previous fill color.
1589 Flush output buffer.
1597 .REQ .fp n internal external
1598 Mount font with long
1605 .REQ .fschar f c anything
1606 Define fallback character
1614 Reset list of special fonts for
1618 .REQ .fspecial font s1 s2 .\|.\|.\&
1619 When the current font is
1628 Return to previous font.
1635 Change to font name or number
1641 .REQ .ftr font1 font2
1651 .REQ .fzoom font zoom
1654 (in multiples of 1/1000th).
1657 Set glyph color to previous glyph color.
1664 Remove additional hyphenation indicator character.
1667 Set up additional hyphenation indicator character\~\c
1670 .REQ .hcode c1 code1 c2 code2 .\|.\|.\&
1671 Set the hyphenation code of character
1682 Set the current hyphenation language to
1686 Set the maximum number of consecutive hyphenated lines to
1690 Read hyphenation patterns from
1694 Append hyphenation patterns from
1697 .REQ .hpfcode a b c d .\|.\|.\&
1698 Set input mapping for
1704 with exceptional hyphenation.
1707 Switch to hyphenation mode
1711 Set the hyphenation margin to
1713 (default scaling indicator\~\c
1714 .scaleindicator m ).
1717 Set the hyphenation space to
1720 .REQ .ie cond anything
1728 .REQ .if cond anything
1733 otherwise do nothing.
1745 Change to previous indent value.
1748 Change indent according to
1750 (default scaling indicator\~\c
1751 .scaleindicator m ).
1754 Set an input-line count trap for the next
1761 but count lines interrupted with
1766 Enable pairwise kerning.
1771 is zero, disable pairwise kerning, otherwise enable it.
1774 Remove leader repetition character.
1777 Set leader repetition character to\~\c
1780 .REQ .length register anything
1781 Write the length of the string
1787 Enable line-tabs mode (i.e., calculate tab positions relative to output
1793 is zero, disable line-tabs mode, otherwise enable it.
1796 Set input line number to
1800 Set input line number to
1810 Change to previous line length.
1813 Set line length according to
1816 .scalednumber 6.5 i ,
1817 default scaling indicator\~\c
1818 .scaleindicator m ).
1821 Change to the previous value of additional intra-line skip.
1824 Set additional intra-line skip value to
1828 blank lines are inserted after each text output line.
1831 Length of title (default scaling indicator\~\c
1832 .scaleindicator m ).
1835 Margin character off.
1840 after each text line at actual distance from right margin.
1843 Set margin character to
1847 from right margin (default scaling indicator\~\c
1848 .scaleindicator m ).
1851 Mark current vertical position in
1855 The same as the .so request except that
1857 is searched in the tmac directories.
1860 No output-line adjusting.
1863 Need a one-line vertical space.
1868 vertical space (default scaling indicator\~\c
1869 .scaleindicator v ).
1872 No filling or adjusting of output-lines.
1880 .REQ .nm \[+-]N \fR[\fPM \fR[\fPS \fR[\fPI\fR]]]\fP
1881 In line number mode, set number, multiple, spacing, and indent.
1884 Do not number next line.
1895 .REQ .nr register \[+-]N M
1904 Make the built-in condition
1911 Turn no-space mode on.
1914 Immediately jump to end of current file.
1919 .REQ .open stream filename
1922 for writing and associate the stream named
1926 .REQ .opena stream filename
1932 Output vertical distance that was saved by the
1939 directly to intermediate output, allowing leading whitespace if
1943 (which is stripped off).
1946 Reset page number character to\~\c
1950 Page number character.
1953 Print the current environment and each defined environment
1962 Set page length to default
1963 .scalednumber 11 i .
1964 The current page length is stored in
1968 Change page length to
1970 (default scaling indicator\~\c
1971 .scaleindicator v ).
1974 Print macro names and sizes (number of blocks of 128 bytes).
1977 Print only total of sizes of macros (number of 128 bytes blocks).
1984 Print the names and contents of all currently defined number registers
1988 Change to previous page offset.
1990 The current page offset is available in
1998 Return to previous point-size.
2004 Get the bounding box of a PostScript image
2008 This behaves like the
2010 request except that input comes from the standard output of
2014 Print the names and positions of all traps (not including input line
2015 traps and diversion traps) on stderr.
2018 Change to previous post-vertical line spacing.
2021 Change post-vertical line spacing according to
2023 (default scaling indicator\~\c
2024 .scaleindicator p ).
2026 .REQ .rchar c1 c2 .\|.\|.\&
2027 Remove the definitions of characters
2036 Return from a macro.
2038 .REQ .return anything
2039 Return twice, namely from the macro at the current level and from the macro
2042 .REQ .rfschar f c1 c2 .\|.\|.\&
2043 Remove the definitions of characters
2051 Right justify the next
2056 Remove request, macro, or string
2060 Rename request, macro, or string
2076 Restore spacing; turn no-space mode off.
2081 to marked vertical place (default scaling indicator\~\c
2082 .scaleindicator v ).
2084 .REQ .schar c anything
2085 Define global fallback character
2091 Reset soft hyphen character to
2095 Set the soft hyphen character to
2099 In a macro, shift the arguments by
2103 .REQ .sizes s1 s2 .\|.\|.\& sn \fB[0]\fP
2104 Set available font sizes similar to the
2111 Include source file.
2114 Skip one line vertically.
2117 Space vertical distance
2119 up or down according to sign of
2121 (default scaling indicator\~\c
2122 .scaleindicator v ).
2125 Reset global list of special fonts to be empty.
2127 .REQ .special s1 s2 .\|.\|.\&
2131 etc.\& are special and are searched for characters not in the
2135 Toggle the spread warning on and off without changing its value.
2137 .REQ .spreadwarn limit
2138 Emit a warning if each space in an output line is widened by
2140 or more (default scaling indicator\~\c
2141 .scaleindicator m ).
2144 Space-character size set to
2146 of the spacewidth in the current font.
2149 Space-character size set to
2151 and sentence space size set to
2153 of the spacewidth in the current font (\f[CR]\[eq]1/3 em\f[]).
2161 .REQ .substring xx n1 n2
2162 Replace the string named
2164 with the substring defined by the indices
2175 Save the vertical distance
2177 for later output with
2181 .REQ .sy command-line
2186 Set tabs after every position that is a multiple of
2188 (default scaling indicator\~\c
2189 .scaleindicator m ).
2190 .REQ .ta n1 n2 .\|.\|.\& nn \f[CB]T\f[] r1 r2 .\|.\|.\& rn
2191 Set tabs at positions
2209 .\"Restore internally saved tab positions.
2212 .\"Save tab positions internally.
2215 Remove tab repetition character.
2217 Set tab repetition character to\~\c
2221 Temporary indent next line (default scaling indicator\~\c
2222 .scaleindicator m ).
2224 .REQ .tkf font s1 n1 s2 n2
2225 Enable track kerning for
2228 .REQ .tl \f[CB]\[cq]\f[]left\f[CB]\[cq]\f[]center\f[CB]\[cq]\f[]right\f[CB]\[cq]\f[]
2234 on terminal (UNIX standard message output).
2239 on terminal (UNIX standard message output), allowing leading
2244 (which is stripped off).
2249 without emitting a final newline.
2251 .REQ .tr abcd.\|.\|.\&
2262 Transparently output the contents of file
2265 .REQ .trin abcd.\|.\|.\&
2266 This is the same as the
2268 request except that the
2270 request uses the character code (if any) before the character
2273 .REQ .trnt abcd.\|.\|.\&
2274 This is the same as the
2276 request except that the translations do not apply to text that is
2277 transparently throughput into a diversion with
2281 Make the built-in condition
2288 Underline font set to
2290 (to be switched to by
2294 Underline (italicize in troff)
2298 .REQ .unformat diversion
2299 Unformat space characters and tabs, preserving font information in
2302 Enable vertical position traps if
2304 is non-zero, disable them otherwise.
2307 Change to previous vertical base line spacing.
2310 Set vertical base line spacing according to
2312 (default scaling indicator\~\c
2313 .scaleindicator p ).
2315 .scalednumber 12 p .
2318 Set warnings code to
2322 Set scaling indicator used in warnings to
2326 Remove (first) trap at position
2330 Set location trap; negative means from page bottom.
2332 .REQ .while cond anything
2339 .REQ .write stream anything
2345 .REQ .writec stream anything
2348 without emitting a final newline.
2350 .REQ .writem stream xx
2351 Write contents of macro or string
2359 Besides these standard groff requests, there might be further macro
2361 They can originate from a macro package (see
2362 .BR roff (@MAN7EXT@)
2363 for an overview) or from a preprocessor.
2366 Preprocessor macros are easy to be recognized.
2368 They enclose their code into a pair of characteristic macros.
2372 box, center, tab (@);
2375 preprocessor@start macro@ end macro
2382 soelim@\f[I]none@\f[I]none
2388 .\" --------------------------------------------------------------------
2389 .SH "ESCAPE SEQUENCES"
2390 .\" --------------------------------------------------------------------
2392 Escape sequences are in-line language elements usually introduced by a
2395 and followed by an escape name and sometimes by a required argument.
2397 Input processing is continued directly after the escaped character or
2398 the argument resp.\& without an intervening separation character.
2400 So there must be a way to determine the end of the escape name and the
2401 end of the argument.
2404 This is done by enclosing names (escape name and arguments consisting
2405 of a variable name) by a pair of brackets
2406 .BI \[lB] name \[rB]
2407 and constant arguments (number expressions and characters) by
2408 apostrophes (ASCII 0x27) like
2409 .BI \[cq] constant \[cq] \f[R].
2412 There are abbreviations for short names.
2414 Two character escape names can be specified by an opening parenthesis
2417 without a closing counterpart.
2419 And all one-character names different from the special characters
2423 can even be specified without a marker in the form
2427 Constant arguments of length\~1 can omit the marker apostrophes, too,
2428 but there is no two-character analogue.
2431 While 1-character escape sequences are mainly used for in-line
2432 functions and system related tasks, the 2-letter names following the
2434 construct are used for special characters predefined by the roff system.
2436 Escapes sequences with names of more than two characters
2438 denote user defined named characters (see the
2443 .\" --------------------------------------------------------------------
2444 .SS "Single Character Escapes"
2445 .\" --------------------------------------------------------------------
2449 .\" --------- comments ---------
2452 Beginning of a comment.
2454 Everything up to the end of the line is ignored.
2457 Everything up to and including the next newline is ignored.
2459 This is interpreted in copy mode.
2463 except that the terminating newline is ignored as well.
2465 .\" --------- strings ---------
2468 The string stored in the string variable with 1-character name
2472 The string stored in the string variable with 2-character name
2475 .ESC[] * "stringvar arg1 arg2 .\|.\|."
2476 The string stored in the string variable with arbitrary length name
2484 .\" --------- macro arguments ---------
2487 The name by which the current macro was invoked.
2491 request can make a macro have more than one name.
2494 Macro or string argument with 1-place number
2498 is a digit between 1 and 9.
2501 Macro or string argument with 2-digit number
2505 Macro or string argument with number
2509 is a numerical expression evaluating to an integer \[>=]1.
2512 In a macro or string, the concatenation of all the arguments separated
2516 In a macro or string, the concatenation of all the arguments with each
2517 surrounded by double quotes, and separated by spaces.
2520 In a macro, the representation of all parameters as if they were an
2525 .\" --------- escaped characters ---------
2528 reduces to a single backslash; useful to delay its interpretation as
2529 escape character in copy mode.
2531 For a printable backslash, use
2535 to be independent from the current escape character.
2538 The acute accent \[aa]; same as
2540 Unescaped: apostrophe, right quotation mark, single quote (ASCII 0x27).
2543 The grave accent \[ga]; same as
2545 Unescaped: left quote, backquote (ASCII 0x60).
2548 The \- sign in the current font.
2551 An uninterpreted dot (period), even at start of line.
2554 Default optional hyphenation character.
2557 Transparent line indicator.
2560 In a diversion, this transparently embeds
2564 is read in copy mode.
2566 See also the escape sequences
2572 .\" --------- spacing ---------
2575 Unpaddable space-size space character (no line break).
2581 1/6\ em narrow space character; zero width in nroff.
2584 1/12\ em half-narrow space character; zero width in nroff.
2587 Non-printable, zero width character.
2592 except that it behaves like a character declared with the cflags
2593 request to be transparent for the purposes of end of sentence
2597 Increases the width of the preceding character so that the spacing
2598 between that character and the following character is correct if
2599 the following character is a roman character.
2602 Modifies the spacing of the following character so that the spacing
2603 between that character and the preceding character is correct if the
2604 preceding character is a roman character.
2607 Unbreakable space that stretches like a normal inter-word space when a
2611 Inserts a zero-width break point (similar to
2613 but without a soft hyphen character).
2616 Ignored newline, for continuation lines.
2618 .\" --------- structuring ---------
2621 Begin conditional input.
2624 End conditional input.
2626 .\" --------- longer escape names ---------
2629 The special character with 2-character name
2632 .BR "Special Characters" .
2635 The named character (or rather glyph) with arbitrary length name
2638 .ESC[] "" "comp1 comp2 .\|.\|."
2639 A composite glyph with components
2644 .\" --------- alphabetical escapes ---------
2647 Non-interpreted leader character.
2652 is acceptable as a name of a string, macro, diversion, register,
2653 environment or font it expands to\~1, and to\~0 otherwise.
2655 .ESCq b abc.\|.\|.\&
2656 Bracket building function.
2661 is acceptable as a valid numeric expression it expands to\~1, and
2665 Interrupt text processing.
2668 The character called
2672 but compatible to other roff versions.
2675 Forward (down) 1/2 em vertical unit (1/2 line in nroff).
2678 Draw a graphical element defined by the characters in
2680 see groff info file for details.
2683 Printable version of the current escape character.
2686 Equivalent to an escape character, but is not interpreted in copy-mode.
2689 Change to font with 1-character name or 1-digit number
2693 Switch back to previous font.
2696 Change to font with 2-character name or 2-digit number
2700 Change to font with arbitrary length name or number expression
2704 Switch back to previous font.
2707 Change to font family with 1-character name
2711 Change to font family with 2-character name
2715 Change to font family with arbitrary length name
2719 Switch back to previous font family.
2722 Return format of register with name
2733 Local horizontal motion; move right
2738 Set height of current font to
2742 Mark horizontal input place in register with arbitrary length name
2750 Horizontal line drawing function (optionally using character
2754 Vertical line drawing function (optionally using character
2767 Switch back to previous color.
2770 Change filling color for closed drawn objects to color
2779 Switch to previous fill color.
2782 The numerical value stored in the register variable with the
2787 The numerical value stored in the register variable with the
2792 The numerical value stored in the register variable with arbitrary
2797 Typeset the character with code
2799 in the current font, no special fonts are searched.
2801 Useful for adding characters to a font using the
2805 .ESCq o abc.\|.\|.\&
2806 Overstrike characters
2813 Disable glyph output.
2815 Mainly for internal use.
2818 Enable glyph output.
2820 Mainly for internal use.
2823 Break and spread output line.
2826 Reverse 1\ em vertical motion (reverse line in nroff).
2828 .ESCq R "name\~\[+-]n"
2835 Set the point size to
2839 Note the alternative forms
2840 .BI \[rs]s \[+-] [ N ]\c
2842 .BI \[rs]s' \[+-]N '\c
2844 .BI \[rs]s \[+-] ' N '\c
2846 .escarg s( \[+-]xy\c
2848 .BI \[rs]s \[+-] ( xy\c
2861 Non-interpreted horizontal tab.
2864 Reverse (up) 1/2 em vertical motion (1/2 line in nroff).
2867 Local vertical motion; move down
2872 The contents of the environment variable
2881 The width of the character sequence
2885 Extra line-space function (negative before, positive after).
2890 as device control function.
2893 Output string variable or macro
2895 uninterpreted as device control function.
2905 with zero width (without spacing).
2910 and then restore the horizontal and vertical position;
2912 may not contain tabs or leaders.
2916 The escape sequences
2928 are interpreted in copy mode.
2931 Escape sequences starting with
2935 do not represent single character escape sequences, but introduce escape
2936 names with two or more characters.
2939 If a backslash is followed by a character that does not constitute a
2940 defined escape sequence the backslash is silently ignored and the
2941 character maps to itself.
2944 .\" --------------------------------------------------------------------
2945 .SS "Special Characters"
2946 .\" --------------------------------------------------------------------
2948 Common special characters are predefined by escape sequences of the
2956 Some of these exist in the usual font while most of them are only
2957 available in the special font.
2959 Below you'll find a selection of the most important glyphs; a complete
2960 list can be found in
2961 .BR groff_char (@MAN7EXT@).
2979 Printable double quote
2987 Printable backslash character
3010 .\" --------------------------------------------------------------------
3012 .\" --------------------------------------------------------------------
3014 Strings are defined by the
3016 request and can be retrieved by the
3021 Strings share their name space with macros.
3023 So strings and macros without arguments are roughly equivalent; it is
3024 possible to call a string like a macro and vice-versa, but this often
3025 leads to unpredictable results.
3027 The following strings are predefined in groff.
3030 The name of the current output device as specified by the
3032 command line option.
3035 .\" --------------------------------------------------------------------
3037 .\" --------------------------------------------------------------------
3039 Registers are variables that store a value.
3040 In groff, most registers store numerical values (see section
3041 .B NUMERICAL EXPRESSIONS
3042 above), but some can also hold a string value.
3045 Each register is given a name.
3046 Arbitrary registers can be defined and set with the request
3051 The value stored in a register can be retrieved by the escape sequences
3056 Most useful are predefined registers.
3058 In the following the notation
3060 is used to refer to a register called
3062 to make clear that we speak about registers.
3064 Please keep in mind that the
3066 decoration is not part of the register name.
3069 .\" --------------------------------------------------------------------
3070 .SS "Read-only Registers"
3071 .\" --------------------------------------------------------------------
3073 The following registers have predefined values that should not be
3074 modified by the user (usually, registers starting with a dot a
3077 Mostly, they provide information on the current settings or store
3078 results from request calls.
3084 Number of arguments in the current macro or string.
3087 Post-line extra line-space most recently utilized using
3095 is used; always\~1 in
3099 Within a macro, set to\~1 if macro called with the `normal' control
3100 character, and to\~0 otherwise.
3103 Current input line number.
3106 1\~if compatibility mode is in effect, 0\~otherwise.
3109 The depth of the last character added to the current environment.
3110 It is positive if the character extends below the baseline.
3113 The number of lines remaining to be centered, as set by the
3118 The height of the last character added to the current environment.
3119 It is positive if the character extends above the baseline.
3122 1\~if colors are enabled, 0\~otherwise.
3125 The skew of the last character added to the current environment.
3126 The skew of a character is how far to the right of the center of a character
3127 the center of an accent over that character should be placed.
3130 Current vertical place in current diversion; equal to
3134 The name or number of the current environment (string-valued).
3137 Current font number.
3140 The current font family (string-valued).
3143 The current (internal) real font name (string-valued).
3146 The number of the next free font position.
3149 Always 1 in GNU troff.
3151 Macros should use it to test if running under groff.
3154 Text base-line high-water mark on current page or diversion.
3157 Available horizontal resolution in basic units.
3160 The current font height as set with
3164 The current hyphenation language as set by the
3169 The number of immediately preceding consecutive hyphenated lines.
3172 The maximum allowed number of consecutive hyphenated lines, as set by
3178 The current hyphenation flags (as set by the
3183 The current hyphenation margin (as set by the
3188 The current hyphenation space (as set by the
3196 The indent that applies to the current output line.
3199 Positive if last output line contains
3203 1\~if pairwise kerning is enabled, 0\~otherwise.
3206 Current line length.
3209 The current ligature mode (as set by the
3214 The current line-tabs mode (as set by the
3219 The line length that applies to the current output line.
3222 The title length (as set by the
3227 The current drawing color (string-valued).
3230 The current background color (string-valued).
3233 Length of text portion on previous output line.
3236 The amount of space that was needed in the last
3238 request that caused a trap to be sprung.
3240 Useful in conjunction with
3244 1\~if in no-space mode, 0\~otherwise.
3247 Current page offset.
3250 Current page length.
3253 1\~during page ejection, 0\~otherwise.
3256 The number of the next page: either the value set by a
3258 request, or the number of the current page plus\ 1.
3261 The current pointsize in scaled points.
3264 The last-requested pointsize in scaled points.
3267 The current post-vertical line spacing.
3270 The number of lines to be right-justified as set by the rj request.
3273 Current point size as a decimal fraction.
3276 The slant of the current font as set with
3280 The last requested pointsize in points as a decimal fraction
3284 The value of the parameters set by the first argument of the
3289 The value of the parameters set by the second argument of the
3294 The current font style (string-valued).
3297 Distance to the next trap.
3306 A string representation of the current tab settings suitable for use
3307 as an argument to the
3312 The amount of vertical space truncated by the most recently sprung
3313 vertical position trap, or, if the trap was sprung by a
3315 request, minus the amount of vertical motion produced by
3318 In other words, at the point a trap is sprung, it represents
3319 the difference of what the vertical position would have been but for
3320 the trap, and what the vertical position actually is.
3322 Useful in conjunction with the
3326 Equal to 1 in fill mode and 0 in nofill mode.
3329 Equal to 1 in safer mode and 0 in unsafe mode.
3332 Current vertical line spacing.
3335 Available vertical resolution in basic units.
3338 1\~if vertical position traps are enabled, 0\~otherwise.
3341 Width of previous character.
3344 The sum of the number codes of the currently enabled warnings.
3347 The major version number.
3350 The minor version number.
3353 The revision number of groff.
3356 Name of current diversion.
3360 Zoom factor for current font (in multiples of 1/1000th; zero if no
3364 .\" --------------------------------------------------------------------
3365 .SS "Writable Registers"
3366 .\" --------------------------------------------------------------------
3368 The following registers can be read and written by the user.
3369 They have predefined default values, but these can be modified for
3370 customizing a document.
3375 Current page number.
3378 Current input line number.
3381 Character type (set by width function
3385 Maximal width of last completed diversion.
3388 Height of last completed diversion.
3391 Current day of week (1-7).
3394 Current day of month (1-31).
3397 The number of hours past midnight.
3399 Initialized at start-up.
3402 Current horizontal position at input line.
3405 Lower left x-coordinate (in PostScript units) of a given PostScript
3410 Lower left y-coordinate (in PostScript units) of a given PostScript
3418 The number of minutes after the hour.
3420 Initialized at start-up.
3423 Current month (1-12).
3426 Vertical position of last printed text base-line.
3431 but takes account of the heights and depths of characters.
3436 but takes account of the heights and depths of characters.
3439 Depth of string below base line (generated by width function
3443 The number of seconds after the minute.
3445 Initialized at start-up.
3448 Right skip width from the center of the last character in the
3453 If greater than 0, the maximum number of objects on the input stack.
3455 If \[<=]0 there is no limit, i.e., recursion can continue until virtual
3456 memory is exhausted.
3459 The amount of horizontal space (possibly negative) that should be
3460 added to the last character before a subscript (generated by width
3465 Height of string above base line (generated by width function
3469 The return value of the
3471 function executed by the last
3476 Upper right x-coordinate (in PostScript units) of a given PostScript
3481 Upper right y-coordinate (in PostScript units) of a given PostScript
3486 The current year (year 2000 compliant).
3489 Current year minus 1900.
3491 For Y2K compliance use
3498 .\" --------------------------------------------------------------------
3500 .\" --------------------------------------------------------------------
3502 The differences of the groff language in comparison to classical troff
3506 .BR groff_diff (@MAN7EXT@).
3509 The groff system provides a compatibility mode, see
3510 .BR groff (@MAN1EXT@)
3511 on how to invoke this.
3514 .\" --------------------------------------------------------------------
3516 .\" --------------------------------------------------------------------
3519 .MT bug-groff@gnu.org .
3520 groff bug mailing list
3522 Include a complete, self-contained example that will allow the bug to
3523 be reproduced, and say which version of groff you are using.
3526 .\" --------------------------------------------------------------------
3528 .\" --------------------------------------------------------------------
3530 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
3531 Free Software Foundation, Inc.
3534 This document is distributed under the terms of the FDL (GNU Free
3535 Documentation License) version 1.1 or later.
3537 You should have received a copy of the FDL on your system, it is also
3538 available on-line at the
3539 .UR http://www.gnu.org/copyleft/fdl.html
3544 This document is part of
3546 the GNU roff distribution.
3549 .MT bwarken@mayn.de ;
3558 .\" --------------------------------------------------------------------
3560 .\" --------------------------------------------------------------------
3563 The main source of information for the groff language is the
3568 Besides the gory details, it contains many examples.
3571 .BR groff (@MAN1EXT@)
3572 the usage of the groff program and pointers to the documentation and
3573 availability of the groff system.
3576 .BR groff_diff (@MAN7EXT@)
3577 the differences of the groff language as compared to classical roff.
3579 This is the authoritative document for the predefined language
3580 elements that are specific to groff.
3583 .BR groff_char (@MAN7EXT@)
3584 the predefined groff characters (glyphs).
3587 .BR groff_font (@MAN5EXT@)
3588 the specification of fonts and the DESC file.
3591 .BR roff (@MAN7EXT@)
3592 the history of roff, the common parts shared by all roff systems, and
3593 pointers to further documentation.
3597 .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:54.ps
3598 Nroff/\:Troff User's Manual by Osanna & Kernighan
3600 \[em] the bible for classical troff.
3604 .\" --------------------------------------------------------------------
3606 .\" --------------------------------------------------------------------
3608 .\" Local Variables: