Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
troff(1)
Edit
PageHistory
Diff
Info
LikePages
TROFF !!!TROFF NAME SYNOPSIS DESCRIPTION OPTIONS USAGE ENVIRONMENT FILES SEE ALSO ---- !!NAME troff - format documents !!SYNOPSIS __troff__ [[ __-abivzCERU__ ] [[ __-w__''name'' ] [[ __-W__''name'' ] [[ __-d__''cs'' ] [[ __-f__''fam'' ] [[ __-m__''name'' ] [[ __-n__''num'' ] [[ __-o__''list'' ] [[ __-r__''cn'' ] [[ __-T__''name'' ] [[ __-F__''dir'' ] [[ __-M__''dir'' ] [[ ''files...'' ] It is possible to have whitespace between a command line option and its parameter. !!DESCRIPTION This manual page describes the GNU version of __troff__, which is part of the groff document formatting system. It is highly compatible with UNIX troff. Usually it should be invoked using the groff command, which will also run preprocessors and postprocessors in the appropriate order and with the appropriate options. !!OPTIONS __-a__ Generate an ASCII approximation of the typeset output. __-b__ Print a backtrace with each warning or error message. This backtrace should help track down the cause of the error. The line numbers given in the backtrace may not always be correct: __troff__'s idea of line numbers gets confused by __as__ or __am__ requests. __-i__ Read the standard input after all the named input files have been processed. __-v__ Print the version number. __-w__''name'' Enable warning ''name''. Available warnings are described in the Warnings subsection below. Multiple __-w__ options are allowed. __-W__''name'' Inhibit warning ''name''. Multiple __-W__ options are allowed. __-E__ Inhibit all error messages of __troff__. Note that this doesn't affect messages output to standard error by macro packages using the __.tm__ or __.tm1__ requests. __-z__ Suppress formatted output. __-C__ Enable compatibility mode. __-d__''cs'' __-d__''name''__=__''s'' Define ''c'' or ''name'' to be a string ''s''; ''c'' must be a one letter name. __-f__''fam'' Use ''fam'' as the default font family. __-m__''name'' Read in the file ''name''__.tmac__. If it isn't found, try __tmac.__''name'' instead. It will be first searched for in directories given with the __-M__ command line option, then in directories given in the __GROFF_TMAC_PATH__ environment variable, then in the current directory (only if in unsafe mode), the home directory, /usr/lib/groff/site-tmac, /usr/share/groff/site-tmac, and /usr/share/groff/1.17.2/tmac. __-U__ Unsafe mode. This will enable the following requests: __.open__, __.opena__, __.pso__, __.sy__, and __.pi__. For security reasons, these potentially dangerous requests are disabled otherwise. It will also add the current directory to the macro search path. __-R__ Don't load __troffrc__ and __troffrc-end__. __-n__''num'' Number the first page ''num''. __-o__''list'' Output only pages in ''list'', which is a comma-separated list of page ranges; ''n'' means print page ''n'', ''m''__-__''n'' means print every page between ''m'' and ''n'', __-__''n'' means print every page up to ''n'', ''n''__-__ means print every page from ''n''. __Troff__ will exit after printing the last page in the list. __-r__''cn'' __-r__''name''__=__''n'' Set number register ''c'' or ''name'' to ''n''; ''c'' must be a one character name; ''n'' can be any troff numeric expression. __-T__''name'' Prepare output for device ''name'', rather than the default __ps__. __-F__''dir'' Search in directory (or directory path) ''dir'' for subdirectories __dev__''name'' (''name'' is the name of the device) and there for the __DESC__ file and font files. ''dir'' is scanned before all other font directories. __-M__''dir'' Search directory (or directory path) ''dir'' for macro files. This is scanned before all other macro directories. !!USAGE Only the features not in UNIX troff are described here. __Long names__ The names of number registers, fonts, strings/macros/diversions, special characters can be of any length. In escape sequences, where you can use __(__''xx'' for a two character name, you can use __[[__''xxx''__]__ for a name of arbitrary length: __[[__''xxx''__]__ Print the special character called ''xxx''. __f[[__''xxx''__]__ Set font ''xxx''. __*[[__''xxx''__]__ Interpolate string ''xxx''. __n[[__''xxx''__]__ Interpolate number register ''xxx''. __Fractional pointsizes__ A ''scaled point'' is equal to 1/sizescale points, where sizescale is specified in the __DESC__ file (1 by default). There is a new scale indicator __z__ which has the effect of multiplying by sizescale. Requests and escape sequences in troff interpret arguments that represent a pointsize as being in units of scaled points, but they evaluate each such argument using a default scale indicator of __z__. Arguments treated in this way are the argument to the __ps__ request, the third argument to the __cs__ request, the second and fourth arguments to the __tkf__ request, the argument to the __H__ escape sequence, and those variants of the __s__ escape sequence that take a numeric expression as their argument. For example, suppose sizescale is 1000; then a scaled point will be equivalent to a millipoint; the request __.ps 10.25__ is equivalent to __.ps 10.25z__ and so sets the pointsize to 10250 scaled points, which is equal to 10.25 points. The number register __n[[.s]__ returns the pointsize in points as decimal fraction. There is also a new number register __n[[.ps]__ that returns the pointsize in scaled points. It would make no sense to use the __z__ scale indicator in a numeric expression whose default scale indicator was neither __u__ nor __z__, and so __troff__ disallows this. Similarly it would make no sense to use a scaling indicator other than __z__ or __u__ in a numeric expression whose default scale indicator was __z__, and so __troff__ disallows this as well. There is also new scale indicator __s__ which multiplies by the number of units in a scaled point. So, for example, __n[[.ps]s__ is equal to __1m__. Be sure not to confuse the __s__ and __z__ scale indicators. __Numeric expressions__ Spaces are permitted in a number expression within parentheses. __M__ indicates a scale of 100ths of an em. ''e1''____''e2'' The maximum of ''e1'' and ''e2''. ''e1''____''e2'' The minimum of ''e1'' and ''e2''. __(__''c''__;__''e''__)__ Evaluate ''e'' using ''c'' as the default scaling indicator. If ''c'' is missing, ignore scaling indicators in the evaluation of ''e''. __New escape sequences__ __A'__''anything''__'__ This expands to __1__ or __0__ according as ''anything'' is or is not acceptable as the name of a string, macro, diversion, number register, environment or font. It will return __0__ if ''anything'' is empty. This is useful if you want to lookup user input in some sort of associative table. __B'__''anything''__'__ This expands to __1__ or __0__ according as ''anything'' is or is not a valid numeric expression. It will return __0__ if ''anything'' is empty. __C'__''xxx''__'__ Typeset character named ''xxx''. Normally it is more convenient to use __[[__''xxx''__]__. But __C__ has the advantage that it is compatible with recent versions of UNIX and is available in compatibility mode. __E__ This is equivalent to an escape character, but it's not interpreted in copy-mode. For example, strings to start and end superscripting could be defined like this: .ds { v'-.3m's'En[[.s]*6u/10u' .ds } s0v'.3m' The use of __E__ ensures that these definitions will work even if __*{__ gets interpreted in copy-mode (for example, by being used in a macro argument). __N'__''n''__'__ Typeset the character with code ''n'' in the current font. ''n'' can be any integer. Most devices only have characters with codes between 0 and 255. If the current font does not contain a character with that code, special fonts will ''not'' be searched. The __N__ escape sequence can be conveniently used on conjunction with the __char__ request: __.char [[phone] f(ZDN'37'__ The code of each character is given in the fourth column in the font description file after the __charset__ command. It is possible to include unnamed characters in the font description file by using a name of __---__; the __N__ escape sequence is the only way to use these. __R'__''name n''__'__ This has the same effect as __.nr__ ''name n'' __s(__''nn'' __s(__''nn'' Set the point size to ''nn'' points; ''nn'' must be exactly two digits. __s[[__''n''__]__ __s[[__''n''__]__ __s'__''n''__'__ __s'__''n''__'__ Set the point size to ''n'' scaled points; ''n'' is a numeric expression with a default scale indicator of __z__. __V__''x'' __V(__''xx'' __V[[__''xxx''__]__ Interpolate the contents of the environment variable ''xxx'', as returned by getenv(3). __V__ is interpreted in copy-mode. __Y__''x'' __Y(__''xx'' __Y[[__''xxx''__]__ This is approximately equivalent to __X'*[[__''xxx''__]'__. However the contents of the string or macro ''xxx'' are not interpreted; also it is permitted for ''xxx'' to have been defined as a macro and thus contain newlines (it is not permitted for the argument to __X__ to contain newlines). The inclusion of newlines requires an extension to the UNIX troff output format, and will confuse drivers that do not know about this extension. __Z'__''anything''__'__ Print anything and then restore the horizontal and vertical position; ''anything'' may not contain tabs or leaders. __$0__ The name by which the current macro was invoked. The __als__ request can make a macro have more than one name. __$*__ In a macro, the concatenation of all the arguments separated by spaces. __$@__ In a macro, the concatenation of all the arguments with each surrounded by double quotes, and separated by spaces. __$(__''nn'' __$[[__''nnn''__]__ In a macro, this gives the ''nn''-th or ''nnn''-th argument. Macros can have an unlimited number of arguments. __?__''anything''__?__ When used in a diversion, this will transparently embed ''anything'' in the diversion. ''anything'' is read in copy mode. When the diversion is reread, ''anything'' will be interpreted. ''anything'' may not contain newlines; use __!__ if you want to embed newlines in a diversion. The escape sequence __?__ is also recognised in copy mode and turned into a single internal code; it is this code that terminates ''anything''. Thus __.nr x 1 .nf .di d ?\?\\?\\\\nx\\?\?? .di .nr x 2 .di e .d .di .nr x 3 .di f .e .di .nr x 4 .f __ will print __4__. __/__ This increases the width of the preceding character so that the spacing between that character and the following character will be correct if the following character is a roman character. For example, if an italic f is immediately followed by a roman right parenthesis, then in many fonts the top right portion of the f will overlap the top left of the right parenthesis producing ''f''), which is ugly. Inserting __/__ produces ''f'') and avoids this problem. It is a good idea to use this escape sequence whenever an italic character is immediately followed by a roman character without any intervening space. __,__ This modifies the spacing of the following character so that the spacing between that character and the preceding character will correct if the preceding character is a roman character. For example, inserting __,__ between the parenthesis and the f changes (''f'' to (''f''. It is a good idea to use this escape sequence whenever a roman character is immediately followed by an italic character without any intervening space. __)__ Like ____ except that it behaves like a character declared with the __cflags__ request to be transparent for the purposes of end of sentence recognition. __~__ This produces an unbreakable space that stretches like a normal inter-word space when a line is adjusted. __:__ This causes the insertion of a zero-width break point. It is equal to __%__ but without insertion of a soft hyphen character. __#__ Everything up to and including the next newline is ignored. This is interpreted in copy mode. This is like ____ except that ____ does not ignore the terminating newline. __New requests__ __.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. On entry, the current compatibility mode is saved and restored at exit. __.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 __.tr @. .di x @nr n 1 .br .di .tr @@ .asciify x .x __ 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 __-__ 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 ____ have this property); 16 the character overlaps vertically (initially character ____ 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 TEX (initially characters ____ have this property). __.char__ ''c string'' Define character ''c'' to be ''string''. Every time character ''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 characters in ''string''. A character defined by this request can be used just like a normal character 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 character within the character's definition will be handled like normal characters not defined with __char__. A character definition can be removed with the __rchar__ request. __.chop__ ''xx'' Chop the last character 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. __.continue__ Finish the current iteration of a while loop. See also the __while__ and __break__ requests. __.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. __.dei__ ''xx yy'' Define macro indirectly. The following example __.ds xx aa .ds yy bb .dei xx yy __ is equivalent to __.de aa bb__ __.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. __.do__ ''xxx'' Interpret ''.xxx'' with compatibility mode disabled. For example, __.do fam T__ would have the same effect as __.fam T__ 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. __.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 environents 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. See the description of the __sty__ request for more information on font families. __.fspecial__ ''f s1 s2...'' When the current font is ''f'', fonts ''s1'', ''s2'',... will be special, that is, they will searched for characters not in the current font. Any fonts specified in the __special__ request will be searched after fonts specified in the __fspecial__ request. __.ftr__ ''f g'' Translate font ''f'' to ''g''. Whenever a font named ''f'' is referred to in __f__ escape sequence, 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. __.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 has a hyphenation code, which is itself, and each upper-case letter 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 __-m__''name'' option is specified. It should have the same format as the argument to the patterns primitive in TEX; the letters appearing in this file are interpreted as hyphenation codes. A __%__ character in the patterns file introduces a comment that continues to the end of the line. 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. __.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. __.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 __.ds x atc .ds y btc .ds z c .ta 1i 3i *x *y *z __ yields a b c In line-tabs mode, the same code gives a b c Line-tabs mode is associated with the current environment; the read-only number register __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. __.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. __.rchar__ ''c1 c2...'' Remove the definitions of characters ''c1'', ''c2'',... This undoes the effect of a __char__ request. __.return__ Within a macro, return immediately. No effect otherwise. __.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''. __.shc__ ''c'' Set the soft hyphen character to ''c''. If ''c'' is omitted, the soft hyphen character will be set to the default __-__. The soft hyphen character is the character 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 character 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. __.special__ ''s1 s2...'' Fonts ''s1'', ''s2'', are special and will be searched for characters not in the current font. __.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 in register ''xx'' with the substring defined by the indices ''n1'' and ''n2''. The first character in the string has index one. If ''n2'' is omitted, it is taken to be equal to the string's length. If the index value ''n1'' or ''n2'' is negative or zero, it will be counted from the end of the string, going backwards: The last character has index 0, the character before the last character has index -1, etc. __.tkf__ ''f s1 n1 s2 n2'' Enable track kerning for font ''f''. When the current font is ''f'' the width of every character 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 it would be were it 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 __.di__ ''x''__ .trf__ ''f''__ .di__ Unlike with the __cf__ request, the file cannot contain characters such as NUL that are not legal troff input characters. __.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, __.tr ab .di x !.tm a .di .x __ 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 the `Warnings' section. For example, __.warn 0__ will disable all warnings, and __.warn 1__ will disable all warnings except that about missing characters. If ''n'' is not given, all warnings will be enabled. __.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. __.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. __Extended requests__ __.cf__ ''filename'' When used in a diversion, this will embed in the diversion an object which, when reread, will cause the contents of ''filename'' to be transparently copied through to the output. In UNIX troff, the contents of ''filename'' is immediately copied through to the output regardless of whether there is a current diversion; this behaviour is so anomalous that it must be considered a bug. __.ev__ ''xx'' If ''xx'' is not a number, this will switch to a named environment called ''xx''. The environment should be popped with a matching __ev__ request without any arguments, just as for numbered environments. There is no limit on the number of named environments; they will be created the first time that they are referenced. __.fp__ ''n f1 f2'' The __fp__ request has an optional third argument. This argument gives the external name of the font, which is used for finding the font description file. The second argument gives the internal name of the font which is used to refer to the font in troff after it has been mounted. If there is no third argument then the internal name will be used as the external name. This feature allows you to use fonts with long names in compatibility mode. __.ss__ ''m n'' When two arguments are given to the __ss__ request, the second argument gives the ''sentence space size''. If the second argument is not given, the sentence space size will be the same as the word space size. Like the word space size, the sentence space is in units of one twelfth of the spacewidth parameter for the current font. Initially both the word space size and the sentence space size are 12. Contrary to UNIX troff, GNU troff handles this request in nroff mode also; a given value is then rounded down to the nearest multiple of 12. The sentence space size is used in two circumstances: if the end of a sentence occurs at the end of a line in fill mode, then both an inter-word space and a sentence space will be added; if two spaces follow the end of a sentence in the middle of a line, then the second space will be a sentence space. Note that the behaviour of UNIX troff will be exactly that exhibited by GNU troff if a second argument is never given to the __ss__ request. In GNU troff, as in UNIX troff, you should always follow a sentence with either a newline or two spaces. __.ta__ ''n1 n2...nn'' __T__ ''r1 r2...rn'' Set tabs at positions ''n1'', ''n2'',..., ''nn'' and then set tabs at ''nn''+''r1'', ''nn''+''r2'',...., ''nn''+''rn'' and then at ''nn''+''rn''+''r1'', ''nn''+''rn''+''r2'',..., ''nn''+''rn''+''rn'', and so on. For example, __.ta T .5i__ will set tabs every half an inch. __New number registers__ The following read-only registers are available: __n[[.C]__ 1 if compatibility mode is in effect, 0 otherwise. __n[[.cdp]__ The depth of the last character added to the current environment. It is positive if the character extends below the baseline. __n[[.ce]__ The number of lines remaining to be centered, as set by the __ce__ request. __n[[.cht]__ The height of the last character added to the current environment. It is positive if the character extends above the baseline. __n[[.csk]__ The skew of the last character added to the current environment. The ''skew'' of a character is how far to the right of the center of a character the center of an accent over that character should be placed. __n[[.ev]__ The name or number of the current environment. This is a string-valued register. __n[[.fam]__ The current font family. This is a string-valued register. __n[[.fp]__ The number of the next free font position. __n[[.g]__ Always 1. Macros should use this to determine whether they are running under GNU troff. __n[[.hla]__ The current hyphenation language as set by the __hla__ request. __n[[.hlc]__ The number of immediately preceding consecutive hyphenated lines. __n[[.hlm]__ The maximum allowed number of consecutive hyphenated lines, as set by the __hlm__ request. __n[[.hy]__ The current hyphenation flags (as set by the __hy__ request). __n[[.hym]__ The current hyphenation margin (as set by the __hym__ request). __n[[.hys]__ The current hyphenation space (as set by the __hys__ request). __n[[.in]__ The indent that applies to the current output line. __n[[.int]__ Set to a positive value if last output line is interrupted (i.e., if it contains ''c''). __n[[.kern]__ __1__ if pairwise kerning is enabled, __0__ otherwise. __n[[.lg]__ The current ligature mode (as set by the __lg__ request). __n[[.linetabs]__ The current line-tabs mode (as set by the __linetabs__ request). __n[[.ll]__ The line length that applies to the current output line. __n[[.lt]__ The title length as set by the __lt__ request. __n[[.ne]__ The amount of space that was needed in the last __ne__ request that caused a trap to be sprung. Useful in conjunction with the __n[[.trunc]__ register. __n[[.ns]__ __1__ if no-space mode is active, __0__ otherwise. __n[[.pn]__ The number of the next page: either the value set by a __pn__ request, or the number of the current page plus 1. __n[[.ps]__ The current pointsize in scaled points. __n[[.psr]__ The last-requested pointsize in scaled points. __n[[.rj]__ The number of lines to be right-justified as set by the __rj__ request. __n[[.sr]__ The last requested pointsize in points as a decimal fraction. This is a string-valued register. __n[[.tabs]__ A string representation of the current tab settings suitable for use as an argument to the __ta__ request. __n[[.trunc]__ The amount of vertical space truncated by the most recently sprung vertical position trap, or, if the trap was sprung by a __ne__ request, minus the amount of vertical motion produced by the __ne__ request. In other words, at the point a trap is sprung, it represents the difference of what the vertical position would have been but for the trap, and what the vertical position actually is. Useful in conjunction with the __n[[.ne]__ register. __n[[.ss]__ __n[[.sss]__ These give the values of the parameters set by the first and second arguments of the __ss__ request. __n[[.vpt]__ 1 if vertical position traps are enabled, 0 otherwise. __n[[.warn]__ The sum of the numbers associated with each of the currently enabled warnings. The number associated with each warning is listed in the `Warnings' subsection. __n[[.x]__ The major version number. For example, if the version number is __1.03__ then __n[[.x]__ will contain __1__. __n[[.y]__ The minor version number. For example, if the version number is __1.03__ then __n[[.y]__ will contain __03__. __n[[.Y]__ The revision number of groff. __n[[llx]__ __n[[lly]__ __n[[urx]__ __n[[ury]__ These four registers are set by the __.psbb__ request and contain the bounding box values (in !PostScript units) of a given !PostScript image. The following read/write registers are set by the __w__ escape sequence: __n[[rst]__ __n[[rsb]__ Like the __st__ and __sb__ registers, but takes account of the heights and depths of characters. __n[[ssc]__ The amount of horizontal space (possibly negative) that should be added to the last character before a subscript. __n[[skw]__ How far to right of the center of the last character in the __w__ argument, the center of an accent from a roman font should be placed over that character. Other available read/write number registers are: __n[[c.]__ The current input line number. __n[[.c]__ is a read-only alias to this register. __n[[hp]__ The current horizontal position at input line. __n[[systat]__ The return value of the system() function executed by the last __sy__ request. __n[[slimit]__ If greater than 0, the maximum number of objects on the input stack. If less than or equal to 0, there is no limit on the number of objects on the input stack. With no limit, recursion can continue until virtual memory is exhausted. __n[[year]__ The current year. Note that the traditional __troff__ number register __n[[yr]__ is the current year minus 1900. __Miscellaneous__ __troff__ predefines a single (read/write) string-based register, __*(.T__, which contains the argument given to the __-T__ command line option, namely the current output device (for example, ''latin1'' or ''ascii''). Note that this is not the same as the (read-only) number register __n[[.T]__ which is defined to be 1 if __troff__ is called with the __-T__ command line option, and zero otherwise. This behaviour is different to UNIX troff. Fonts not listed in the DESC file are automatically mounted on the next available font position when they are referenced. If a font is to be mounted explicitly with the __fp__ request on an unused font position, it should be mounted on the first unused font position, which can be found in the __n[[.fp]__ register; although __troff__ does not enforce this strictly, it will not allow a font to be mounted at a position whose number is much greater than that of any currently used position. Interpolating a string does not hide existing macro arguments. Thus in a macro, a more efficient way of doing __.__''xx'' __\$@__ is __\*[[__''xx''__]\__ If the font description file contains pairwise kerning information, characters from that font will be kerned. Kerning between two characters can be inhibited by placing a ____ between them. In a string comparison in a condition, characters that appear at different input levels to the first delimiter character will not be recognised as the second or third delimiters. This applies also to the __tl__ request. In a __w__ escape sequence, a character that appears at a different input level to the starting delimiter character will not be recognised as the closing delimiter character. When decoding a macro argument that is delimited by double quotes, a character that appears at a different input level to the starting delimiter character will not be recognised as the closing delimiter character. The implementation of __$@__ ensures that the double quotes surrounding an argument will appear the same input level, which will be different to the input level of the argument itself. In a long escape name __]__ will not be recognized as a closing delimiter except when it occurs at the same input level as the opening __]__. In compatibility mode, no attention is paid to the input-level. There are some new types of condition: __.if r__''xxx'' True if there is a number register named ''xxx''. __.if d__''xxx'' True if there is a string, macro, diversion, or request named ''xxx''. __.if c__''ch'' True if there is a character ''ch'' available; ''ch'' is either an ASCII character or a special character ____''xx'' or __[[__''xxx''__]__; the condition will also be true if ''ch'' has been defined by the __char__ request. The __tr__ request can now map characters onto __~__. __Warnings__ The warnings that can be given by __troff__ are divided into the following categories. The name associated with each warning is used by the __-w__ and __-W__ options; the number is used by the __warn__ request, and by the __.warn__ register. __char__ 1 Non-existent characters. This is enabled by default. __number__ 2 Invalid numeric expressions. This is enabled by default. __break__ 4 In fill mode, lines which could not be broken so that their length was less than the line length. This is enabled by default. __delim__ 8 Missing or mismatched closing delimiters. __el__ 16 Use of the __el__ request with no matching __ie__ request. __scale__ 32 Meaningless scaling indicators. __range__ 64 Out of range arguments. __syntax__ 128 Dubious syntax in numeric expressions. __di__ 256 Use of __di__ or __da__ without an argument when there is no current diversion. __mac__ 512 Use of undefined strings, macros and diversions. When an undefined string, macro or diversion is used, that string is automatically defined as empty. So, in most cases, at most one warning will be given for each name. __reg__ 1024 Use of undefined number registers. When an undefined number register is used, that register is automatically defined to have a value of 0. a definition is automatically made with a value of 0. So, in most cases, at most one warning will be given for use of a particular name. __tab__ 2048 Inappropriate use of a tab character. Either use of a tab character where a number was expected, or use of tab character in an unquoted macro argument. __right-brace__ 4096 Use of __}__ where a number was expected. __missing__ 8192 Requests that are missing non-optional arguments. __input__ 16384 Illegal input characters. __escape__ 32768 Unrecognized escape sequences. When an unrecognized escape sequence is encountered, the escape character is ignored. __space__ 65536 Missing space between a request or macro and its argument. This warning will be given when an undefined name longer than two characters is encountered, and the first two characters of the name make a defined name. The request or macro will not be invoked. When this warning is given, no macro is automatically defined. This is enabled by default. This warning will never occur in compatibility mode. __font__ 131072 Non-existent fonts. This is enabled by default. __ig__ 262144 Illegal escapes in text ignored with the __ig__ request. These are conditions that are errors when they do not occur in ignored text. There are also names that can be used to refer to groups of warnings: __all__ All warnings except __di__, __mac__ and __reg__. It is intended that this covers all warnings that are useful with traditional macro packages. __w__ All warnings. __Incompatibilities__ Long names cause some incompatibilities. UNIX troff will interpret __.dsabcd__ as defining a string __ab__ with contents __cd__. Normally, GNU troff will interpret this as a call of a macro named __dsabcd__. Also UNIX troff will interpret __*[[__ or __n[[__ as references to a string or number register called __[[__. In GNU troff, however, this will normally be interpreted as the start of a long name. In ''compatibility mode'' GNU troff will interpret these things in the traditional way. In compatibility mode, however, long names are not recognised. Compatibility mode can be turned on with the __-C__ command line option, and turned on or off with the __cp__ request. The number register __n[[.C]__ is 1 if compatibility mode is on, 0 otherwise. GNU troff does not allow the use of the escape sequences __\|^__(space)__'`-_!%c__ in names of strings, macros, diversions, number registers, fonts or environments; UNIX troff does. The __A__ escape sequence may be helpful in avoiding use of these escape sequences in names. Fractional pointsizes cause one noteworthy incompatibility. In UNIX troff the __ps__ request ignores scale indicators and so __.ps 10u__ will set the pointsize to 10 points, whereas in GNU troff it will set the pointsize to 10 scaled points. In GNU troff there is a fundamental difference between unformatted, input characters, and formatted, output characters. Everything that affects how an output character will be output is stored with the character; once an output character has been constructed it is unaffected by any subsequent requests that are executed, including __bd__, __cs__, __tkf__, __tr__, or __fp__ requests. Normally output characters are constructed from input characters at the moment immediately before the character is added to the current output line. Macros, diversions and strings are all, in fact, the same type of object; they contain lists of input characters and output characters in any combination. An output character does not behave like an input character for the purposes of macro processing; it does not inherit any of the special properties that the input character from which it was constructed might have had. For example, __.di x \\ .br .di .x __ will print __\__ in GNU troff; each pair of input __\__s is turned into one output __\__ and the resulting output __\__s are not interpreted as escape characters when they are reread. UNIX troff would interpret them as escape characters when they were reread and would end up printing one __\__. The correct way to obtain a printable __\__ is to use the __e__ escape sequence: this will always print a single instance of the current escape character, regardless of whether or not it is used in a diversion; it will also work in both GNU troff and UNIX troff. If you wish for some reason to store in a diversion an escape sequence that will be interpreted when the diversion is reread, you can either use the traditional __!__ transparent output facility, or, if this is unsuitable, the new __?__ escape sequence. !!ENVIRONMENT __GROFF_TMAC_PATH__ A colon separated list of directories in which to search for macro files. __troff__ will scan directories given in the __-M__ option before these, and in standard directories (current directory if in unsafe mode, home directory, __/usr/share/groff/site-tmac__, __/usr/lib/groff/site-tmac__, __/usr/share/groff/1.17.2/tmac__) after these. __GROFF_TYPESETTER__ Default device. __GROFF_FONT_PATH__ A colon separated list of directories in which to search for the __dev__''name'' directory. __troff__ will scan directories given in the __-F__ option before these, and in standard directories (__/usr/share/groff/1.17.2/font:/usr/lib/font__) after these. !!FILES __/usr/share/groff/1.17.2/tmac/troffrc__ Initialization file (called before any other macro package). __/usr/share/groff/1.17.2/tmac/troffrc-end__ Initialization file (called after any other macro package). __/usr/share/groff/1.17.2/tmac/__''name''__.tmac__ __/usr/share/groff/1.17.2/tmac/tmac.__''name'' Macro files __/usr/share/groff/1.17.2/font/dev__''name''__/DESC__ Device description file for device ''name''. __/usr/share/groff/1.17.2/font/dev__''name''__/__''F'' Font file for font ''F'' of device ''name''. Note that __troffrc__ and __troffrc-end__ are neither searched in the current nor in the home directory by default for security reasons (even if the __-U__ option is given). Use the __-M__ command line option or the __GROFF_TMAC_PATH__ environment variable to add these directories to the search path if necessary. !!SEE ALSO groff(7) -- This is a short but complete reference of all requests, registers, and escapes. groff(1), tbl(1), pic(1), eqn(1), refer(1), soelim(1), grn(1), grops(1), grodvi(1), grotty(1), grohtml(1), grolj4(1), groff_font(5), __groff_out__(5), groff_char(7) ----
41 pages link to
troff(1)
:
mdoc.samples(7)
lpd(8)
inimpost(1)
man(1)
mpost(1)
pic(1)
post-grohtml(1)
pre-grohtml(1)
virmpost(1)
roff(7)
eqn(1)
geqn(1)
colcrt(1)
gpic(1)
grodvi(1)
groff(1)
groff(7)
groff_font(5)
groff_tmac(5)
grohtml(1)
grolbp(1)
grolj4(1)
grops(1)
grotty(1)
file(1)
groff_me(7)
groff_mm(7)
groff_mmse(7)
groff_ms(7)
groff_mwww(7)
grog(1)
gtbl(1)
mmroff(7)
nroff(1)
perlpod(1)
pod2man(1)
tbl(1)
zsoelim(1)
groff_mdoc(7)
makeindex(1)
Man1t
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.