5 This file is part of groff, the GNU roff type-setting system.
7 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
9 Free Software Foundation, Inc.
10 written by Bernd Warken <bwarken@mayn.de>
11 maintained by Werner Lemberg <wl@gnu.org>
13 Permission is granted to copy, distribute and/or modify this document
14 under the terms of the GNU Free Documentation License, Version 1.3 or
15 any later version published by the Free Software Foundation; with the
16 Invariant Sections being this .ig-section and AUTHORS, with no
17 Front-Cover Texts, and with no Back-Cover Texts.
19 A copy of the Free Documentation License is included as a file called
20 FDL in the main directory of the groff source package.
23 .\" --------------------------------------------------------------------
25 .\" --------------------------------------------------------------------
30 .\" --------------------------------------------------------------------
31 .\" start of macro definitions
36 .\" ---------------------------------------------------------------------
37 .\" .Text anything ...
39 .\" All arguments are printed as text.
45 .\" --------- command line option ---------
52 .\" --------- characters ---------
55 . Text \[oq]\f[CB]\\$1\f[]\[cq]\\$2
58 . Text \[lq]\f[CB]\\$1\f[]\[rq]\\$2
60 .\" --------- requests ---------
62 .\" synopsis of a request
68 . Text \f[CB]\\$1\~\f[]\f[I]\\$2\f[]
72 .\" reference of a request
77 .\" --------- numerical elements ---------
79 .\" number with a trailing unit
81 . Text \\$1\^\f[CB]\\$2\f[]\\$3\f[R]
85 .\" representation of units within the text
87 . Text \f[CB]\\$1\f[]\\$2\f[R]
91 .\" representation of mathematical operators within the text
97 .\" --------- escape sequences ---------
99 .\" ---------------------------------------------------------------------
102 .\" Synopsis of an escape sequence, optionally with argument
103 .\" Args : 1 or 2; `name' obligatory, `arg' optional
104 .\" name : suitable name for an escape sequence (c, (xy, [long])
105 .\" arg : arbitrary word
106 .\" Result : prints \namearg, where `name' is in CB, `arg' in I
109 . Text "\f[CB]\[rs]\\$1\,\f[I]\\$2\/\fR"
111 .\" ---------------------------------------------------------------------
114 .\" Synopsis for escape sequence with a bracketed long argument
115 .\" Args : 2 obligatory
116 .\" name : suitable name for an escape sequence (c, (xy, [long])
117 .\" arg : arbitrary text
118 .\" Result : prints \name[arg], where `name' is in CB, `arg' in I
121 . Text "\f[CB]\[rs]\\$1\[lB]\f[]\f[I]\\$2\f[]\f[CB]\[rB]\f[]"
123 .\" ---------------------------------------------------------------------
126 .\" Synopsis for escape sequence with a bracketed long argument
127 .\" Args : 2 obligatory
128 .\" name : suitable name for an escape sequence (c, (xy, [long])
129 .\" arg : arbitrary text
130 .\" Result : prints \name'arg', where `name' is in CB, `arg' in I
133 . Text "\f[CB]\[rs]\\$1\[cq]\f[]\f[I]\\$2\f[]\f[CB]\[cq]\f[]"
135 .\" ---------------------------------------------------------------------
138 .\" Synopsis for escape sequence with a bracketed long argument
139 .\" Args : 1 obligatory
140 .\" arg : arbitrary text
141 .\" Result : prints `\?arg?', where the `?' are in CB, `arg' in I
144 . Text "\f[CB]\[rs]?\f[I]\\$1\f[CB]?\f[R]"
146 .\" ---------------------------------------------------------------------
147 .\" .esc name [punct]
149 .\" Reference of an escape sequence (no args), possibly punctuation
150 .\" Args : 1 obligatory
151 .\" name : suitable name for an escape sequence (c, (xy, [long])
152 .\" punct : arbitrary
153 .\" Result : prints \name, where `name' is in B, `punct' in R
156 . BR "\[rs]\\$1" \\$2
158 .\" ---------------------------------------------------------------------
159 .\" .escarg name arg [punct]
161 .\" Reference of an escape sequence (no args)
162 .\" Args : 1 obligatory, 1 optional
163 .\" name : suitable name for an escape sequence (c, (xy, [long])
164 .\" arg : arbitrary word
165 .\" Result : prints \namearg, where
166 .\" `name' is in B, `arg' in I
169 . Text \f[B]\[rs]\\$1\f[]\f[I]\\$2\f[]\\$3
171 .\" ---------------------------------------------------------------------
172 .\" .esc[] name arg [punct]
174 .\" Reference for escape sequence with a bracketed long argument
175 .\" Args : 2 obligatory
176 .\" name : suitable name for an escape sequence (c, (xy, [long])
177 .\" arg : arbitrary text
178 .\" Result : prints \name[arg], where `name' is in CB, `arg' in CI
181 . Text \f[B]\[rs]\\$1\[lB]\f[]\f[I]\\$2\f[]\f[B]\[rB]\f[]\\$3
184 .\" ---------------------------------------------------------------------
187 .\" Reference for escape sequence with a bracketed long argument
188 .\" Args : 2 obligatory
189 .\" name : suitable name for an escape sequence (c, (xy, [long])
190 .\" arg : arbitrary text
191 .\" Result : prints \name'arg', where `name' is in CB, `arg' in CI
194 . Text \f[B]\[rs]\\$1\[cq]\f[]\f[I]\\$2\f[]\f[B]\[cq]\f[]\\$3
197 .\" --------- strings ---------
199 .\" synopsis for string, with \*[]
201 . Text \[rs]*[\f[CB]\\$1\f[]] \\$2
203 .\" synopsis for a long string
207 . Text \f[CB]\[rs]*\[lB]\\$1\[rB]\f[]\\$2
210 .\" --------- registers ---------
212 .\" synopsis for registers, with \n[]
214 . Text \[rs]n[\f[CB]\\$1\f[]]
216 .\" reference of a register, without decoration
222 .\" end of macro definitions
225 .\" --------------------------------------------------------------------
227 .\" --------------------------------------------------------------------
229 .TH GROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
231 groff \- a short reference for the GNU roff language
234 .\" --------------------------------------------------------------------
236 .\" --------------------------------------------------------------------
242 and is the free implementation of the roff type-setting system.
246 for a survey and the background of the groff system.
249 This document gives only short descriptions of the predefined roff
250 language elements as used in groff.
252 Both the classical features and the groff extensions are provided.
260 is compatible with the classical system and provides proper
268 could be used as synonyms.
272 slightly tends to refer more to the classical aspects, whereas
274 emphasizes the GNU extensions, and
276 is the general term for the language.
279 This file is only a short version of the complete documentation that
283 file, which contains more detailed, actual, and concise information.
286 The general syntax for writing groff documents is relatively easy, but
287 writing extensions to the roff language can be a bit harder.
290 The roff language is line-oriented.
292 There are only two kinds of lines, control lines and text lines.
294 The control lines start with a control character, by default a period
298 all other lines are text lines.
302 represent commands, optionally with arguments.
304 They have the following syntax.
306 The leading control character can be followed by a command name;
307 arguments, if any, are separated by spaces (but not tab characters)
308 from the command name and among themselves, for example,
312 .Text .command_name arg1 arg2
316 For indentation, any number of space or tab characters can be inserted
317 between the leading control character and the command name, but the
318 control character must be on the first position of the line.
322 represent the parts that is printed.
323 They can be modified by escape sequences, which are recognized by a
325 .squoted_char \[rs] .
326 These are in-line or even in-word formatting elements or functions.
328 Some of these take arguments separated by single quotes
330 others are regulated by a length encoding introduced by an open
333 or enclosed in brackets
339 The roff language provides flexible instruments for writing language
340 extension, such as macros.
342 When interpreting macro definitions, the roff system enters a special
343 operating mode, called the
347 The copy mode behavior can be quite tricky, but there are some rules
348 that ensure a safe usage.
351 Printable backslashes must be denoted as
355 represents the current escape character.
357 To get a backslash glyph, use
362 Double all backslashes.
364 Begin all text lines with the special non-spacing character
368 This does not produce the most efficient code, but it should work as a
371 For better strategies, see the groff info file and
372 .BR groff_tmac (@MAN5EXT@).
375 Reading roff source files is easier, just reduce all double backslashes
376 to a single one in all macro definitions.
379 .\" --------------------------------------------------------------------
381 .\" --------------------------------------------------------------------
383 The roff language elements add formatting information to a text file.
385 The fundamental elements are predefined commands and variables that
386 make roff a full-blown programming language.
389 There are two kinds of roff commands, possibly with arguments.
391 are written on a line of their own starting with a dot
397 are in-line functions and in-word formatting elements starting with a
399 .squoted_char \[rs] .
402 The user can define her own formatting commands using the
406 These commands are called
408 but they are used exactly like requests.
410 Macro packages are pre-defined sets of macros written in the groff
413 A user's possibilities to create escape sequences herself is very
414 limited, only special characters can be mapped.
417 The groff language provides several kinds of variables with
418 different interfaces.
420 There are pre-defined variables, but the user can define her own
425 variables store character sequences.
427 They are set with the
429 request and retrieved by the
433 Strings can have variables.
437 variables can store numerical values, numbers with a scale unit, and
438 occasionally string-like objects.
440 They are set with the
442 request and retrieved by the
448 allow the user to temporarily store global formatting parameters like
449 line length, font size, etc.\& for later reuse.
457 are identified either by a name or by an internal number.
459 The current font is chosen by the
465 Each device has special fonts, but the following fonts are available
468 is the standard font Roman.
478 and is available everywhere, but on text devices it is displayed as an
479 underlined Roman font.
481 For the graphical output devices, there exist constant-width pendants
487 On text devices, all glyphs have a constant width anyway.
491 are visual representation forms of
493 In groff, the distinction between those two elements is not always
494 obvious (and a full discussion is beyond the scope of this man page).
496 A first approximation is that glyphs have a specific size and
497 colour and are taken from a specific font; they can't be modified any
498 more \[en] characters are the input, and glyphs are the output.
500 As soon as an output line has been generated, it no longer contains
501 characters but glyphs.
503 In this man page, we use either `glyph' or `character', whatever is
507 Moreover, there are some advanced roff elements.
511 stores (formatted) information into a macro for later usage.
515 is a positional condition like a certain number of lines from page top
516 or in a diversion or in the input.
518 Some action can be prescribed to be run automatically when the
522 More detailed information and examples can be found in the groff info
526 .\" --------------------------------------------------------------------
527 .SH "CONTROL CHARACTERS"
528 .\" --------------------------------------------------------------------
530 There is a small set of characters that have a special controlling
531 task in certain conditions.
535 A dot is only special at the beginning of a line or after the
536 condition in the requests
542 There it is the control character that introduces a request (or macro).
544 The special behavior can be delayed by using the
550 request, the control character can be set to a different character,
553 a non-special character.
555 In all other positions, it just means a dot character.
557 In text paragraphs, it is advantageous to start each sentence at a
562 The single quote has two controlling tasks.
564 At the beginning of a line and in the conditional requests it is the
565 non-breaking control character.
567 That means that it introduces a request like the dot, but with the
568 additional property that this request doesn't cause a linebreak.
572 request, the non-break control character can be set to a different
576 As a second task, it is the most commonly used argument separator in
577 some functional escape sequences (but any pair of characters not part
578 of the argument do work).
580 In all other positions, it denotes the single quote or apostrophe
583 Groff provides a printable representation with the
589 The double quote is used to enclose arguments in macros (but not in
590 requests and strings).
596 requests, a leading double quote in the argument is stripped off,
597 making everything else afterwards the string to be defined (enabling
600 The escaped double quote
602 introduces a comment.
604 Otherwise, it is not special.
606 Groff provides a printable representation with the
612 The backslash usually introduces an escape sequence (this can be
617 A printed version of the escape character is the
619 escape; a backslash glyph can be obtained by
623 The open parenthesis is only special in escape sequences when
624 introducing an escape name or argument consisting of exactly two
627 In groff, this behavior can be replaced by the \f[CB][]\f[] construct.
630 The opening bracket is only special in groff escape sequences; there
631 it is used to introduce a long escape name or long escape argument.
633 Otherwise, it is non-special, e.g.\& in macro calls.
636 The closing bracket is only special in groff escape sequences; there
637 it terminates a long escape name or long escape argument.
639 Otherwise, it is non-special.
642 Space characters are only functional characters.
644 They separate the arguments in requests, macros, and strings, and the words
647 They are subject to groff's horizontal spacing calculations.
649 To get a defined space width, escape sequences like
650 .squoted_char "\[rs]\ "
651 (this is the escape character followed by a space),
658 .IP \f[CI]newline\f[]
659 In text paragraphs, newlines mostly behave like space characters.
661 Continuation lines can be specified by an escaped newline, i.e., by
662 specifying a backslash
664 as the last character of a line.
666 If a tab character occurs during text the interpreter makes a
667 horizontal jump to the next pre-defined tab position.
669 There is a sophisticated interface for handling tab positions.
672 .\" --------------------------------------------------------------------
673 .SH "NUMERICAL EXPRESSIONS"
674 .\" --------------------------------------------------------------------
678 is a signed or unsigned integer or float with or without an appended
683 is a one-character abbreviation for a unit of measurement.
685 A number followed by a scaling indicator signifies a size value.
687 By default, numerical values do not have a scaling indicator, i.e., they
693 language defines the following scaling indicators.
710 Pica\ \[eq]\ 1/6\ inch
714 Point\ \[eq]\ 1/72\ inch
718 Em\ \[eq]\ \f[R]the font size in points (approx.\& width of letter
723 100\^th \f[R]of an \f[CR]Em
731 Basic unit for actual output device
735 Vertical line space in basic units
736 scaled point\ \[eq]\ 1/\f[CI]sizescale\f[R] of a point (defined in
737 font \f[I]DESC\f[] file)
746 .B Numerical expressions
747 are combinations of the numerical values defined above with the
748 following arithmetical operators already defined in classical troff.
812 Grouping of expressions
816 Close current grouping
824 added the following operators for numerical expressions:
831 \f[I]e1\f[CB]>?\f[I]e2\f[R]
838 \f[I]e1\f[CB]<?\f[I]e2\f[R]
845 \f[CB](\f[I]c\f[CB];\f[I]e\f[CB])\f[R]
850 as the default scaling indicator.
856 For details see the groff info file.
859 .\" --------------------------------------------------------------------
861 .\" --------------------------------------------------------------------
864 occur in tests raised by the
871 The following table characterizes the different types of conditions.
879 A numerical expression
881 yields true if its value is greater than\~0.
893 is identical to string\~\c
900 is not identical to string\~\c
905 True if there is a glyph\~\c
911 True if there is a string, macro, diversion, or request called
916 Current page number is even.
920 Current page number is odd.
924 True if there is a color called
934 True if there is a register named
944 True if there exists a font named
949 True if a style named
957 .\" --------------------------------------------------------------------
959 .\" --------------------------------------------------------------------
961 This section provides a short reference for the predefined requests.
963 In groff, request, macro, and string names can be arbitrarily long.
965 No bracketing or marking of long names is needed.
968 Most requests take one or more arguments.
970 The arguments are separated by space characters (no tabs!); there is
971 no inherent limit for their length or number.
974 Some requests have optional arguments with a different behaviour.
976 Not all of these details are outlined here.
978 Refer to the groff info file and
979 .BR groff_diff (@MAN7EXT@)
983 In the following request specifications, most argument names were
984 chosen to be descriptive.
986 Only the following denotations need clarification.
994 denotes a single character.
998 a font either specified as a font name or a font number.
1002 all characters up to the end of the line or within
1009 is a numerical expression that evaluates to an integer value.
1013 is an arbitrary numerical expression, signed or unsigned.
1017 has three meanings depending on its sign, described below.
1023 If an expression defined as
1027 sign the resulting value of the expression is added to an already
1028 existing value inherent to the related request, e.g.\& adding to a number
1031 If the expression starts with a
1033 the value of the expression is subtracted from the request value.
1038 replaces the existing value directly.
1040 To assign a negative number either prepend\~0 or enclose the negative
1041 number in parentheses.
1044 .\" --------------------------------------------------------------------
1045 .SS "Request Short Reference"
1046 .\" --------------------------------------------------------------------
1052 Empty line, ignored.
1054 Useful for structuring documents.
1057 .REQ .\[rs]\[dq] "anything"
1058 Complete line is a comment.
1064 on standard error, exit program.
1068 Begin line adjustment for output lines in current adjust mode.
1072 Start line adjustment in mode
1074 (\f[CI]c\f[]\f[CR]\|\^\[eq]\|l,r,b,n\f[]).
1077 .REQ .af "register c"
1082 (\f[CI]c\f[]\f[CR]\|\^\[eq]\|l,i,I,a,A\f[]).
1085 .REQ .aln "alias register"
1086 Create alias name for
1090 .REQ .als "alias object"
1091 Create alias name for request, string, macro, or diversion
1103 .REQ .am "macro end"
1114 but with compatibility mode switched off during macro expansion.
1117 .REQ .am1 "macro end"
1120 but with compatibility mode switched off during macro expansion.
1124 Append to a macro whose name is contained in the string register
1131 .REQ .ami "macro end"
1132 Append to a macro indirectly.
1136 are string registers whose contents are interpolated for the macro name
1137 and the end macro, respectively.
1143 but with compatibility mode switched off during macro expansion.
1146 .REQ .ami1 "macro end"
1149 but with compatibility mode switched off during macro expansion.
1152 .REQ .as "stringvar anything"
1159 .REQ .as1 "stringvar anything"
1162 but with compatibility mode switched off during string expansion.
1165 .REQ .asciify "diversion"
1166 Unformat ASCII characters, spaces, and some escape sequences in
1171 Print a backtrace of the input on stderr.
1183 Embolden Special Font
1185 when current font is
1190 Unset the blank line macro.
1194 Set the blank line macro to
1199 End current diversion.
1205 omitting a partially filled line.
1209 End current diversion.
1213 Divert and append to
1215 omitting a partially filled line.
1219 Eject current page and begin new page.
1223 Eject current page; next page number
1232 Break and spread output line.
1238 Break out of a while loop.
1242 Reset no-break control character to
1247 Set no-break control character to
1252 Reset control character to
1257 Set control character to
1262 Center the next input line.
1272 Copy contents of file
1274 unprocessed to stdout or to the diversion.
1277 .REQ .cflags "mode c1 c2 .\|.\|.\&"
1295 .REQ .char "c anything"
1303 Chop the last character off macro, string, or diversion
1307 .REQ .close "stream"
1319 is zero disable colors, otherwise enable them.
1322 .REQ .composite "from to"
1327 while constructing a composite glyph name.
1331 Finish the current iteration of a while loop.
1335 Enable compatibility mode.
1341 is zero disable compatibility mode, otherwise enable it.
1345 Set constant character width mode for
1354 Continuous underline in nroff, like
1360 End current diversion.
1364 Divert and append to
1376 .REQ .de "macro end"
1387 but with compatibility mode switched off during macro expansion.
1390 .REQ .de1 "macro end"
1393 but with compatibility mode switched off during macro expansion.
1396 .REQ .defcolor "color scheme component"
1397 Define or redefine a color with name
1408 can be single components specified as fractions in the range 0 to 1
1409 (default scaling indicator\~\c
1410 .scaleindicator f ),
1411 as a string of two-digit hexadecimal color components with a leading
1413 or as a string of four-digit hexadecimal components with two leading
1421 Define or redefine a macro whose name is contained in the string register
1428 .REQ .dei "macro end"
1429 Define or redefine a macro indirectly.
1433 are string registers whose contents are interpolated for the macro name
1434 and the end macro, respectively.
1440 but with compatibility mode switched off during macro expansion.
1443 .REQ .dei1 "macro end"
1446 but with compatibility mode switched off during macro expansion.
1449 .REQ .device "anything"
1452 to the intermediate output as a device control function.
1455 .REQ .devicem "name"
1456 Write contents of macro or string
1458 uninterpreted to the intermediate output as a device control function.
1462 End current diversion.
1473 with compatibility mode disabled.
1476 .REQ .ds "stringvar anything"
1483 .REQ .ds1 "stringvar anything"
1486 but with compatibility mode switched off during string expansion.
1490 Set diversion trap to position
1492 (default scaling indicator\~\c
1493 .scaleindicator v ).
1497 Reset escape character to
1498 .squoted_char \[rs] .
1502 Set escape character to
1507 Restore escape character saved with
1512 Save current escape character.
1516 Else part for if-else (\c
1524 is run after the end of input.
1528 Turn off escape character mechanism.
1532 Switch to previous environment and pop it off the stack.
1536 Push down environment number or name
1538 to the stack and switch to it.
1542 Copy the contents of environment
1544 to the current environment.
1545 No pushing or popping.
1549 Exit from roff processing.
1553 Return to previous font family.
1557 Set the current font family to
1562 Disable field mechanism.
1566 Set field delimiter to\~\c
1568 and pad glyph to space.
1572 Set field delimiter to\~\c
1574 and pad glyph to\~\c
1578 .REQ .fchar "c anything"
1579 Define fallback character (or glyph)
1586 Set fill color to previous fill color.
1599 Flush output buffer.
1609 .REQ .fp "n internal external"
1610 Mount font with long
1618 .REQ .fschar "f c anything"
1619 Define fallback character (or glyph)
1627 .REQ .fspecial "font"
1628 Reset list of special fonts for
1633 .REQ .fspecial "font s1 s2 .\|.\|.\&"
1634 When the current font is
1644 Return to previous font.
1652 Change to font name or number
1659 .REQ .ftr "font1 font2"
1671 .REQ .fzoom "font zoom"
1674 (in multiples of 1/1000th).
1678 Set glyph color to previous glyph color.
1687 Remove additional hyphenation indicator character.
1691 Set up additional hyphenation indicator character\~\c
1695 .REQ .hcode "c1 code1 c2 code2 .\|.\|.\&"
1696 Set the hyphenation code of character
1708 Set the current hyphenation language to
1713 Set the maximum number of consecutive hyphenated lines to
1718 Read hyphenation patterns from
1723 Append hyphenation patterns from
1727 .REQ .hpfcode "a b c d .\|.\|.\&"
1728 Set input mapping for
1735 with exceptional hyphenation.
1739 Switch to hyphenation mode
1744 Set the hyphenation margin to
1746 (default scaling indicator\~\c
1747 .scaleindicator m ).
1751 Set the hyphenation space to
1755 .REQ .ie "cond anything"
1764 .REQ .if "cond anything"
1769 otherwise do nothing.
1785 Change to previous indentation value.
1789 Change indentation according to
1791 (default scaling indicator\~\c
1792 .scaleindicator m ).
1796 Set an input-line count trap for the next
1804 but count lines interrupted with
1810 Enable pairwise kerning.
1816 is zero, disable pairwise kerning, otherwise enable it.
1820 Remove leader repetition glyph.
1824 Set leader repetition glyph to\~\c
1828 .REQ .length "register anything"
1829 Write the length of the string
1836 Enable line-tabs mode (i.e., calculate tab positions relative to output
1843 is zero, disable line-tabs mode, otherwise enable it.
1847 Set input line number to
1852 Set input line number to
1864 Change to previous line length.
1868 Set line length according to
1871 .scalednumber 6.5 i ,
1872 default scaling indicator\~\c
1873 .scaleindicator m ).
1877 Change to the previous value of additional intra-line skip.
1881 Set additional intra-line skip value to
1885 blank lines are inserted after each text output line.
1889 Length of title (default scaling indicator\~\c
1890 .scaleindicator m ).
1900 after each text line at actual distance from right margin.
1904 Set margin glyph to\~\c
1908 from right margin (default scaling indicator\~\c
1909 .scaleindicator m ).
1913 Mark current vertical position in
1922 is searched in the tmac directories.
1926 No output-line adjusting.
1930 Need a one-line vertical space.
1936 vertical space (default scaling indicator\~\c
1937 .scaleindicator v ).
1941 No filling or adjusting of output-lines.
1952 .REQ .nm "\[+-]N \fR[\fPM \fR[\fPS \fR[\fPI\fR]]]\fP"
1953 In line number mode, set number, multiple, spacing, and indentation.
1957 Do not number next line.
1966 .REQ .nop "anything"
1971 .REQ .nr "register \[+-]N \fR[\fPM\fR]\fP"
1981 Make the built-in conditions
1989 Turn on no-space mode.
1993 Immediately jump to end of current file.
1997 Immediately continue processing with file
2001 .REQ .open "stream filename"
2004 for writing and associate the stream named
2009 .REQ .opena "stream filename"
2016 Output vertical distance that was saved by the
2021 .REQ .output "string"
2024 directly to intermediate output, allowing leading whitespace if
2028 (which is stripped off).
2032 Reset page number character to\~\c
2037 Page number character.
2041 Print the current environment and each defined environment
2052 Set page length to default
2053 .scalednumber 11 i .
2054 The current page length is stored in
2059 Change page length to
2061 (default scaling indicator\~\c
2062 .scaleindicator v ).
2066 Print macro names and sizes (number of blocks of 128 bytes).
2070 Print only total of sizes of macros (number of 128 bytes blocks).
2079 Print the names and contents of all currently defined number registers
2084 Change to previous page offset.
2086 The current page offset is available in
2096 Return to previous point size.
2103 .REQ .psbb "filename"
2104 Get the bounding box of a PostScript image
2109 This behaves like the
2111 request except that input comes from the standard output of
2116 Print the names and positions of all traps (not including input line
2117 traps and diversion traps) on stderr.
2121 Change to previous post-vertical line spacing.
2125 Change post-vertical line spacing according to
2127 (default scaling indicator\~\c
2128 .scaleindicator p ).
2131 .REQ .rchar "c1 c2 .\|.\|.\&"
2132 Remove the definitions of entities
2143 Return from a macro.
2146 .REQ .return "anything"
2147 Return twice, namely from the macro at the current level and from the macro
2151 .REQ .rfschar "f c1 c2 .\|.\|.\&"
2152 Remove the definitions of entities
2161 Right justify the next
2167 Remove request, macro, or string
2172 Rename request, macro, or string
2178 .REQ .rnn "reg1 reg2"
2191 Restore spacing; turn no-space mode off.
2197 to marked vertical place (default scaling indicator\~\c
2198 .scaleindicator v ).
2201 .REQ .schar "c anything"
2202 Define global fallback character (or glyph)\~\c
2209 Reset soft hyphen glyph to
2214 Set the soft hyphen glyph to\~\c
2219 In a macro, shift the arguments by
2224 .REQ .sizes "s1 s2 .\|.\|.\& sn \fB[0]\fP"
2225 Set available font sizes similar to the
2233 Include source file.
2237 Skip one line vertically.
2241 Space vertical distance
2243 up or down according to sign of
2245 (default scaling indicator\~\c
2246 .scaleindicator v ).
2250 Reset global list of special fonts to be empty.
2253 .REQ .special "s1 s2 .\|.\|.\&"
2257 etc.\& are special and are searched for glyphs not in the
2262 Toggle the spread warning on and off without changing its value.
2265 .REQ .spreadwarn "limit"
2266 Emit a warning if each space in an output line is widened by
2268 or more (default scaling indicator\~\c
2269 .scaleindicator m ).
2273 Set space glyph size to
2275 of the space width in the current font.
2279 Set space glyph size to
2281 and sentence space size set to
2283 of the space width in the current font.
2293 .REQ .substring "xx n1 n2"
2294 Replace the string named
2296 with the substring defined by the indices
2308 Save the vertical distance
2310 for later output with
2312 request (default scaling indicator\~\c
2313 .scaleindicator v ).
2316 .REQ .sy "command-line"
2322 Set tabs after every position that is a multiple of
2324 (default scaling indicator\~\c
2325 .scaleindicator m ).
2327 .REQ .ta "n1 n2 .\|.\|.\& nn \f[CB]T\f[] r1 r2 .\|.\|.\& rn"
2328 Set tabs at positions
2347 .\"Restore internally saved tab positions.
2351 .\"Save tab positions internally.
2355 Remove tab repetition glyph.
2358 Set tab repetition glyph to\~\c
2363 Temporary indent next line (default scaling indicator\~\c
2364 .scaleindicator m ).
2367 .REQ .tkf "font s1 n1 s2 n2"
2368 Enable track kerning for
2372 .REQ .tl "\f[CB]\[cq]\f[]left\f[CB]\[cq]\f[]center\f[CB]\[cq]\f[]right\f[CB]\[cq]\f[]"
2382 .REQ .tm1 "anything"
2385 on stdout, allowing leading whitespace if
2389 (which is stripped off).
2392 .REQ .tmc "anything"
2395 without emitting a final newline.
2398 .REQ .tr "abcd.\|.\|.\&"
2409 .REQ .trf "filename"
2410 Transparently output the contents of file
2414 .REQ .trin "abcd.\|.\|.\&"
2415 This is the same as the
2417 request except that the
2419 request uses the character code (if any) before the character
2423 .REQ .trnt "abcd.\|.\|.\&"
2424 This is the same as the
2426 request except that the translations do not apply to text that is
2427 transparently throughput into a diversion with
2432 Make the built-in conditions
2440 Set underline font to
2442 (to be switched to by
2447 Underline (italicize in troff)
2452 .REQ .unformat "diversion"
2453 Unformat space characters and tabs in
2455 preserving font information.
2458 Enable vertical position traps if
2460 is non-zero, disable them otherwise.
2464 Change to previous vertical base line spacing.
2468 Set vertical base line spacing to
2470 (default scaling indicator\~\c
2471 .scaleindicator p ).
2475 Set warnings code to
2479 .REQ .warnscale "si"
2480 Set scaling indicator used in warnings to
2485 Remove (first) trap at position
2490 Set location trap; negative means from page bottom.
2493 .REQ .while "cond anything"
2501 .REQ .write "stream anything"
2508 .REQ .writec "stream anything"
2511 without emitting a final newline.
2514 .REQ .writem "stream xx"
2515 Write contents of macro or string
2523 Besides these standard groff requests, there might be further macro
2525 They can originate from a macro package (see
2526 .BR roff (@MAN7EXT@)
2527 for an overview) or from a preprocessor.
2530 Preprocessor macros are easy to be recognized.
2532 They enclose their code into a pair of characteristic macros.
2536 box, center, tab (@);
2539 preprocessor@start macro@ end macro
2546 soelim@\f[I]none@\f[I]none
2552 .\" --------------------------------------------------------------------
2553 .SH "ESCAPE SEQUENCES"
2554 .\" --------------------------------------------------------------------
2556 Escape sequences are in-line language elements usually introduced by a
2559 and followed by an escape name and sometimes by a required argument.
2561 Input processing is continued directly after the escaped character or
2562 the argument (without an intervening separation character).
2564 So there must be a way to determine the end of the escape name and the
2565 end of the argument.
2568 This is done by enclosing names (escape name and arguments consisting
2569 of a variable name) by a pair of brackets
2570 .BI \[lB] name \[rB]
2571 and constant arguments (number expressions and characters) by
2572 apostrophes (ASCII 0x27) like
2573 .BI \[cq] constant \[cq] \f[R].
2576 There are abbreviations for short names.
2578 Two-character escape names can be specified by an opening parenthesis
2583 without a closing counterpart.
2585 And all one-character names different from the special characters
2589 can even be specified without a marker, for example
2595 Constant arguments of length\~1 can omit the marker apostrophes, too,
2596 but there is no two-character analogue.
2599 While one-character escape sequences are mainly used for in-line
2600 functions and system related tasks, the two-letter names following the
2602 construct are glyphs predefined by the roff system; these are called
2603 `Special Characters' in the classical documentation.
2605 Escapes sequences of the form
2610 .\" --------------------------------------------------------------------
2611 .SS "Single-Character Escapes"
2612 .\" --------------------------------------------------------------------
2616 .\" --------- comments ---------
2622 Everything up to the end of the line is ignored.
2626 Everything up to and including the next newline is ignored.
2628 This is interpreted in copy mode.
2632 except that the terminating newline is ignored as well.
2634 .\" --------- strings ---------
2638 The string stored in the string variable with one-character name\~\c
2643 The string stored in the string variable with two-character name
2648 The string stored in the string variable with name
2650 (with arbitrary length).
2653 .ESC[] * "stringvar arg1 arg2 .\|.\|."
2654 The string stored in the string variable with arbitrarily long name
2662 .\" --------- macro arguments ---------
2666 The name by which the current macro was invoked.
2670 request can make a macro have more than one name.
2674 Macro or string argument with one-digit number\~\c
2676 in the range 1 to\~9.
2680 Macro or string argument with two-digit number
2686 Macro or string argument with number
2690 is a numerical expression evaluating to an integer \[>=]1.
2694 In a macro or string, the concatenation of all the arguments separated
2699 In a macro or string, the concatenation of all the arguments with each
2700 surrounded by double quotes, and separated by spaces.
2704 In a macro, the representation of all parameters as if they were an
2709 .\" --------- escaped characters ---------
2713 reduces to a single backslash; useful to delay its interpretation as
2714 escape character in copy mode.
2716 For a printable backslash, use
2720 to be independent from the current escape character.
2724 The acute accent \[aa]; same as
2726 Unescaped: apostrophe, right quotation mark, single quote (ASCII 0x27).
2730 The grave accent \[ga]; same as
2732 Unescaped: left quote, backquote (ASCII 0x60).
2736 The \- (minus) sign in the current font.
2742 the underline character.
2746 An uninterpreted dot (period), even at start of line.
2750 Default optional hyphenation character.
2754 Transparent line indicator.
2758 In a diversion, this transparently embeds
2762 is read in copy mode.
2764 See also the escape sequences
2770 .\" --------- spacing ---------
2774 Unpaddable space size space glyph (no line break).
2782 1/6\ em narrow space glyph; zero width in nroff.
2786 1/12\ em half-narrow space glyph; zero width in nroff.
2790 Non-printable, zero-width glyph.
2796 except that it behaves like a glyph declared with the
2798 request to be transparent for the purposes of end-of-sentence
2803 Increases the width of the preceding glyph so that the spacing
2804 between that glyph and the following glyph is correct if
2805 the following glyph is a roman glyph.
2809 Modifies the spacing of the following glyph so that the spacing
2810 between that glyph and the preceding glyph is correct if the
2811 preceding glyph is a roman glyph.
2815 Unbreakable space that stretches like a normal inter-word space when a
2820 Inserts a zero-width break point (similar to
2822 but without a soft hyphen character).
2826 Ignored newline, for continuation lines.
2828 .\" --------- structuring ---------
2832 Begin conditional input.
2836 End conditional input.
2838 .\" --------- longer escape names ---------
2842 A glyph with two-character name
2845 .BR "Special Characters" .
2851 (of arbitrary length).
2854 .ESC[] "" "comp1 comp2 .\|.\|."
2855 A composite glyph with components
2860 .\" --------- alphabetical escapes ---------
2864 Non-interpreted leader character.
2870 is acceptable as a name of a string, macro, diversion, register,
2871 environment or font it expands to\~1, and to\~0 otherwise.
2874 .ESCq b abc.\|.\|.\&
2875 Bracket building function.
2881 is acceptable as a valid numeric expression it expands to\~1, and
2886 Interrupt text processing.
2894 but compatible to other roff versions.
2898 Forward (down) 1/2 em (1/2 line in nroff).
2902 Draw a graphical element defined by the characters in
2904 see the groff info file for details.
2908 Printable version of the current escape character.
2912 Equivalent to an escape character, but is not interpreted in copy mode.
2916 Change to font with one-character name or one-digit number\~\c
2921 Switch back to previous font.
2925 Change to font with two-character name or two-digit number
2930 Change to font with arbitrarily long name or number expression
2935 Switch back to previous font.
2939 Change to font family with one-character name\~\c
2944 Change to font family with two-character name
2949 Change to font family with arbitrarily long name
2954 Switch back to previous font family.
2958 Return format of register with one-character name\~\c
2966 Return format of register with two-character name
2974 Return format of register with arbitrarily long name
2982 Local horizontal motion; move right
2988 Set height of current font to
2993 Mark horizontal input place in one-character register\~\c
2998 Mark horizontal input place in two-character register
3003 Mark horizontal input place in register with arbitrarily long name
3008 Horizontal line drawing function (optionally using character
3013 Vertical line drawing function (optionally using character
3018 Change to color with one-character name\~\c
3023 Change to color with two-character name
3028 Change to color with arbitrarily long name
3033 Switch back to previous color.
3037 Change filling color for closed drawn objects to color with
3038 one-character name\~\c
3043 Change filling color for closed drawn objects to color with
3049 Change filling color for closed drawn objects to color with
3050 arbitrarily long name
3055 Switch to previous fill color.
3059 The numerical value stored in the register variable with the
3060 one-character name\~\c
3065 The numerical value stored in the register variable with the
3071 The numerical value stored in the register variable with arbitrarily
3077 Typeset the glyph with index\~\c
3079 in the current font.
3081 No special fonts are searched.
3083 Useful for adding (named) entities to a document using the
3085 request and friends.
3088 .ESCq o abc.\|.\|.\&
3097 Disable glyph output.
3099 Mainly for internal use.
3103 Enable glyph output.
3105 Mainly for internal use.
3109 Break and spread output line.
3113 Reverse 1\ em vertical motion (reverse line in nroff).
3116 .ESCq R "name\~\[+-]n"
3124 Set/increase/decrease the point size to/by
3128 is a one-digit number in the range 1 to\~9.
3138 Set/increase/decrease the point size to/by
3142 is a two-digit number \[>=]1.
3156 Set/increase/decrease the point size to/by
3172 Non-interpreted horizontal tab.
3176 Reverse (up) 1/2 em vertical motion (1/2 line in nroff).
3180 Local vertical motion; move down
3186 The contents of the environment variable with one-character
3192 The contents of the environment variable with two-character name
3197 The contents of the environment variable with arbitrarily long name
3202 The width of the glyph sequence
3207 Extra line-space function (negative before, positive after).
3213 as device control function.
3217 Output string variable or macro with one-character name\~\c
3219 uninterpreted as device control function.
3223 Output string variable or macro with two-character name
3225 uninterpreted as device control function.
3229 Output string variable or macro with arbitrarily long name
3231 uninterpreted as device control function.
3237 with zero width (without spacing).
3243 and then restore the horizontal and vertical position;
3245 may not contain tabs or leaders.
3249 The escape sequences
3261 are interpreted in copy mode.
3264 Escape sequences starting with
3268 do not represent single character escape sequences, but introduce escape
3269 names with two or more characters.
3272 If a backslash is followed by a character that does not constitute a
3273 defined escape sequence, the backslash is silently ignored and the
3274 character maps to itself.
3277 .\" --------------------------------------------------------------------
3278 .SS "Special Characters"
3279 .\" --------------------------------------------------------------------
3281 [Note: `Special Characters' is a misnomer; those entities are (output)
3282 glyphs, not (input) characters.]
3285 Common special characters are predefined by escape sequences of the
3293 Some of these exist in the usual font while most of them are only
3294 available in the special font.
3296 Below you can find a selection of the most important glyphs; a complete
3297 list can be found in
3298 .BR groff_char (@MAN7EXT@).
3323 Printable double quote
3335 Printable backslash character
3367 .\" --------------------------------------------------------------------
3369 .\" --------------------------------------------------------------------
3371 Strings are defined by the
3373 request and can be retrieved by the
3378 Strings share their name space with macros.
3380 So strings and macros without arguments are roughly equivalent; it is
3381 possible to call a string like a macro and vice-versa, but this often
3382 leads to unpredictable results.
3384 The following string is the only one predefined in groff.
3388 The name of the current output device as specified by the
3390 command line option.
3393 .\" --------------------------------------------------------------------
3395 .\" --------------------------------------------------------------------
3397 Registers are variables that store a value.
3398 In groff, most registers store numerical values (see section
3399 .B NUMERICAL EXPRESSIONS
3400 above), but some can also hold a string value.
3403 Each register is given a name.
3404 Arbitrary registers can be defined and set with the
3409 The value stored in a register can be retrieved by the escape sequences
3414 Most useful are predefined registers.
3416 In the following the notation
3420 to make clear that we speak about registers.
3422 Please keep in mind that the
3424 decoration is not part of the register name.
3427 .\" --------------------------------------------------------------------
3428 .SS "Read-only Registers"
3429 .\" --------------------------------------------------------------------
3431 The following registers have predefined values that should not be
3432 modified by the user (usually, registers starting with a dot a
3435 Mostly, they provide information on the current settings or store
3436 results from request calls.
3443 Number of arguments in the current macro or string.
3447 Post-line extra line-space most recently utilized using
3456 is used; always\~1 in
3461 Within a macro, set to\~1 if macro called with the `normal' control
3462 character, and to\~0 otherwise.
3466 Current input line number.
3470 1\~if compatibility mode is in effect, 0\~otherwise.
3474 The depth of the last glyph added to the current environment.
3476 It is positive if the glyph extends below the baseline.
3480 The number of lines remaining to be centered, as set by the
3486 The height of the last glyph added to the current environment.
3488 It is positive if the glyph extends above the baseline.
3492 1\~if colors are enabled, 0\~otherwise.
3496 The skew of the last glyph added to the current environment.
3498 The skew of a glyph is how far to the right of the center of a glyph
3499 the center of an accent over that glyph should be placed.
3503 Current vertical place in current diversion; equal to
3508 The name or number of the current environment (string-valued).
3512 Current font number.
3516 The current font family (string-valued).
3520 The current (internal) real font name (string-valued).
3524 The number of the next free font position.
3528 Always 1 in GNU troff.
3530 Macros should use it to test if running under groff.
3534 Text base-line high-water mark on current page or diversion.
3538 Available horizontal resolution in basic units.
3542 The current font height as set with
3547 The current hyphenation language as set by the
3553 The number of immediately preceding consecutive hyphenated lines.
3557 The maximum allowed number of consecutive hyphenated lines, as set by
3564 The current hyphenation flags (as set by the
3570 The current hyphenation margin (as set by the
3576 The current hyphenation space (as set by the
3582 Current indentation.
3586 The indentation that applies to the current output line.
3590 Positive if last output line contains
3595 1\~if pairwise kerning is enabled, 0\~otherwise.
3599 Current line length.
3603 The current ligature mode (as set by the
3609 The current line-tabs mode (as set by the
3615 The line length that applies to the current output line.
3619 The title length (as set by the
3625 The current drawing color (string-valued).
3629 The current background color (string-valued).
3633 Length of text portion on previous output line.
3637 The amount of space that was needed in the last
3639 request that caused a trap to be sprung.
3641 Useful in conjunction with
3646 1\~if in no-space mode, 0\~otherwise.
3650 Current page offset.
3654 Current page length.
3658 1\~during page ejection, 0\~otherwise.
3662 The number of the next page: either the value set by a
3664 request, or the number of the current page plus\ 1.
3668 The current point size in scaled points.
3672 The last-requested point size in scaled points.
3676 The current post-vertical line spacing.
3680 The number of lines to be right-justified as set by the
3686 Current point size as a decimal fraction.
3690 The slant of the current font as set with
3695 The last requested point size in points as a decimal fraction
3700 The value of the parameters set by the first argument of the
3706 The value of the parameters set by the second argument of the
3712 The current font style (string-valued).
3716 Vertical distance to the next trap.
3727 A string representation of the current tab settings suitable for use
3728 as an argument to the
3734 The amount of vertical space truncated by the most recently sprung
3735 vertical position trap, or, if the trap was sprung by a
3737 request, minus the amount of vertical motion produced by
3740 Useful in conjunction with the
3745 Equal to 1 in fill mode and 0 in no-fill mode.
3749 Equal to 1 in safer mode and 0 in unsafe mode.
3753 Current vertical line spacing.
3757 Available vertical resolution in basic units.
3761 1\~if vertical position traps are enabled, 0\~otherwise.
3765 Width of previous glyph.
3769 The sum of the number codes of the currently enabled warnings.
3773 The major version number.
3777 The minor version number.
3781 The revision number of groff.
3785 Name of current diversion.
3789 Zoom factor for current font (in multiples of 1/1000th; zero if no
3794 .\" --------------------------------------------------------------------
3795 .SS "Writable Registers"
3796 .\" --------------------------------------------------------------------
3798 The following registers can be read and written by the user.
3799 They have predefined default values, but these can be modified for
3800 customizing a document.
3806 Current page number.
3810 Current input line number.
3814 Character type (set by width function
3819 Maximal width of last completed diversion.
3823 Height of last completed diversion.
3827 Current day of week (1-7).
3831 Current day of month (1-31).
3835 The number of hours past midnight.
3837 Initialized at start-up.
3841 Current horizontal position at input line.
3845 Lower left x-coordinate (in PostScript units) of a given PostScript
3851 Lower left y-coordinate (in PostScript units) of a given PostScript
3861 The number of minutes after the hour.
3863 Initialized at start-up.
3867 Current month (1-12).
3871 Vertical position of last printed text base-line.
3877 but takes account of the heights and depths of glyphs.
3883 but takes account of the heights and depths of glyphs.
3887 Depth of string below base line (generated by width function
3892 The number of seconds after the minute.
3894 Initialized at start-up.
3898 Right skip width from the center of the last glyph in the
3904 If greater than 0, the maximum number of objects on the input stack.
3906 If \[<=]0 there is no limit, i.e., recursion can continue until virtual
3907 memory is exhausted.
3911 The amount of horizontal space (possibly negative) that should be
3912 added to the last glyph before a subscript (generated by width
3918 Height of string above base line (generated by width function
3923 The return value of the
3925 function executed by the last
3931 Upper right x-coordinate (in PostScript units) of a given PostScript
3937 Upper right y-coordinate (in PostScript units) of a given PostScript
3943 The current year (year 2000 compliant).
3947 Current year minus 1900.
3949 For Y2K compliance use
3956 .\" --------------------------------------------------------------------
3958 .\" --------------------------------------------------------------------
3960 The differences of the groff language in comparison to classical troff
3964 .BR groff_diff (@MAN7EXT@).
3967 The groff system provides a compatibility mode, see
3968 .BR groff (@MAN1EXT@)
3969 on how to invoke this.
3972 .\" --------------------------------------------------------------------
3974 .\" --------------------------------------------------------------------
3977 .MT bug-groff@gnu.org
3978 groff bug mailing list
3980 Include a complete, self-contained example that will allow the bug to
3981 be reproduced, and say which version of groff you are using.
3984 .\" --------------------------------------------------------------------
3986 .\" --------------------------------------------------------------------
3988 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
3989 Free Software Foundation, Inc.
3992 This document is distributed under the terms of the FDL (GNU Free
3993 Documentation License) version 1.3 or later.
3995 You should have received a copy of the FDL on your system, it is also
3996 available on-line at the
3997 .UR http://\:www.gnu.org/\:copyleft/\:fdl.html
4002 This document is part of
4004 the GNU roff distribution.
4016 .\" --------------------------------------------------------------------
4018 .\" --------------------------------------------------------------------
4021 The main source of information for the groff language is the
4026 Besides the gory details, it contains many examples.
4029 .BR groff (@MAN1EXT@)
4030 the usage of the groff program and pointers to the documentation and
4031 availability of the groff system.
4034 .BR groff_diff (@MAN7EXT@)
4035 the differences of the groff language as compared to classical roff.
4037 This is the authoritative document for the predefined language
4038 elements that are specific to groff.
4041 .BR groff_char (@MAN7EXT@)
4042 the predefined groff special characters (glyphs).
4045 .BR groff_font (@MAN5EXT@)
4046 the specification of fonts and the DESC file.
4049 .BR roff (@MAN7EXT@)
4050 the history of roff, the common parts shared by all roff systems, and
4051 pointers to further documentation.
4055 .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:54.ps.gz
4056 Nroff/\:Troff User's Manual by Ossanna & Kernighan
4058 \[em] the bible for classical troff.
4062 .\" --------------------------------------------------------------------
4064 .\" --------------------------------------------------------------------
4066 .\" Local Variables: