5 This file is part of groff, the GNU roff type-setting system.
7 Copyright (C) 2000 Free Software Foundation, Inc.
8 written by Bernd Warken <bwarken@mayn.de>
10 Last update: 17 May 2000
12 Permission is granted to copy, distribute and/or modify this document
13 under the terms of the GNU Free Documentation License, Version 1.1 or
14 any later version published by the Free Software Foundation; with the
15 Invariant Sections being this .ig-section and AUTHOR, with no
16 Front-Cover Texts, and with no Back-Cover Texts.
18 A copy of the Free Documentation License is included as a file called
19 FDL in the main directory of the groff source package.
22 .\" --------------------------------------------------------------------
24 .\" --------------------------------------------------------------------
37 .\" a comment macro which does nothing
46 .c text lines in macro definitions or bracketed sections \{...\}
52 . ds @tmp@ \f(CB\$1\fP
58 .als shellcommand option
60 .c --------- characters ---------
63 . ds @tmp@ \f(CB\$1\fP
70 . ds @tmp@ \(oq\f(CB\$1\fP\(cq
77 . ds @tmp@ \(lq\f(CB\$1\fP\(rq
83 .c --------- requests ---------
89 . IP "\f(CB\&\*[@tmp@] \fP\f(CI\&\$*\fP" 10n
94 . ds @tmp@ \f(CB\$1\fP
100 .c --------- macro or function arguments ---------
103 . ds @tmp@ \f(CI\$1\fP
105 . while (\n[.$] >= 2) \{\
106 . as @tmp@ \/\f(CR\$1\fP\f(CI\,\$2\fP
109 . if \n[.$] .as @tmp@ \/\f(CR\$1\fP
114 .c argument followed by a numerical expression
116 . ds @tmp@ \f(CI\$1\fP\|\f(CR\$2\fP
122 .c --------- numerical elements ---------
125 . ds @tmp@ \f(CR\$1\fP
132 . ds @tmp@ \&\$1\ \f(CR\$2\fP
138 .als scaleindicator request
141 . ds @tmp@ \f(CR\$1\fP\f(CB\$2\fP
148 . ds @tmp@ \(oq\f(CB\$1\fP\(cq
154 .c --------- escape sequences ---------
157 . ds @tmp@ \f(CB\(rs\$1[\fP\f(CI\$2\fP\f(CB]\fP
164 . ds @tmp@ \f(CB\(rs\$1(\fP\f(CI\$2\fP
171 . ds @tmp@ \f(CB\(rs\$1\fP\f(CI\$2\fP
178 . ds @tmp@ \f(CB\(rs[\fP\f(CI\$1\fP\f(CB]\fP
185 . ds @tmp@ \f(CB\(rs(\fP\f(CI\$1\fP
192 . ds @tmp@ \f(CB\(rs\$1\fP
199 . ds @tmp@ \f(CB\(rs(\$1\fP
206 . ds @tmp@ \f(CB\(rs[\$1]\fP
212 .c escape sequence synopsis
216 . IP "\f(CB\(rs\&\*[@tmp@]\fP\f(CI\&\$*\fP"
220 .c synopsis for escape sequences with a long name
225 . IP "\f(CB\(rs\&\*[@arg1@][\fP\f(CI\&\*[@arg2@]\fP\f(CB]\&\$*\fP"
230 .c synopsis escape sequence with quoted argument
234 . IP "\f(CB\(rs\&\*[@tmp@]\(cq\fP\f(CI\h'-0.2m'\$*\/\fP\f(CB\(cq\fP"
238 .c synopsis for 2-escapes (special characters)
242 . text \f(CB\(rs(\&\*[@tmp@]\ \ \ \fP\fR\(\*[@tmp@]\fP
248 .c --------- registers ---------
250 .c synopsis for registers
253 . text \&\f(CR\(rsn[\fP\f(CB\$1\fP\f(CR]\fP
258 .als register request
260 .c --------- warnings ---------
264 .c description of warnings
275 .\" --------------------------------------------------------------------
277 .\" --------------------------------------------------------------------
279 .TH GROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
281 groff \- a short reference for the GNU roff language
283 .\" --------------------------------------------------------------------
285 .\" --------------------------------------------------------------------
289 and is the free implementation of the roff type-setting system.
292 for a survey and the background of the groff system.
294 This document gives only short descriptions of the predefined roff
295 language elements as used in groff.
296 Both the classical features and the groff extensions are provided.
303 is compatible with the classical system and provides proper extensions.
309 could be used as synonyms.
312 slightly tends to refer more to the classical aspects, whereas
314 emphasizes the GNU extensions, and
316 is the general term for the language.
318 This file is only a short version of the complete documentation that is
322 file, which contains more detailed, actual, and concise information.
324 The general syntax for writing groff documents is relatively easy, but
325 writing extensions to the roff language can be a bit harder.
327 The roff language is line-oriented.
328 There are only two kinds of lines, control lines and text lines.
329 The control lines start with a control character, by default a period
333 all other lines are text lines.
336 represent commands, optionally with arguments.
337 They have the following syntax.
338 The leading control character can be followed by a command name;
339 arguments, if any, are separated by blanks from the command name and
340 among themselves, for example,
343 \&\.command_name arg1 arg2
346 For indentation, any number of space or tab characters can be inserted
347 between the leading control character and the command name, but the control
348 character must be on the first position of the line.
351 represent the parts that will be printed.
352 They can be modified by escape sequences, which are recognized by a
355 These are in-line or even in-word formatting elements or functions.
356 Some of these take arguments separated by single quotes
358 others are regulated by a length encoding introduced by an open
361 or enclosed in brackets
366 The roff language provides flexible instruments for writing language
367 extension, such as macros.
368 When interpreting macro definitions, the roff system enters a special
369 operating mode, called the
372 The copy mode behavior can be quite tricky, but there are some rules
373 that ensure a safe usage.
375 Printable backslashes must be denoted as
379 represents the current escape character.
380 To get a backslash glyph, use
383 Double all backslashes.
385 Begin all text lines with the special non-spacing character
388 This does not produce the most efficient code, but it should work as a
390 For better strategies, see the groff info file and
391 .BR groff_tmac (@MAN5EXT@).
393 Reading roff source files is easier, just reduce all double backslashes
394 to a single one in all macro definitions.
396 .\" --------------------------------------------------------------------
398 .\" --------------------------------------------------------------------
399 The roff language elements add formatting information to a text file.
400 The fundamental elements are predefined commands and variables that make
401 roff a full-blown programming language.
403 There are two kinds of roff commands, possibly with arguments.
405 are written on a line of their own starting with a dot
411 are in-line functions and in-word formatting elements starting with a
415 The user can define her own formatting commands using the
417 request. These commands are called
419 but they are used exactly like requests. Macro packages are pre-defined
420 sets of macros written in the groff language.
421 A user's possibilities to create escape sequences herself is very
422 limited, only special characters can be mapped.
424 The groff language provides several kinds of variables with
425 different interfaces.
426 There are pre-defined variables, but the user can define her own
430 variables store character sequences.
431 They are set with the
433 request and retrieved by the
438 variables can store numerical values, numbers with a scale unit, and
439 occasionally string-like objects.
440 They are set with the
442 request and retrieved by the
447 allow the user to temporarily store global formatting parameters like
448 line length, font size, etc. for later reuse.
454 are identified either by a name or by an internal number.
455 The current font is chosen by the
460 Each device has special fonts, but the following fonts are available for
463 is the standard font Roman.
472 is everywhere available, but on text devices, it is displayed as an
473 underlined Roman font.
474 For the graphical output devices, there exist constant-width pendants of
480 On text devices, all characters have a constant width anyway.
482 Moreover, there are some advanced roff elements.
485 stores information into a macro for later usage.
488 is a positional condition like a certain number of lines from page top
489 or in a diversion or in the input.
490 Some action can be prescribed to be run automatically when the condition
493 More detailed information can be found in the groff info file.
495 .\" --------------------------------------------------------------------
496 .SH "CONTROL CHARACTERS"
497 .\" --------------------------------------------------------------------
498 There is a small set of characters that have a special controlling task
499 in certain conditions.
502 A dot is only special at the beginning of a line or after the
503 condition in the requests
509 There it is the control character that introduces a request (or macro).
510 The special behavior can be delayed by using the
515 request, the control character can be set to a different character,
518 a non-special character.
520 In all other positions, it just means a dot character.
521 In text paragraphs, it is advantageous to start each sentence at a line
525 The single quote has two controlling tasks. At the beginning of a line
526 and in the conditional requests it is the non-breaking control
528 That means that it introduces a request like the dot, but with the
529 additional property that this request doesn't cause a linebreak.
532 request, the non-break control character can be set to a different
535 As a second task, it is the most commonly used argument separator in
536 some functional escape sequences (but any pair of characters not part
537 of the argument will work).
538 In all other positions, it denotes the single quote or apostrophe
540 Groff provides a printable representation with the
545 The double quote is used to enclose arguments in requests and macros.
546 The escaped double quote
548 introduces a comment.
549 Otherwise, it is not special.
550 Groff provides a printable representation with the
555 The backslash usually introduces an escape sequence (this can be
559 A printed version of the escape character is the
561 escape; a backslash glyph can be obtained by
565 The open parenthesis is only special in escape sequences when
566 introducing an escape name or argument consisting of exactly two
568 In groff, this behavior can be replaced by the \f(CB[]\fP construct.
571 The opening bracket is only special in groff escape sequences; there it
572 is used to introduce a long escape name or long escape argument.
573 Otherwise, it is non-special, e.g. in macro calls.
576 The closing bracket is only special in groff escape sequences; there it
577 terminates a long escape name or long escape argument.
578 Otherwise, it is non-special.
581 Space characters are only functional characters. They separate the
582 arguments in requests or macros, and the words in text lines.
583 They are subject to groff's horizontal spacing calculations.
584 To get a defined space width, escape sequences like
586 (this is the escape character followed by a space),
593 In text paragraphs, newlines mostly behave like space characters.
594 Continuation lines can be specified by an escaped newline, i.e., by
595 specifying a backslash
597 as the last character of a line.
599 If a tab character occurs during text the interpreter makes a horizontal
600 jump to the next pre-defined tab position.
601 There is a sophisticated interface for handling tab positions.
603 .\" --------------------------------------------------------------------
604 .SH "NUMERICAL EXPRESSIONS"
605 .\" --------------------------------------------------------------------
608 is a signed or unsigned integer or float with or without an appended
612 is a one-character abbreviation for a unit of measurement.
613 A number followed by a scale indicator signifies a size value.
614 By default, numerical values do not have a scale indicator, i.e., they are
617 The roff language defines the following scale indicators.
626 P@Pica\ \(eq\ 1/6\ inch
627 p@Point\ \(eq\ 1/72\ inch
629 Em\ \(eq\ \fRthe font size in points (width of letter `\f(CRm\fR')
631 M@100th \fRof an \f(CREm
633 u@\fRBasic unit for actual output device
634 v@\fRVertical line space in basic units
636 scaled point\ \(eq\ 1/\f(CIsizescale\fR of a point (defined in
637 font \fIDESC\fP file)
643 .B Numerical expressions
644 are combinations of the numerical values defined above with
645 the arithmetical operators
652 the comparative operators
660 the logical operators
674 added the following operators for numerical expressions:
681 e1\f(CB>?\fPe2@The maximum of \f(CIe1\fP and \f(CIe2\fP.
682 e1\f(CB<?\fPe2@The minimum of \f(CIe1\fP and \f(CIe2\fP.
683 \f(CB(\fPc\f(CB;\fPe\f(CB)@T{
684 Evaluate \f(CIe\fP using \f(CIc\fP as the default scaling
691 For details see the groff info file.
693 .\" --------------------------------------------------------------------
695 .\" --------------------------------------------------------------------
697 occur in tests raised by the
703 The following table characterizes the different types of conditions.
711 A numerical expression \f(CIN\fP yields true if its value
715 True if the value of \f(CIN\fP is\ \f(CR\(<=0\fP.
717 \&'\f(CIs1\fP'\f(CIs2\fP'@T{
718 True if string\ \f(CIs1\fP is identical to string\ \f(CIs2\fP.
720 !'\f(CIs1\fP'\f(CIs2\fP'@T{
721 True if string\ \f(CIs1\fP is not identical to string\ \f(CIs2\fP.
724 True if there is a character\ \f(CIch\fP available.
727 True if there is a string, macro, diversion, or request
730 e@Current page number is even.
731 o@Current page number is odd.
732 n@Formatter is \fBnroff\fP.
734 True if there is a register named \f(CIreg\fP.
736 t@Formatter is \fBtroff\fR.
742 .\" --------------------------------------------------------------------
744 .\" --------------------------------------------------------------------
745 This section provides a short reference for the predefined requests.
746 In groff, request and macro names can be arbitrarily long.
747 No bracketing or marking of long names is needed.
749 Most requests take one or more arguments.
750 The arguments are separated by space characters (no tabs!); there is no
751 inherent limit for their length or number.
752 An argument can be enclosed by a pair of double quotes: This is very handy
753 if an argument contains space characters, e.g.,
754 .argument "\(dqarg\ with\ space\(dq"
755 denotes a single argument.
757 Some requests have optional arguments with a different behaviour.
758 Not all of these details are outlined here.
759 Refer to the groff info file for all details.
761 In the following request specifications, most argument names were chosen
763 Only the following denotations need clarification.
770 c@denotes a single character.
772 a font either specified as a font name or a font number.
775 all characters up to the end of the line or within \f(CB\(rs{\fP
779 is a numerical expression that evaluates to an integer value.
782 is an arbitrary numerical expression, signed or unsigned.
785 has three meanings depending on its sign, described below.
791 If an expression defined as
795 sign the resulting value of the expression will be added to an already
796 existing value inherent to the related request, e.g. adding to a number
798 If the expression starts with a
800 the value of the expression will be subtracted from the request value.
804 replaces the existing value directly.
805 To assign a negative number either prepend\ \c
807 or enclose the negative number in parentheses.
809 .\" --------------------------------------------------------------------
810 .SS "REQUEST SHORT REFERENCE"
811 .\" --------------------------------------------------------------------
815 Empty line, ignored. Useful for structuring documents.
817 .REQ .\(rs\(dq anything
818 Complete line is a comment.
823 on standard error, exit program.
826 Begin line adjustment for output lines in current adjust mode.
829 Start line adjustment in mode
831 (\f(CIc\fP\f(CR\|\^\(eq\|l,r,b,n\fP).
838 (\f(CIc\fP\f(CR\|\^\(eq\|l,i,I,a,A\fP).
840 .REQ .aln alias register
841 Create alias name for
844 .REQ .als alias object
845 Create alias name for request, string, macro, or diversion
862 .REQ .as stringvar anything
866 .argument stringvar .
868 .REQ .asciify diversion
869 Unformat special ASCII characters in
870 .argument diversion .
873 Print a backtrace of the input on stderr.
883 Embolden Special Font
889 Eject current page and begin new page.
892 Eject current page; next page number
896 Set the blank line macro to
903 Break out of a while loop.
906 Reset no-break control character to
910 Set no-break control character to
914 Reset control character to
918 Set control character to
922 Center the next input line.
930 Copy contents of file
932 unprocessed to stdout or to the diversion.
934 .REQ .cflags mode c1 c2 ...
950 .REQ .char c anything
957 Chop the last character off macro, string, or diversion
965 Finish the current iteration of a while loop.
968 Enable compatibility mode.
973 is zero disable compatibility mode, otherwise enable it.
976 Set constant character width mode for
984 Continuous underline in nroff, like
1007 End current diversion.
1016 with compatibility mode enabled.
1018 .REQ .ds stringvar anything
1022 .argument anything .
1025 Set diversion trap to position
1027 (default scale indicator\ \c
1028 .scaleindicator v ).
1031 Reset escape character to
1035 Set escape character to
1039 Else part for if-else (\c
1046 will be run after the end of input.
1049 Turn off escape character mechanism.
1052 Switch to previous environment.
1055 Push down environment number or name
1060 Copy the contents of environment
1062 to the current environment.
1063 No pushing or popping.
1066 Exit from roff processing.
1069 Set the current font family to
1073 Disable field mechanism.
1076 Set field delimiter to
1078 and pad character to space.
1080 Set field delimiter to
1082 and pad character to
1089 Flush output buffer.
1097 .REQ .fp n internal external
1098 Mount font with long
1105 .REQ .fspecial font s1 s2...
1106 When the current font is
1115 Return to previous font.
1119 Change to font name or number
1125 .REQ .ftr font1 font2
1132 Remove additional hyphenation indicator character.
1135 Set up additional hyphenation indicator character\ \c
1138 .REQ .hcode c1 code1 c2 code2 ...
1139 Set the hyphenation code of character
1150 Set the current hyphenation language to
1154 Set the maximum number of consecutive hyphenated lines to
1158 Read hyphenation patterns from
1164 with exceptional hyphenation.
1167 Switch to hyphenation mode
1171 Set the hyphenation margin to
1173 (default scale indicator\ \c
1174 .scaleindicator m ).
1177 Set the hyphenation space to
1180 .REQ .ie cond anything
1188 .REQ .if cond anything
1192 .argument anything ;
1193 otherwise do nothing.
1205 Change to previous indent value.
1208 Change indent according to
1210 (default scale indicator\ \c
1211 .scaleindicator m ).
1214 Set an input-line count trap at position
1218 Enable pairwise kerning.
1223 is zero, disable pairwise kerning, otherwise enable it.
1226 Remove leader repetition character.
1229 Set leader repetition character to\ \c
1232 .REQ .length register anything
1233 Write the length of the string
1236 .argument register .
1239 Set input line number to
1249 Change to previous line length.
1252 Set line length according to
1255 .scalednumber 6.5 i ,
1256 default scale indicator\ \c
1257 .scaleindicator m ).
1260 Change to the previous value of additional intra-line skip.
1263 Set additional intra-line skip value to
1267 blank lines are inserted after each text output line.
1270 Length of title (default scale indicator\ \c
1271 .scaleindicator m ).
1274 Margin character off.
1279 after each text line at actual distance from right margin.
1282 Set margin character to
1286 from right margin (default scale indicator\ \c
1287 .scaleindicator m ).
1290 Mark current vertical position in
1291 .argument register .
1294 The same as the .so request except that
1296 is also searched in the tmac directories.
1299 No output-line adjusting.
1302 Need a one-line vertical space.
1307 vertical space (default scale indicator\ \c
1308 .scaleindicator v ).
1311 No filling or adjusting of output-lines.
1319 .REQ .nm \(+-N M S I
1320 In line number mode, set number, multiple, spacing, and indent.
1323 Do not number next line.
1330 .REQ .nr register \(+-N M
1339 Make the built-in condition
1346 Turn no-space mode on.
1351 .REQ .open stream filename
1354 for writing and associate the stream named
1358 .REQ .opena stream filename
1364 Output vertical distance that was saved by the
1369 Reset page number character to\ \c
1373 Page number character.
1381 Set page length to default
1382 .scalednumber 11 i .
1383 The current page length is stored in
1387 Change page length to
1389 (default scale indicator\ \c
1390 .scaleindicator v ).
1393 Print macro names and sizes (number of blocks of 128 bytes).
1396 Print only total of sizes of macros (number of 128 bytes blocks).
1403 Print the names and contents of all currently defined number registers
1407 Change to previous page offset. The current page offset is available in
1415 Return to previous point-size.
1421 Get the bounding box of a PostScript image
1422 .argument filename .
1425 This behaves like the
1427 request except that input comes from the standard output of
1431 Print the names and positions of all traps (not including input line
1432 traps and diversion traps) on stderr.
1434 .REQ .rchar c1 c2...
1435 Remove the definitions of characters
1444 Right justify the next
1449 Remove request, macro, or string
1453 Rename request, macro, or string
1466 .argument register .
1469 Restore spacing; turn no-space mode off.
1474 to marked vertical place (default scale indicator\ \c
1475 .scaleindicator v ).
1478 Reset soft hyphen character to
1482 Set the soft hyphen character to
1486 In a macro, shift the arguments by
1491 Include source file.
1494 Skip one line vertically.
1497 Space vertical distance
1499 up or down according to sign of
1501 (default scaling indicator\ \c
1502 .scaleindicator v ).
1504 .REQ .special s1 s2 ...
1508 etc. are special and will be searched for characters not in the current font.
1511 Space-character size set to
1513 of the spacewidth in the current font.
1516 Space-character size set to
1518 and sentence space size set to
1520 of the spacewidth in the current font (\f(CR\(eq1/3 em\fP).
1528 .REQ .substring register n1 n2
1529 Replace the string in
1531 with the substring defined by the indices
1542 Save the vertical distance
1544 for later output with
1548 .REQ .sy command-line
1550 .argument command-line .
1553 Set tabs after every position that is a multiple of
1555 (default scaling indicator\ \c
1556 .scaleindicator m ).
1557 .REQ .ta n1 n2 ... nn \f(CBT\fP r1 r2 ... rn
1558 Set tabs at positions
1569 .argument nn + rn + r1 ,
1570 .argument nn + rn + r2 ,
1572 .argument nn + rn + rn ,
1576 .\"Restore internally saved tab positions.
1579 .\"Save tab positions internally.
1582 Remove tab repition character.
1584 Set tab repetition character to\ \c
1588 Temporary indent next line (default scaling indicator\ \c
1589 .scaleindicator m ).
1591 .REQ .tkf font s1 n1 s2 n2
1592 Enable track kerning for
1595 .REQ .tl \f(CB\(cq\fPleft\f(CB\(cq\fPcenter\f(CB\(cq\fPright\f(CB\(cq\fP
1599 Transparently output the contents of file
1600 .argument filename .
1605 on terminal (UNIX standard message output).
1618 This is the same as the
1620 request except that the translations do not apply to text that is
1621 transparently throughput into a diversion with
1625 Make the built-in condition
1632 Underline font set to
1634 (to be switched to by
1638 Underline (italicize in troff)
1643 Enable vertical position traps if
1645 is non-zero, disable them otherwise.
1648 Change to previous vertical base line spacing.
1651 Set vertical base line spacing to
1654 .scalednumber 12 p .
1657 Set warnings code to
1661 Set location trap; negative means from page bottom.
1663 .REQ .while cond anything
1670 .REQ .write stream anything
1678 Besides these standard groff requests, there might be further macro
1680 They can originate from a macro package (see
1681 .BR roff (@MAN7EXT@)
1682 for an overview) or from a preprocessor.
1684 Preprocessor macros are easy to be recognized. They enclose their code
1685 into a pair of characteristic macros.
1688 box, center, tab (@);
1691 preprocessor@start macro@ end macro
1698 soelim@\fInone@\fInone
1703 .\" --------------------------------------------------------------------
1704 .SH "ESCAPE SEQUENCES"
1705 .\" --------------------------------------------------------------------
1707 Escape sequences are in-line language elements usually introduced by
1710 and followed by an escape name and sometimes by a required argument.
1711 Input processing is continued directly after the escaped character or
1712 the argument resp. without an intervening separation character.
1713 So there must be a way to determine the end of the escape name and the end
1716 This is done by enclosing names (escape name and arguments consisting of
1717 a variable name) by a pair of brackets
1719 and constant arguments (number expressions and characters) by apostrophes
1721 .IR \(cqconstant\(cq .
1723 There are abbreviations for short names.
1724 Two character escape names can be specified by an opening parenthesis like
1726 without a closing counterpart.
1727 And all one-character names different from the special characters
1731 can even be specified without a marker in the form
1734 Constant arguments of length
1736 can omit the marker apostrophes, too, but there is no two-character
1739 While 1-character escape sequences are mainly used for in-line functions
1740 and system related tasks, the 2-letter names following the
1742 construct are used for special characters predefined by the roff system.
1743 Names with more than two characters
1745 mostly denote user defined named characters (see the
1749 .\" --------------------------------------------------------------------
1750 .SS "SINGLE CHARACTER ESCAPES"
1751 .\" --------------------------------------------------------------------
1755 .\" --------- comments ---------
1758 Beginning of a comment.
1759 Everything up to the end of the line is ignored.
1762 Everything up to and including the next newline is ignored.
1763 This is interpreted in copy mode.
1766 except the ignoring of the terminating newline.
1768 .\" --------- strings ---------
1771 The string stored in the string variable with 1-character name
1775 The string stored in the string variable with 2-character name
1779 The string stored in the string variable with arbitrary length name
1780 .argument stringvar .
1782 .\" --------- macro arguments ---------
1785 The name by which the current macro was invoked. The
1787 request can make a macro have more than one name.
1790 Macro argument with 1-place number
1794 is a digit between 1 and 9.
1797 Macro argument with 2-digit number
1801 Macro argument with number
1805 is a numerical expression evaluating to an integer \(>=1.
1808 In a macro, the concatenation of all the arguments separated by spaces.
1811 In a macro, the concatenation of all the arguments with each surrounded
1812 by double quotes, and separated by spaces.
1814 .\" --------- escaped characters ---------
1817 reduces to a single backslash; useful to delay its interpretation as
1818 escape character in copy mode.
1819 For a printable backslash, use
1823 The acute accent \(aa; same as
1825 Unescaped: apostrophe, right quotation mark, single quote (ASCII 0x27).
1828 The grave accent \(ga; same as
1830 Unescaped: left quote, backquote (ASCII 0x60).
1833 The \- sign in the current font.
1836 An uninterpreted dot (period), even at start of line.
1839 Default optional hyphenation character.
1842 Transparent line indicator.
1844 .ESC ? anything\fB?\fP
1845 In a diversion, this will transparently embed
1849 is read in copy mode.
1850 See also the escape sequences
1856 .\" --------- spacing ---------
1859 Unpaddable space-size space character (no line break).
1865 1/6\ em narrow space character; zero width in nroff.
1868 1/12\ em half-narrow space character; zero width in nroff.
1871 Non-printable, zero width character.
1876 except that it behaves like a character declared with the cflags
1877 request to be transparent for the purposes of end of sentence
1881 Increases the width of the preceding character so that the spacing
1882 between that character and the following character will be correct if
1883 the following character is a roman character.
1886 Modifies the spacing of the following character so that the spacing
1887 between that character and the preceding character will correct if the
1888 preceding character is a roman character.
1891 Unbreakable space that stretches like a normal inter-word space when a
1895 Ignored newline, for continuation lines.
1897 .\" --------- structuring ---------
1900 Begin conditional input.
1903 End conditional input.
1905 .\" --------- longer escape names ---------
1908 The special character with 2-character name
1911 .BR "SPECIAL CHARACTERS" .
1914 The named character with arbitrary length name
1917 .\" --------- alphabetical escapes ---------
1920 Non-interpreted leader character.
1925 acceptable as name of a string, macro, diversion, register,
1926 environment or font it is
1932 Bracket building function.
1935 Interrupt text processing.
1938 The character called
1942 but compatible to other roff versions.
1945 Forward (down) 1/2 em vertical unit (1/2 line in nroff).
1948 Draw a graphical element defined by the characters in
1950 see groff info file for details.
1953 Printable version of the current escape character.
1956 Equivalent to an escape character, but is not interpreted in copy-mode.
1959 Change to font with 1-character name or 1-digit number
1963 Change to font with 2-characer name or 2-digit number
1967 Change to font with arbitrary length name or number expression
1971 Return format of register with name
1981 Local horizontal motion; move right
1986 Set height of current font to
1990 Mark horizontal input place in register with arbitrary length name
1998 Horizontal line drawing function (optionally using character
2002 Vertical line drawing function (optionally using character
2006 The numerical value stored in the register variable with the 1-character
2011 The numerical value stored in the register variable with the 2-character
2016 The numerical value stored in the register variable with arbitrary
2021 Typeset the character with code
2023 in the current font, no special fonts are searched. Useful for adding
2024 characters to a font using the
2029 Overstrike characters
2036 Break and spread output line.
2039 Reverse 1\ em vertical motion (reverse line in nroff).
2048 Set the point size to
2050 scaled points. Note the alternative forms
2051 .BI \(rss \(+- [ N ]\c
2053 .BI \(rss' \(+-N '\c
2055 .BI \(rss \(+- ' N '\c
2058 .BI \(rss \(+- ( xy\c
2071 Non-interpreted horizontal tab.
2074 Reverse (up) 1/2 em vertical motion (1/2 line in nroff).
2077 Local vertical motion; move down
2082 The contents of the environment variable
2090 The width of the character sequence
2094 Extra line-space function (negative before, positive after).
2099 as device control function.
2102 Output string variable or macro
2104 uninterpreted as device control function.
2113 with zero width (without spacing).
2118 and then restore the horizontal and vertical position;
2120 may not contain tabs or leaders.
2123 The escape sequences
2135 are interpreted in copy mode.
2137 Escape sequences starting with
2141 do not represent single character escape sequences, but introduce escape
2142 names with two or more characters.
2144 If a backslash is followed by a character that does not constitute a
2145 defined escape sequence the backslash is silently ignored and the
2146 character maps to itself.
2148 .\" --------------------------------------------------------------------
2149 .SS "SPECIAL CHARACTERS"
2150 .\" --------------------------------------------------------------------
2151 Common special characters are predefined by escape sequences of the form
2157 Some of these exist in the usual font while most of them are only
2158 available in the special font. Below you'll find a selection of the most
2159 important glyphs; a complete list can be found in
2160 .BR groff_char (@MAN7EXT@).
2168 .ESc dd Double dagger
2173 .ESc rg Registered sign
2174 .ESc sc Section sign
2175 .ESc ul Underline character
2177 .ESc >= Larger or equal
2178 .ESc <= Less or equal
2182 .ESc +- Plus-minus sign
2186 .\" --------------------------------------------------------------------
2188 .\" --------------------------------------------------------------------
2189 Registers are variables that store a value.
2190 In groff, most registers store numerical values (see section
2191 .B NUMERICAL EXPRESSIONS
2192 above), but some can also hold a string value.
2194 Each register is given a name.
2195 Arbitrary registers can be defined and set with the request
2197 .argument register .
2199 The value stored in a register can be retrieved by the escape sequences
2203 Most useful are predefined registers.
2204 In the following the notation
2206 is used to refer to a register called
2208 to make clear that we speak about registers.
2209 Please keep in mind that the
2211 decoration is not part of the register name.
2213 .\" --------------------------------------------------------------------
2214 .SS "READ-ONLY REGISTERS"
2215 .\" --------------------------------------------------------------------
2216 The following registers have predefined values that should not be
2217 modified by the user (usually, registers starting with a dot a read-only).
2218 Mostly, they provide information on the current settings or store results
2222 .REG .$ Number of arguments in the current macro.
2234 .REG .H Available horizontal resolution in basic units.
2241 .REG .V Available vertical resolution in basic units.
2243 Post-line extra line-space most recently utilized using
2245 .REG .C 1 if compatibility mode is in effect, 0 otherwise.
2246 .REG .c Current input line number.
2248 The depth of the last character added to the current environment.
2249 It is positive if the character extends below the baseline.
2251 The number of lines remaining to be centered, as set by the
2255 The height of the last character added to the current environment.
2256 It is positive if the character extends above the baseline.
2258 The skew of the last character added to the current environment.
2259 The skew of a character is how far to the right of the center of a character
2260 the center of an accent over that character should be placed.
2262 Current vertical place in current diversion; equal to register
2264 .REG .ev The name or number of the current environment (string-valued).
2265 .REG .f Current font number.
2266 .REG .fam The current font family (string-valued).
2267 .REG .fp The number of the next free font position.
2269 Always 1 in GNU troff.
2270 Macros should use it to test if running under groff.
2271 .REG .h Text base-line high-water mark on current page or diversion.
2273 The current hyphenation language as set by the
2277 The number of immediately preceding consecutive hyphenated lines.
2279 The maximum allowed number of consecutive hyphenated lines, as set by
2284 The current hyphenation flags (as set by the
2288 The current hyphenation margin (as set by the
2292 The current hyphenation space (as set by the
2295 .REG .i Current ident.
2296 .REG .in The indent that applies to the current output line.
2299 if pairwise kerning is enabled,
2302 .REG .l Current line length.
2304 The current ligature mode (as set by the
2307 .REG .ll The line length that applies to the current output line.
2309 The title length (as set by the
2312 .REG .n Length of text portion on previous output line.
2314 The amount of space that was needed in the last
2316 request that caused a trap to be sprung.
2317 Useful in conjunction with
2319 .REG .o Current page offset.
2320 .REG .p Current page length.
2322 The number of the next page: either the value set by a
2324 request, or the number of the current page plus\ 1.
2325 .REG .ps The current pointsize in scaled points.
2326 .REG .psr The last-requested pointsize in scaled points.
2328 The number of lines to be right-justified as set by the rj request.
2329 .REG .s Current point size as a decimal fraction.
2331 The last requested pointsize in points as a decimal fraction
2333 .REG .t Distance to the next trap.
2335 A string representation of the current tab settings suitable for use as
2340 The amount of vertical space truncated by the most recently sprung
2341 vertical position trap, or, if the trap was sprung by a
2343 request, minus the amount of vertical motion produced by
2346 In other words, at the point a trap is sprung, it represents the difference
2347 of what the vertical position would have been but for the trap, and what the
2348 vertical position actually is.
2349 Useful in conjunction with the
2353 The value of the parameters set by the first argument of the
2357 The value of the parameters set by the second argument of the
2360 .REG .u Equal to 1 bin fill mode and 0 in nofill mode.
2361 .REG .v Current vertical line spacing.
2364 if vertical position traps are enabled,
2367 .REG .w Width of previous character.
2369 The sum of the number codes of the currently enabled warnings.
2370 .REG .x The major version number.
2371 .REG .y The minor version number.
2372 .REG .Y The revision number of groff.
2373 .REG .z Name of current diversion.
2375 Lower left x-coordinate (in PostScript units) of a given PostScript
2379 Lower left y-coordinate (in PostScript units) of a given PostScript
2384 but takes account of the heights and depths of characters.
2388 but takes account of the heights and depths of characters.
2390 Depth of string below base line (generated by width function
2393 Right skip width from the center of the last character in the
2397 The amount of horizontal space (possibly negative) that should be added
2398 to the last character before a subscript (generated by width function
2401 Height of string above base line (generated by width function
2404 Upper right x-coordinate (in PostScript units) of a given PostScript
2408 Upper right y-coordinate (in PostScript units) of a given PostScript
2413 .\" --------------------------------------------------------------------
2414 .SS "WRITABLE REGISTERS"
2415 .\" --------------------------------------------------------------------
2416 The following registers can be read and written by the user.
2417 They have predefined default values, but these can be modified for
2418 customizing a document.
2421 .REG % Current page number.
2422 .REG c. Current input line number.
2423 .REG ct Character type (set by width function
2425 .REG dl Maximal width of last completed diversion.
2426 .REG dw Current day of week (1-7).
2427 .REG dy Current day of month (1-31).
2428 .REG hp Current horizontal position at input line.
2429 .REG ln Output line number.
2430 .REG mo Current month (1-12).
2431 .REG nl Vertical position of last printed text base-line.
2433 If greater than 0, the maximum number of objects on the input stack.
2434 If \(<=0 there is no limit, i.e., recursion can continue until virtual
2435 memory is exhausted.
2437 The return value of the
2439 function executed by the last
2442 .REG year The current year (year 2000 compliant).
2444 Current year minus 1900. For Y2K compliance use register
2449 .\" --------------------------------------------------------------------
2451 .\" --------------------------------------------------------------------
2452 Each warning generated by groff is identified by a name and a code
2453 number. The codes are powers of 2 to allow bit-encoding with a single
2454 integer. There are also names that can be used to refer to groups of
2457 The name associated with a warning is used by the
2462 the number code is used by the
2475 Intended to cover all warnings with traditional macro packages.
2477 In fill mode, lines which could not be broken so that their length was
2478 less than the line length. This is enabled by default.
2480 Non-existent characters. This is enabled by default.
2482 Missing or mismatched closing delimiters.
2488 without an argument when there is no current diversion.
2492 request with no matching
2495 .Warning escape 32768
2496 Unrecognized escape sequence. Then the escape character is ignored.
2497 .Warning font 131072
2498 Non-existent fonts. This is enabled by default.
2500 Illegal escapes in text ignored with the
2502 request. These are conditions that are errors when they occur outside
2505 Use of undefined strings, macros, and diversions. Automatically handled
2506 as empty. Usually, only one warning per name.
2507 .Warning missing 8192
2508 Request that is missing non-optional arguments.
2509 .Warning input 16384
2510 Illegal input character.
2512 Invalid numeric expressions. This is enabled by default.
2514 Out of range arguments.
2516 Use of undefined number register. Automatically defined as having
2517 value 0. Usually, only one warning per name.
2518 .Warning right-brace 4096
2521 where a number was expected.
2523 Meaningless scaling indicators.
2524 .Warning space 65536
2525 Missing space between a request or macro and its argument. Then no
2526 macro is automatically defined. This is enabled by default. This
2527 warning will never occur in compatibility mode.
2529 Dubious syntax in numeric expressions.
2531 Inappropriate use of a tab character (either in an unquoted macro
2532 argument or where a number was expected).
2538 tab(@), box, expand;
2539 c c c | c c c | c c c
2540 R RI CB | R RI CB | R RI CB.
2541 Bit@Code@Warning@Bit@Code@Warning@Bit@Code@Warning
2543 0@1@char@8@256@di@16@65536@space
2544 1@2@number@9@512@mac@17@131072@font
2545 2@4@break@10@1024@reg@18@262144@ig
2546 3@8@delim@11@2048@tab
2547 4@16@el@12@4096@right-brace
2548 5@32@scale@13@8192@missing
2549 6@64@range@14@16384@input
2550 7@128@syntax@15@32768@escape
2554 .\" --------------------------------------------------------------------
2556 .\" --------------------------------------------------------------------
2559 .B compatibility mode
2560 that allows to process roff code written for classical
2562 or for other implementations of roff in a consistent way.
2564 Compatibility mode can be turned on with the
2566 command line option, and turned on or off with the
2568 request. The number register
2572 if compatibility mode is on,
2576 This became necessary because the GNU concept for long names causes some
2584 as defining a string
2590 will interpret this as a call of a macro named
2599 as references to a string or number register called
2604 however, this will normally be interpreted as the start of a long name.
2609 groff will interpret these things in the traditional way, but long names
2612 On the other hand, groff in
2614 does not allow to use the escape sequences
2630 in names of strings, macros, diversions, number registers, fonts or
2631 environments, whereas
2635 escape sequence can be helpful in avoiding these escape sequences in
2638 Fractional pointsizes cause one noteworthy incompatibility.
2644 request ignores scale indicators and so
2650 will set the pointsize to 10 points, whereas in groff native mode the
2651 pointsize will be set to 10 scaled points.
2655 mode, there is a fundamental difference between unformatted input
2656 characters, and formatted output characters.
2657 Everything that affects how an output character will be output is stored
2658 with the character; once an output character has been constructed it is
2659 unaffected by any subsequent requests that are executed, including the
2668 Normally output characters are constructed from input characters at the
2669 moment immediately before the character is added to the current output
2671 Macros, diversions and strings are all, in fact, the same type of object;
2672 they contain lists of input characters and output characters in any
2675 An output character does not behave like an input character for the
2676 purposes of macro processing; it does not inherit any of the special
2677 properties that the input character from which it was constructed might
2679 The following example will make things clearer.
2695 this will be printed as
2697 So each pair of input backslashes
2699 is turned into a single output backslash
2701 and the resulting output backslashes are not interpreted as escape
2702 characters when they are reread.
2705 would interpret them as escape characters when they were reread and
2706 would end up printing a single backslash
2709 The correct way to get a printable
2713 escape sequence. This will always print a single instance of the
2714 current escape character, regardless of whether or not it is used in a
2715 diversion. It will also work in both GNU mode and compatibility mode.
2717 To store an escape sequence in a diversion that will be interpreted when
2718 the diversion is reread, either the traditional
2720 transparent output facility or the
2723 escape sequence can be used.
2725 .\" --------------------------------------------------------------------
2727 .\" --------------------------------------------------------------------
2728 At the moment, the documentation of the groff system is in a state of
2729 change and evolution. It is possible that there are small
2730 inconsistencies between different documents temporarily.
2735 .BR troff (@MAN1EXT@).
2737 .\" --------------------------------------------------------------------
2739 .\" --------------------------------------------------------------------
2740 This document is part of groff, the GNU roff distribution. It was
2741 written by Bernd Warken <bwarken@mayn.de>.
2743 It is distributed under the terms of the FDL (GNU Free Documentation
2744 License) version 1.1 or later. You should have received a copy of the
2745 FDL on your system, it is also available on-line under
2748 .IR http://www.gnu.org/copyleft/fdl.html .
2751 Formerly, the extensions of the groff language were kept in the manual
2753 .BR troff (@MAN1EXT@).
2754 This document contains the essential parts of that documentation, but
2755 the gory details are found in the groff info file.
2757 .\" --------------------------------------------------------------------
2759 .\" --------------------------------------------------------------------
2760 The main source of information for the groff language is the
2765 For a survey of roff and the groff system and further documentation
2767 .BR roff (@MAN7EXT@).
2769 The formatter programs are described in
2770 .BR groff (@MAN1EXT@)
2772 .BR troff (@MAN1EXT@);
2773 a complete of all predefined glyph names can be found in
2774 .BR groff_char (@MAN7EXT@).
2778 documentation is available on-line at
2781 .I http://cm.bell-labs.com/cm/cs/cstr.html
2785 .IR http://www.kohala.com/start/troff/ .