Linux cli command groff_diff
26 minute read
Name
groff_diff - differences between GNU roff and AT&T troff
Description
The GNU roff text processing system, groff, is an extension of AT&T troff, the typesetting system originating in Unix systems of the 1970s. groff removes many arbitrary limitations and adds features, both to the input language and to the page description language output by the troff formatter. Differences arising from groff’s implementation of AT&T troff features are also noted. See
for background.
Language
GNU troff features identifiers of arbitrary length; supports color output, non-integral type sizes, and user-defined characters; adds more conditional expression operators; recognizes additional scaling units and numeric operators; enables general file I/O (in “unsafe mode” only); and exposes more formatter state.
Long names
GNU troff introduces many new requests; with three exceptions (cp, do, rj), they have names longer than two characters. The names of registers, fonts, strings/macros/diversions, environments, special characters, streams, and colors can be of any length. Anywhere AT&T troff supports a parameterized escape sequence that uses an opening parenthesis “(” to introduce a two-character argument, groff supports a square-bracketed form “[]” where the argument within can be of arbitrary length.
Font families, abstract styles, and translation
GNU troff can group text typefaces into families containing each of the styles “R”, “I”, “B”, and “BI”. So that a document need not be coupled to a specific font family, an output device can associate a style in the abstract sense with a mounting position. Thus the default family can be combined with a style dynamically, producing a resolved font name. A document can translate, or remap, fonts with the ftr request.
Applying the requests cs, bd, tkf, uf, or fspecial to an abstract style affects the member of the default family corresponding to that style. The default family can be set with the fam request or -f command-line option. The styles directive in the output device’s DESC file controls which mounting positions (if any) are initially associated with abstract styles rather than fonts, and the sty request can update this association.
Colors
groff supports color output with a variety of color spaces and up to 16 bits per channel. Some devices, particularly terminals, may be more limited. When color support is enabled, two colors are current at any given time: the stroke color, with which glyphs, rules (lines), and geometric figures are drawn, and the fill color, which paints the interior of filled geometric figures. The color, defcolor, gcolor, and fcolor requests; \m and \M escape sequences; and .color, .m, and .M registers exercise color support.
Fractional type sizes and new scaling units
AT&T troff interpreted all type size measurements in points. Combined with integer arithmetic, this design choice made it impossible to support, for instance, ten and a half-point type. In GNU troff, an output device can select a scaling factor that subdivides a point into “scaled points”. A type size expressed in scaled points can thus represent a non-integral type size.
A scaled point is equal to 1/sizescale points, where sizescale is specified in the device description file, DESC, and defaults to 1; see
Requests and escape sequences in GNU troff interpret arguments that represent a type size in points, which the formatter multiplies by sizescale and converts to an integer. Arguments treated in this way comprise those to the escape sequences \H and \s, to the request ps, the third argument to the cs request, and the second and fourth arguments to the tkf request. Scaled points may be specified explicitly with the z scaling unit. In GNU troff, the register ** [.s]** can interpolate a non-integral type size. The register ** [.ps]** interpolates the type size in scaled points.
For example, if sizescale is 1000, then a scaled point is one thousandth of a point. Consequently, “.ps 10.5” is synonymous with “.ps 10.5z”; both set the type size to 10,500 scaled points, or 10.5 points.
It makes no sense to use the “z” scaling unit in a numeric expression whose default scaling unit is neither “u” nor “z”, so GNU troff disallows this. Similarly, it is nonsensical to use a scaling unit other than “z” or “u” in a numeric expression whose default scaling unit is “z”, so GNU troff disallows this as well.
Another new scaling unit, “s”, multiplies by the number of basic units in a scaled point. Thus, “ ** [.ps]s**” is equal to “1m” by definition. Do not confuse the “s” and “z” scaling units.
Output devices may be limited in the type sizes they can employ. The .s and .ps registers represent the type size as selected by the output driver as it understands a device’s capability. The last requested type size is interpolated in scaled points by the read-only register .psr and in points as a decimal fraction by the read-only string-valued register .sr. Both are associated with the environment. For example, if a type size of 10.95 points is requested, and the nearest size permitted by a sizes request (or by the sizes or sizescale directives in the device’s DESC file) is 11 points, the output driver uses the latter value.
A further two new measurement units available in groff are “M”, which indicates hundredths of an em, and “f ”, which multiplies by 65,536. The latter provides convenient fractions for color definitions with the defcolor request. For example, 0.5f equals 32768u.
Numeric expressions
GNU troff permits spaces in a numeric expression within parentheses, and offers three new operators.
e1**>?**e2
Interpolate the greater of e1 and e2.
e1**<?**e2
Interpolate the lesser of e1 and e2.
(c;e)
Evaluate e using c as the default scaling unit, ignoring scaling units in e if c is empty.
Conditional expressions
More conditions can be tested with the “ if ” and ie requests, as well as the new “while” request.
**c **chr
True if a character chr is available, where chr is an ordinary character (Unicode basic Latin excluding control characters and the space), a special character, or **\N’**index ’.
**d **nam
True if a string, macro, diversion, or request nam is defined.
**F **fnt
True if a font fnt is available; fnt can be an abstract style or a font name. fnt is handled as if it were accessed with the ft request (that is, abstract styles and font translation are applied), but fnt cannot be a mounting position, and no font is mounted.
**m **col
True if a color col is defined.
**r **reg
True if a register reg is defined.
**S **sty
True if a style sty is registered. Font translation applies.
v
Always false. This condition is for compatibility with certain other troff implementations only. (This refers to vtroff, a translator that would convert the C/A/T output from early-vintage AT&T troff to a form suitable for Versatec and Benson-Varian plotters.)
Drawing commands
GNU troff offers drawing commands to create filled circles and ellipses, and polygons. Stroked (outlined) objects are drawn with the stroke color and filled (solid) ones shaded with the fill color. These are independent properties; if you want a filled, stroked figure, you must draw the same figure twice using each drawing command. A filled figure is always smaller than a stroked one because the former is drawn only within its defined area, whereas strokes have a line thickness (set with another new drawing command, \D’t’).
Escape sequences
groff introduces several new escape sequences and extends the syntax of a few AT&T troff escape sequences (namely, \D, ** **, \k, ** **, \s, ***, and ***). In the following list, escape sequences are collated alphabetically at first, and then by symbol roughly in Unicode code point order.
\A’anything’
Interpolate 1 if anything is a valid identifier, and 0 otherwise. Because invalid input characters are removed, invalid identifiers are empty or contain spaces, tabs, or newlines. You can employ \A to validate a macro argument before using it to construct another escape sequence or identifier.
\B’anything’
Interpolate 1 if anything is a valid numeric expression, and 0 otherwise. You might use \B along with the “ if ” request to filter out invalid macro arguments.
\D’C d’
Draw filled circle of diameter d with its leftmost point at the drawing position.
\D’E h v’
Draw filled ellipse with h and v as the axes and the leftmost point at the drawing position.
**\D’p h1 v1 **
. . . hn vn ’ Draw polygon with vertices at drawing position and each point in sequence. GNU troff closes the polygon by drawing a line from (hn, vn) back to the initial drawing position; DWB and Heirloom troffs do not. Afterward, the drawing position is left at (hn, vn).
**\D’P h1 v1 **
. . . hn vn ’ As \D’p’, but the polygon is filled.
\D’t n’
Set line thickness of geometric objects to to n basic units. A zero n selects the minimal supported thickness. A negative n selects a thickness proportional to the type size; this is the default.
Embed an escape character that is not interpreted in copy mode (compare with and ** **). You can use it to ease the writing of nested macro definitions. It is also convenient to define strings containing escape sequences that need to work when used in copy mode (for example, as macro arguments), or which will be interpolated at varying macro nesting depths.
** [font]**
Select font, which may be a mounting position, abstract style, or font name, to choose the typeface. ** []** and ** P** are synonyms; we recommend the former.
\Ff
**\F(fm
\F[family]
Select default font family. \F[] makes the previous font family the default. \FP is unlike ** P; it selects font family “P” as the default. See the fam request below.
**\k(**rg
\k[reg]
Mark horizontal drawing position in two-character register name rg or arbitrary register name reg.
\mc
**\m(**cl
\m[col]
Set the stroke color. \m[] restores the previous stroke color, or the default if there is none.
\Mc
**\M(**cl
\M[col]
Set the fill color. \M[] restores the previous fill color, or the default if there is none.
**
[reg]**
Interpolate register reg.
\On
\O[n]
Suppress troff output of glyphs and geometric objects. The sequences \O2, \O3, \O4, and \O5 are intended for internal use by
\O0
\O1
Disable and enable, respectively, the emission of glyphs and geometric objects to the output driver, provided that this sequence occurs at the outermost suppression level (see \O3 and \O4). Horizontal motions corresponding to non-overstruck glyph widths still occur. These sequences also reset the registers opminx, opminy, opmaxx, and opmaxy to -1. These four registers mark the top left and bottom right hand corners of a box encompassing all written or drawn output.\O2
At the outermost suppression level, enable emission of glyphs and geometric objects, and write to the standard error stream the page number and values of the four aforementioned registers encompassing glyphs written since the last interpolation of a \O sequence, as well as the page offset, line length, image file name (if any), horizontal and vertical device motion quanta, and input file name. Numeric values are in basic units.\O3
\O4
Begin and end a nested suppression level, respectively. grohtml uses this mechanism to create images of output preprocessed with pic, eqn, and tbl. At startup, troff is at the outermost suppression level. pre-grohtml generates these sequences when processing the document, using troff with the ps output device, Ghostscript, and the PNM tools to produce images in PNG format. These sequences start a new page if the device is not html or xhtml, to reduce the number of images crossing a page boundary.\O5[Pfile]
At the outermost suppression level, write the name file to the standard error stream at position P, which must be one of l, r, c, or i, corresponding to left, right, centered, and inline alignments within the document, respectively. file is is a name associated with the production of the next image.
\R’name ±n’
Synonymous with “.nr name ±n”.
\s[±n**]**
\s*±[n]
\s’±n***’**
\s*±*’n’
Set the type size to, or increment or decrement it by, n scaled points.
\Ve
**\V(**ev
\V[env]
Interpolate contents of the environment variable env, as returned by
\V is interpreted even in copy mode.
\X’anything’
Within \X arguments, the escape sequences ***, ***, ***, and ** are ignored; ****space and ** are converted to single space characters; and ** is reduced to ***. So that the basic Latin subset of the Unicode character set (that is, ISO 646:1991-IRV or, popularly, “US-ASCII”) can be reliably encoded in anything, the special character escape sequences ****, \aq], \dq], \ga], \ha], \rs], and \ti] are mapped to basic Latin characters; see
For this transformation, character translations and definitions are ignored. Other escape sequences are not supported.
If the use_charnames_in_special directive appears in the output device’s DESC file, the use of special character escape sequences is not an error; they are simply output verbatim (with the exception of the seven mapped to Unicode basic Latin characters, discussed above). use_charnames_in_special is currently employed only by
\Ym
**\Y(**ma
\Y[mac]
Interpolate a macro as a device control command. This is similar to \X’\[mac]’, except the contents of mac are not interpreted, and mac can be a macro and thus contain newlines, whereas the argument to \X cannot. This inclusion of newlines requires an extension to the AT&T troff output format, and will confuse postprocessors that do not know about it.
\Z’anything’
Save the drawing position, format anything, then restore it. Tabs and leaders in the argument are ignored with an error diagnostic.
**
Everything up to and including the next newline is ignored. This escape sequence is interpreted even in copy mode. ** is like ****, except that ** does not ignore a newline; the latter therefore cannot be used by itself for a whole-line comment—it leaves a blank line on the input stream.
\0
Interpolate the name by which the macro being interpreted was called. In GNU troff this name can vary; see the als request.
**(**nn
\[nnn]
In a macro or string definition, interpolate the nnth or nnnth argument. Macros and strings can have an unlimited number of arguments.
\*
In a macro or string definition, interpolate the catenation of all arguments, separated by spaces.
@
In a macro or string definition, interpolate the catenation of all arguments, with each surrounded by double quotes and separated by spaces.
^
In a macro or string definition, interpolate the catenation of all arguments constructed in a form suitable for passage to the ds request.
**
Interpolate a transparent dummy character—one that is ignored by end-of-sentence detection. It behaves as ****, except that ** is treated as letters and numerals normally are after “.”, “?”, and “!”; ** cancels end-of-sentence detection, and ** does not.
\[*“string *
[arg . . .] ] Interpolate string, passing it arg . . . as arguments.
**
Apply an italic correction: modify the spacing of the preceding glyph so that the distance between it and the following glyph is correct if the latter is of upright shape. For example, if an italic “f ” is followed immediately by a roman right parenthesis, then in many fonts the top right portion of the “f ” overlaps the top left of the right parenthesis, which is ugly. Inserting / between them
avoids this problem. Use this escape sequence whenever an oblique glyph is immediately followed by an upright glyph without any intervening space.
**
Apply a left italic correction: modify the spacing of the following glyph so that the distance between it and the preceding glyph is correct if the latter is of upright shape. For example, if a roman left parenthesis is immediately followed by an italic “f ”, then in many fonts the bottom left portion of the “f ” overlaps the bottom of the left parenthesis, which is ugly. Inserting ** between them
avoids this problem. Use this escape sequence whenever an upright glyph is followed immediately by an oblique glyph without any intervening space.
**
Insert a non-printing break point. That is, a word can break there, but the soft hyphen character does not mark the break point if it does (in contrast to “ ****”). This escape sequence is an input word boundary, so the remainder of the word is subject to hyphenation as normal.
*anything*
When used in a diversion, this transparently embeds anything in the diversion. anything is read in copy mode. When the diversion is reread, anything is interpreted. anything may not contain newlines; use ** if you want to embed newlines in a diversion. The escape sequence ** is also recognized in copy mode and becomes an internal code; it is this code that terminates anything. Thus
.nr x 1
.nf
.di d
\?\?\\?\\\\
x\??? .di .nr x 2 .di e .d .di .nr x 3 .di f .e .di .nr x 4 .f
prints 4.
*char]*
Typeset the special character char.
*base-char combining-component *
. . .] Typeset a composite glyph consisting of base-char overlaid with one or more combining-components. For example, “ \A ho] ” is a capital letter “A” with a “hook accent” (ogonek). See the composite request below; Groff: The GNU Implementation of troff, the groff Texinfo manual, for details of composite glyph name construction; and
for a list of components used in composite glyph names.
**
Insert an unbreakable space that is adjustable like an ordinary space. It is discarded from the end of an output line if a break is forced.
Restricted requests
To mitigate risks from untrusted input documents, the pi and sy requests are disabled by default.
-U option enables the formatter’s “unsafe mode”, restoring their function (and enabling additional groff extension requests, open, opena, and pso).
New requests
**.aln **new old
Create alias new for existing register named old, causing the names to refer to the same stored value. If old is undefined, a warning in category “reg” is generated and the request is ignored. To remove a register alias, invoke rr on its name. A register’s contents do not become inaccessible until it has no more names.
**.als **new old
Create alias new for existing request, string, macro, or diversion named old, causing the names to refer to the same stored object. If old is undefined, a warning in category “mac” is produced, and the request is ignored. The “am”, “as”, da, de, di, and ds requests (together with their variants) create a new object only if the name of the macro, diversion, or string is currently undefined or if it is defined as a request; normally, they modify the value of an existing object. To remove an alias, invoke rm on its name. The object itself is not destroyed until it has no more names.
When a request, macro, string, or diversion is aliased, redefinitions and appendments “write through” alias names. To replace an alias with a separately defined object, you must use the rm request on its name first.
**.am1 ***name *
[end-name] As “am”, but compatibility mode is disabled while the appendment to name is interpreted: a “compatibility save” token is inserted at its beginning, and a “compatibility restore” token at its end. As a consequence, the requests “am”, am1, de, and de1 can be intermixed freely since the compatibility save/restore tokens affect only the parts of the macro populated by am1 and de1.
**.ami ***name *
[end-name] Append to macro indirectly. See dei below.
**.ami1 ***name *
[end-name] As ami, but compatibility mode is disabled during interpretation of the appendment.
**.as1 ***name *
[contents] As “as”, but compatibility mode is disabled while the appendment to name is interpreted: a “compatibility save” token is inserted at the beginning of contents, and a “compatibility restore” token after it. As a consequence, the requests “as”, as1, ds, and ds1 can be intermixed freely since the compatibility save/restore tokens affect only the portions of the strings populated by as1 and ds1.
**.asciify **div
Unformat the diversion div in a way such that Unicode basic Latin (ASCII) characters, characters translated with the trin request, space characters, and some escape sequences, that were formatted in the diversion div are treated like ordinary input characters when div is reread. Doing so can be useful in conjunction with the writem request. asciify can be also used for gross hacks; for example, the following sets register n to 1.
.tr @.
.di x
@nr n 1
.br
.di
.tr @@
.asciify x
.x
asciify cannot return all items in a diversion to their source equivalent: nodes such as those produced by \N[. . .] will remain nodes, so the result cannot be guaranteed to be a pure string. See section “Copy mode” in
Glyph parameters such as the type face and size are not preserved; use unformat to achieve that.
.backtrace
Write backtrace of input stack to the standard error stream. See the -b option of
**.blm **[
name] Set a blank line macro (trap). If a blank line macro is thus defined, groff executes macro when a blank line is encountered in the input file, instead of the usual behavior. A line consisting only of spaces is also treated as blank and subject to this trap. If no argument is supplied, the default blank line behavior is (re-)established.
**.box **[
name]
**.boxa **[ name] Divert (or append) output to name, similarly to the di and da requests, respectively. Any pending output line is not included in the diversion. Without an argument, stop diverting output; any pending output line inside the diversion is discarded.
.break
Exit a “while” loop. Do not confuse this request with a typographical break or the br request. See “continue”.
.brp
Break and adjust line; this is the AT&T troff escape sequence \p in request form.
**.cflags ***n c1 c2 *
. . . Assign properties encoded by the number n to characters c1, c2, and so on. Ordinary and special characters have certain associated properties. (Glyphs don’t: to GNU troff, like AT&T device-independent troff, a glyph is an identifier corresponding to a rectangle with some metrics; see
The first argument is the sum of the desired flags and the remaining arguments are the characters to be assigned those properties. Spaces between the cn arguments are optional. Any argument cn can be a character class defined with the class request rather than an individual character.
The non-negative integer n is the sum of any of the following. Some combinations are nonsensical, such as “33” (1 + 32).
Recognize the character as ending a sentence if followed by a newline or two spaces. Initially, characters “.?!” have this property.
Enable breaks before the character. A line is not broken at a character with this property unless the characters on each side both have non-zero hyphenation codes. This exception can be overridden by adding 64. Initially, no characters have this property.
Enable breaks after the character. A line is not broken at a character with this property unless the characters on each side both have non-zero hyphenation codes. This exception can be overridden by adding 64. Initially, characters “-\hy]\em] ” have this property.
Mark the glyph associated with this character as overlapping other instances of itself horizontally. Initially, characters “ \ul]\rn]\ru]\radicalex]\sqrtex] ” have this property.
Mark the glyph associated with this character as overlapping other instances of itself vertically. Initially, the character “ \br] ” has this property.
Mark the character as transparent for the purpose of end-of-sentence recognition. In other words, an end-of-sentence character followed by any number of characters with this property is treated as the end of a sentence if followed by a newline or two spaces. This is the same as having a zero space factor in TeX. Initially, characters “ ’ " )]*\dg]\dd]\rq]\[cq] ” have this property.
Ignore hyphenation codes of the surrounding characters. Use this value in combination with values 2 and 4. Initially, no characters have this property.
For example, if you need an automatic break point after the en-dash in numeric ranges like “3000–5000”, insert
.cflags 68 [en]
into your document. However, this can lead to bad layout if done without thinking; in most situations, a better solution than changing the cflags value is inserting “****” right after the hyphen at the places that really need a break point.
The remaining values were implemented for East Asian language support; those who use alphabetic scripts exclusively can disregard them.
Prohibit a break before the character, but allow a break after the character. This works only in combination with values 256 and 512 and has no effect otherwise. Initially, no characters have this property.
Prohibit a break after the character, but allow a break before the character. This works only in combination with values 128 and 512 and has no effect otherwise. Initially, no characters have this property.
Allow a break before or after the character. This works only in combination with values 128 and 256 and has no effect otherwise. Initially, no characters have this property.
In contrast to values 2 and 4, the values 128, 256, and 512 work pairwise. If, for example, the left character has value 512, and the right character 128, no break will be automatically inserted between them. If we use value 6 instead for the left character, a break after the character can’t be suppressed since the neighboring character on the right doesn’t get examined.
**.char **c contents
Define the ordinary or special character c as contents, which can be empty. More precisely, char defines a groff object (or redefines an existing one) that is accessed with the name c on input, and produces contents on output. Every time c is to be formatted, contents is processed in a temporary environment and the result is wrapped up into a single object. Compatibility mode is turned off and the escape character is set to ** while contents is processed. Any emboldening, constant spacing, or track kerning is applied to this object as a whole, not to each character in contents.
An object defined by this request can be used just like a glyph provided by the output device. In particular, other characters can be translated to it with the tr request; it can be made the tab or leader fill character with the tc and lc requests; sequences of it can be drawn with the \l and \L escape sequences; and, if the hcode request is used on c, it is subject to automatic hyphenation.
To prevent infinite recursion, occurrences of c within its own definition are treated normally (as if it were not being defined with char). The tr and trin requests take precedence if char both apply to c. A character definition can be removed with the rchar request.
**.chop **object
Remove the last character from the macro, string, or diversion object. This is useful for removing the newline from the end of a diversion that is to be interpolated as a string. This request can be used repeatedly on the same object; see section “gtroff Internals” in Groff: The GNU Implementation of troff, the groff Texinfo manual, for discussion of nodes inserted by groff.
**.class ***name c1 c2 *
. . . Define a character class (or simply “class”) name comprising the characters or range expressions c1, c2, and so on.
A class thus defined can then be referred to in lieu of listing all the characters within it. Currently, only the cflags request can handle references to character classes.
In the request’s simplest form, each cn is a character (or special character).
.class [quotes] ’ [aq] [dq] [oq] [cq] [lq] [rq]
Since class and special character names share the same name space, we recommend starting and ending the class name with “[” and “]”, respectively, to avoid collisions with existing character names defined by groff or the user (with char and related requests). This practice applies the presence of “]” in the class name to prevent the usage of the special character escape form “**. . .]**”, thus you must use the \C escape to access a class with such a name.
You can also use a character range expression consisting of a start character followed by “-” and then an end character. Internally, GNU troff converts these two character names to Unicode code points (according to the groff glyph list [GGL]), which determine the start and end values of the range. If that fails, the class definition is skipped. Furthermore, classes can be nested.
.class [prepunct] , : ; > } .class [prepunctx] \C’[prepunct]’ [u2013]-[u2016]
The class “[prepunctx]” thus contains the contents of the class “[prepunct]” and characters in the range U+2013–U+2016.
If you want to include “-” in a class, it must be the first character value in the argument list, otherwise it gets misinterpreted as part of the range syntax.
It is not possible to use class names as end points of range definitions.
A typical use of the class request is to control line-breaking and hyphenation rules as defined by the cflags request. For example, to inhibit line breaks before the characters belonging to the “[prepunctx]” class defined in the previous example, you can write the following.
.cflags 2 \C’[prepunctx]'
**.close **stream
Close the stream named stream, invalidating it as an argument to the write request. See open.
**.composite **c1 c2
Map character name c1 to character name c2 when c1 is a combining component in a composite glyph. Typically, this remaps a spacing glyph to a combining one.
.continue
Skip the remainder of a “while” loop’s body, immediately starting the next iteration. See break.
**.color **n
If n is non-zero or missing, enable colors (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 recognized, and the incompatibilities they cause do not arise.
**.defcolor ***ident scheme color-component *
. . . Define a color named ident. scheme identifies a color space and determines the number of required color-components; it must be one of “rgb” (three components), “cmy” (three components), “cmyk” (four components), or “gray” (one component). “grey” is accepted as a synonym of “gray”. The color components can be encoded as a hexadecimal value starting with # or ##. The former indicates that each component is in the range 0–255 (0–FF), the latter the range 0–65535 (0–FFFF). Alternatively, each color component can be specified as a decimal fraction in the range 0–1, interpreted using a default scaling unit of “f”, which multiplies its value by 65,536 (but clamps it at 65,535).
Each output device has a color named “default”, which cannot be redefined. A device’s default stroke and fill colors are not necessarily the same.
**.de1 ***name *
[end-name] Define a macro to be interpreted with compatibility mode disabled. When name is called, compatibility mode enablement status is saved; it is restored when the call completes.
**.dei ***name *
[end-name] Define macro indirectly, with the name of the macro to be defined in string name and the name of the end macro terminating its definition in string end-name.
**.dei1 ***name *
[end-name] As dei, but compatibility mode is disabled while the definition of the macro named in string name is interpreted.
**.device **anything
Write anything, read in copy mode, to troff output as a device control command. An initial neutral double quote is stripped to allow the embedding of leading spaces.
**.devicem **name
Write contents of macro or string name to troff output as a device control command.
**.do ***name *
[arg . . .] Interpret the string, request, diversion, or macro name (along with any arguments) with compatibility mode disabled. Compatibility mode is restored (only if it was active) when the expansion of name is interpreted; that is, the restored compatibility state applies to the contents of the macro, string, or diversion name as well as data read from files or pipes if name is any of the so, soquiet, mso, msoquiet, or pso requests.
For example,
.de mac1 FOO .. .de1 mac2 groff .mac1 .. .de mac3 compatibility .mac1 .. .de ma $1 .. .cp 1 .do mac1 .do mac2 " mac2, defined with .de1, calls “mac1” .do mac3 " mac3 calls “ma” with argument “c1” .do mac3 [ti] " groff syntax accepted in .do arguments
results in
FOO groff FOO compatibility c1 ~
as output.
**.ds1 **name contents
As ds, but compatibility mode is disabled while name is interpreted: a “compatibility save” token is inserted at the beginning of contents, and a “compatibility restore” token after it.
.ecr
Restore the escape character saved with ecs, or set escape character to “ ****” if none has been saved.
.ecs
Save the current escape character.
**.evc **env
Copy the properties of environment env to the current environment, except for the following data.
a partially collected line, if present;
the interruption status of the previous input line (due to use of the **
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.