.aln xx yy
Create an alias xx for number register object named yy. The new name and the old name will be exactly equivalent. If yy is undefined, a warning of type reg will be generated, and the request will be ignored.
.als xx yy
Create an alias xx for request, string, macro, or diversion object named yy. The new name and the old name will be exactly equivalent (it is similar to a hard rather than a soft link). If yy is undefined, a warning of type mac will be generated, and the request will be ignored. The de, am, di, da, ds, and as requests only create a new object if the name of the macro, diversion or string diversion is currently undefined or if it is defined to be a request; normally they modify the value of an existing object.
.am1 xx yy
Similar to .am, but compatibility mode is switched off during execution. To be more precise, a `compatibility save' token is inserted at the beginning of the macro addition, and a `compatibility restore' token at the end. As a consequence, the requests am, am1, de, and de1 can be intermixed freely since the compatibility save/:restore tokens only affect the macro parts defined by .am1 and .ds1.
.ami xx yy
Append to macro indirectly. See the dei request below for more information.
.ami1 xx yy
Same as the ami request but compatibility mode is switched off during execution.
.as1 xx yy
Similar to .as, but compatibility mode is switched off during expansion. To be more precise, a `compatibility save' token is inserted at the beginning of the string, and a `compatibility restore' token at the end. As a consequence, the requests as, as1, ds, and ds1 can be intermixed freely since the compatibility save/:restore tokens only affect the (sub)strings defined by as1 and ds1.
.asciify xx
This request `unformats' the diversion xx in such a way that ASCII and space characters (and some escape sequences) that were formatted and diverted into xx will be treated like ordinary input characters when xx is reread. Useful for diversions in conjunction with the .writem request. It can be also used for gross hacks; for example, this
will set register n to 1. Note that glyph information (font, font size, etc.) is not preserved; use .unformat instead.
.backtrace
Print a backtrace of the input stack on stderr.
.blm xx
Set the blank line macro to xx. If there is a blank line macro, it will be invoked when a blank line is encountered instead of the usual troff behaviour.
.box xx
.boxa xx These requests are similar to the di and da requests with the exception that a partially filled line will not become part of the diversion (i.e., the diversion always starts with a new line) but restored after ending the diversion, discarding the partially filled line which possibly comes from the diversion.
.break
Break out of a while loop. See also the while and continue requests. Be sure not to confuse this with the br request.
.brp
This is the same as \p.
.cflags n c1 c2...
Characters c1, c2,... have properties determined by n, which is ORed from the following:
1
The character ends sentences (initially characters .?! have this property).
2
Lines can be broken before the character (initially no characters have this property); a line will not be broken at a character with this property unless the characters on each side both have non-zero hyphenation codes.
4
Lines can be broken after the character (initially characters -\[hy]\[em] have this property); a line will not be broken at a character with this property unless the characters on each side both have non-zero hyphenation codes.
8
The character overlaps horizontally (initially characters \[ul]\[rn]\[ru]\[radicalex]\[sqrtex] have this property).
16
The character overlaps vertically (initially character \[br] has this property).
32
An end-of-sentence character followed by any number of characters with this property will be treated as the end of a sentence if followed by a newline or two spaces; in other words the character is transparent for the purposes of end-of-sentence recognition; this is the same as having a zero space factor in (initially characters "')]*\(dg\(rq have this property).
.char c string
Define glyph c to be string. Every time glyph c needs to be printed, string will be processed in a temporary environment and the result will be wrapped up into a single object. Compatibility mode will be turned off and the escape character will be set to \ while string is being processed. Any emboldening, constant spacing or track kerning will be applied to this object rather than to individual glyphs in string.
A glyph defined by this request can be used just like a normal glyph provided by the output device. In particular other characters can be translated to it with the tr request; it can be made the leader character by the lc request; repeated patterns can be drawn with the character using the \l and \L escape sequences; words containing the character can be hyphenated correctly, if the hcode request is used to give the character a hyphenation code.
There is a special anti-recursion feature: Use of glyph within the glyph's definition will be handled like normal glyphs not defined with char.
A glyph definition can be removed with the rchar request.
.chop xx
Chop the last element off macro, string, or diversion xx. This is useful for removing the newline from the end of diversions that are to be interpolated as strings.
.close stream
Close the stream named stream; stream will no longer be an acceptable argument to the write request. See the open request.
.composite glyph1 glyph2
Map glyph name glyph1 to glyph name glyph2 if it is used in \[...] with more than one component.
.continue
Finish the current iteration of a while loop. See also the while and break requests.
.color n
If n is non-zero or missing, enable colors (this is the default), otherwise disable them.
.cp n
If n is non-zero or missing, enable compatibility mode, otherwise disable it. In compatibility mode, long names are not recognised, and the incompatibilities caused by long names do not arise.
.defcolor xxx scheme color_components
Define color. scheme can be one of the following values: rgb (three components), cym (three components), cmyk (four components), and gray or grey (one component). Color components can be given either as a hexadecimal string or as positive decimal integers in the range 0-65535. A hexadecimal string contains all color components concatenated; it must start with either # or ##. The former specifies hex values in the range 0-255 (which are internally multiplied by 257), the latter in the range 0-65535. Examples: #FFC0CB (pink), ##ffff0000ffff (magenta). A new scaling indicator f has been introduced which multiplies its value by 65536; this makes it convenient to specify color components as fractions in the range 0 to 1. Example:
Note that f is the default scaling indicator for the defcolor request, thus the above statement is equivalent to
The color named default (which is device-specific) can't be redefined. It is possible that the default color for and is not the same.
.de1 xx yy
Similar to .de, but compatibility mode is switched off during execution. On entry, the current compatibility mode is saved and restored at exit.
.dei xx yy
Define macro indirectly. The following example
.dei1 xx yy
Similar to the dei request but compatibility mode is switched off during execution.
.do xxx
Interpret .xxx with compatibility mode disabled. For example,
would have the same effect as
except that it would work even if compatibility mode had been enabled. Note that the previous compatibility mode is restored before any files sourced by xxx are interpreted.
.ds1 xx yy
Similar to .ds, but compatibility mode is switched off during expansion. To be more precise, a `compatibility save' token is inserted at the beginning of the string, and a `compatibility restore' token at the end.
.ecs
Save current escape character.
.ecr
Restore escape character saved with ecs. Without a previous call to ecs, `\' will be the new escape character.
.evc xx
Copy the contents of environment xx to the current environment. No pushing or popping of environments will be done.
.fam xx
Set the current font family to xx. The current font family is part of the current environment. If xx is missing, switch back to previous font family. The value at start-up is `T'. See the description of the sty request for more information on font families.
.fchar c string
Define fallback glyph c to be string. The syntax of this request is the same as the char request; the only difference is that a glyph defined with char hides the glyph with the same name in the current font, whereas a glyph defined with fchar is checked only if the particular glyph isn't found in the current font. This test happens before checking special fonts.
.fcolor c
Set the fill color to c. If c is missing, switch to the previous fill color.
.fschar f c string
Define fallback glyph c for font f to be string. The syntax of this request is the same as the char request (with an additional argument to specify the font); a glyph defined with fschar is searched after the list of fonts declared with the fspecial request but before the list of fonts declared with special.
.fspecial f s1 s2...
When the current font is f, fonts s1, s2,... will be special, that is, they will searched for glyphs not in the current font. Any fonts specified in the special request will be searched after fonts specified in the fspecial request. Without argument, reset the list of global special fonts to be empty.
.ftr f g
Translate font f to g. Whenever a font named f is referred to in an \f escape sequence, in the F and S conditional operators, or in the ft, ul, bd, cs, tkf, special, fspecial, fp, or sty requests, font g will be used. If g is missing, or equal to f then font f will not be translated.
.gcolor c
Set the glyph color to c. If c is missing, switch to the previous glyph color.
.hcode c1 code1 c2 code2...
Set the hyphenation code of character c1 to code1 and that of c2 to code2. A hyphenation code must be a single input character (not a special character) other than a digit or a space. Initially each lower-case letter a-z has a hyphenation code, which is itself, and each upper-case letter A-Z has a hyphenation code which is the lower-case version of itself. See also the hpf request.
.hla lang
Set the current hyphenation language to lang. Hyphenation exceptions specified with the hw request and hyphenation patterns specified with the hpf request are both associated with the current hyphenation language. The hla request is usually invoked by the troffrc file.
.hlm n
Set the maximum number of consecutive hyphenated lines to n. If n is negative, there is no maximum. The default value is -1. This value is associated with the current environment. Only lines output from an environment count towards the maximum associated with that environment. Hyphens resulting from \% are counted; explicit hyphens are not.
.hpf file
Read hyphenation patterns from file; this will be searched for in the same way that name.tmac is searched for when the -mname option is specified. It should have the same format as (simple) patterns files. More specifically, the following scanning rules are implemented.
•
A percent sign starts a comment (up to the end of the line) even if preceded by a backslash.
•
No support for `digraphs' like \$.
•
^^xx (x is 0-9 or a-f) and ^^x (character code of x in the range 0-127) are recognized; other use of ^ causes an error.
•
hpf checks for the expression \patterns{...} (possibly with whitespace before and after the braces). Everything between the braces is taken as hyphenation patterns. Consequently, { and } are not allowed in patterns.
•
Similarly, \hyphenation{...} gives a list of hyphenation exceptions.
•
\endinput is recognized also.
•
For backwards compatibility, if \patterns is missing, the whole file is treated as a list of hyphenation patterns (only recognizing the % character as the start of a comment).
Use the hpfcode request to map the encoding used in hyphenation patterns files to groff's input encoding.
The set of hyphenation patterns is associated with the current language set by the hla request. The hpf request is usually invoked by the troffrc file; a second call replaces the old patterns with the new ones.
.hpfa file
The same as hpf except that the hyphenation patterns from file are appended to the patterns already loaded in the current language.
.hpfcode a b c d ...
After reading a hyphenation patterns file with the hpf or hpfa request, convert all characters with character code a in the recently read patterns to character code b, character code c to d, etc. Initially, all character codes map to themselves. The arguments of hpfcode must be integers in the range 0 to 255. Note that it is even possible to use character codes which are invalid in groff otherwise.
.hym n
Set the hyphenation margin to n: when the current adjustment mode is not b, the line will not be hyphenated if the line is no more than n short. The default hyphenation margin is 0. The default scaling indicator for this request is m. The hyphenation margin is associated with the current environment. The current hyphenation margin is available in the \n[.hym] register.
.hys n
Set the hyphenation space to n: when the current adjustment mode is b don't hyphenate the line if the line can be justified by adding no more than n extra space to each word space. The default hyphenation space is 0. The default scaling indicator for this request is m. The hyphenation space is associated with the current environment. The current hyphenation space is available in the \n[.hys] register.
.itc n macro
Variant of .it for which a line interrupted with \c counts as one input line.
.kern n
If n is non-zero or missing, enable pairwise kerning, otherwise disable it.
.length xx string
Compute the length of string and return it in the number register xx (which is not necessarily defined before).
.linetabs n
If n is non-zero or missing, enable line-tabs mode, otherwise disable it (which is the default). In line-tabs mode, tab distances are computed relative to the (current) output line. Otherwise they are taken relative to the input line. For example, the following
In line-tabs mode, the same code gives
Line-tabs mode is associated with the current environment; the read-only number register \[rs]n[.linetabs] is set to 1 if in line-tabs mode, and 0 otherwise.
.mso file
The same as the so request except that file is searched for in the same directories as macro files for the the -m command line option. If the file name to be included has the form name.tmac and it isn't found, mso tries to include tmac.name instead and vice versa.
.nop anything
Execute anything. This is similar to `.if 1'.
.nroff
Make the n built-in condition true and the t built-in condition false. This can be reversed using the troff request.
.open stream filename
Open filename for writing and associate the stream named stream with it. See also the close and write requests.
.opena stream filename
Like open, but if filename exists, append to it instead of truncating it.
.output string
Emit string directly to the intermediate output (subject to copy-mode interpretation); this is similar to \! used at the top level. An initial double quote in string is stripped off to allow initial blanks.
.pnr
Print the names and contents of all currently defined number registers on stderr.
.psbb filename
Get the bounding box of a PostScript image filename. This file must conform to Adobe's Document Structuring Conventions; the command looks for a %%BoundingBox comment to extract the bounding box values. After a successful call, the coordinates (in PostScript units) of the lower left and upper right corner can be found in the registers \n[llx], \n[lly], \n[urx], and \n[ury], respectively. If some error has occurred, the four registers are set to zero.
.pso command
This behaves like the so request except that input comes from the standard output of command.
.ptr
Print the names and positions of all traps (not including input line traps and diversion traps) on stderr. Empty slots in the page trap list are printed as well, because they can affect the priority of subsequently planted traps.
.pvs ±n
Set the post-vertical line space to n; default scale indicator is p. This value will be added to each line after it has been output. With no argument, the post-vertical line space is set to its previous value.
The total vertical line spacing consists of four components: .vs and \x with a negative value which are applied before the line is output, and .pvs and \x with a positive value which are applied after the line is output.
.rchar c1 c2...
Remove the definitions of glyphs c1, c2,... This undoes the effect of a char request.
.return
Within a macro, return immediately. If called with an argument, return twice, namely from the current macro and from the macro one level higher. No effect otherwise.
.rfschar c1 c2...
Remove the font-specific definitions of glyphs c1, c2,... This undoes the effect of a fschar request.
.rj
.rj n Right justify the next n input lines. Without an argument right justify the next input line. The number of lines to be right justified is available in the \n[.rj] register. This implicitly does .ce 0. The ce request implicitly does .rj 0.
.rnn xx yy
Rename number register xx to yy.
.schar c string
Define global fallback glyph c to be string. The syntax of this request is the same as the char request; a glyph defined with schar is searched after the list of fonts declared with the special request but before the mounted special fonts.
.shc c
Set the soft hyphen character to c. If c is omitted, the soft hyphen character will be set to the default \(hy. The soft hyphen character is the glyph which will be inserted when a word is hyphenated at a line break. If the soft hyphen character does not exist in the font of the glyph immediately preceding a potential break point, then the line will not be broken at that point. Neither definitions (specified with the char request) nor translations (specified with the tr request) are considered when finding the soft hyphen character.
.shift n
In a macro, shift the arguments by n positions: argument i becomes argument i-n; arguments 1 to n will no longer be available. If n is missing, arguments will be shifted by 1. Shifting by negative amounts is currently undefined.
.sizes s1 s2...sn [0]
This command is similar to the sizes command of a DESC file. It sets the available font sizes for the current font to s1, s2,..., sn scaled points. The list of sizes can be terminated by an optional 0. Each si can also be a range of sizes m-n. Contrary to the font file command, the list can't extend over more than a single line.
.special s1 s2...
Fonts s1, s2, are special and will be searched for glyphs not in the current font. Without arguments, reset the list of special fonts to be empty.
.spreadwarn limit
Make troff emit a warning if the additional space inserted for each space between words in an output line is larger or equal to limit. A negative value is changed to zero; no argument toggles the warning on and off without changing limit. The default scaling indicator is m. At startup, spreadwarn is deactivated, and limit is set to 3m. For example, .spreadwarn 0.2m will cause a warning if troff must add 0.2m or more for each interword space in a line. This request is active only if text is justified to both margins (using .ad b).
.sty n f
Associate style f with font position n. A font position can be associated either with a font or with a style. The current font is the index of a font position and so is also either a font or a style. When it is a style, the font that is actually used is the font the name of which is the concatenation of the name of the current family and the name of the current style. For example, if the current font is 1 and font position 1 is associated with style R and the current font family is T, then font TR will be used. If the current font is not a style, then the current family is ignored. When the requests cs, bd, tkf, uf, or fspecial are applied to a style, then they will instead be applied to the member of the current family corresponding to that style. The default family can be set with the -f option. The styles command in the DESC file controls which font positions (if any) are initially associated with styles rather than fonts.
.substring xx n1 [n2]
Replace the string named xx with the substring defined by the indices n1 and n2. The first character in the string has index 0. If n2 is omitted, it is taken to be equal to the string's length. If the index value n1 or n2 is negative, it will be counted from the end of the string, going backwards: The last character has index -1, the character before the last character has index -2, etc.
.tkf f s1 n1 s2 n2
Enable track kerning for font f. When the current font is f the width of every glyph will be increased by an amount between n1 and n2; when the current point size is less than or equal to s1 the width will be increased by n1; when it is greater than or equal to s2 the width will be increased by n2; when the point size is greater than or equal to s1 and less than or equal to s2 the increase in width is a linear function of the point size.
.tm1 string
Similar to the tm request, string is read in copy mode and written on the standard error, but an initial double quote in string is stripped off to allow initial blanks.
.tmc string
Similar to tm1 but without writing a final newline.
.trf filename
Transparently output the contents of file filename. Each line is output as if preceded by \!; however, the lines are not subject to copy-mode interpretation. If the file does not end with a newline, then a newline will be added. For example, you can define a macro x containing the contents of file f, using
Unlike with the cf request, the file cannot contain characters such as NUL that are not legal troff input characters.
.trin abcd
This is the same as the tr request except that the asciify request will use the character code (if any) before the character translation. Example:
The result is x a. Using tr, the result would be x x.
.trnt abcd
This is the same as the tr request except that the translations do not apply to text that is transparently throughput into a diversion with \!. For example,
will print b; if trnt is used instead of tr it will print a.
.troff
Make the n built-in condition false, and the t built-in condition true. This undoes the effect of the nroff request.
.unformat xx
This request `unformats' the diversion xx. Contrary to the .asciify request, which tries to convert formatted elements of the diversion back to input tokens as much as possible, .unformat will only handle tabs and spaces between words (usually caused by spaces or newlines in the input) specially. The former are treated as if they were input tokens, and the latter are stretchable again. Note that the vertical size of lines is not preserved. Glyph information (font, font size, space width, etc.) is retained. Useful in conjunction with the .box and .boxa requests.
.vpt n
Enable vertical position traps if n is non-zero, disable them otherwise. Vertical position traps are traps set by the wh or dt requests. Traps set by the it request are not vertical position traps. The parameter that controls whether vertical position traps are enabled is global. Initially vertical position traps are enabled.
.warn n
Control warnings. n is the sum of the numbers associated with each warning that is to be enabled; all other warnings will be disabled. The number associated with each warning is listed in troff(1). For example, .warn 0 will disable all warnings, and .warn 1 will disable all warnings except that about missing glyphs. If n is not given, all warnings will be enabled.
.warnscale si
Set the scaling indicator used in warnings to si. Valid values for si are u, i, c, p, and P. At startup, it is set to i.
.while c anything
While condition c is true, accept anything as input; c can be any condition acceptable to an if request; anything can comprise multiple lines if the first line starts with \{ and the last line ends with \}. See also the break and continue requests.
.write stream anything
Write anything to the stream named stream. stream must previously have been the subject of an open request. anything is read in copy mode; a leading " will be stripped.
.writec stream anything
Similar to write but without writing a final newline.
.writem stream xx
Write the contents of the macro or string xx to the stream named stream. stream must previously have been the subject of an open request. xx is read in copy mode.