Next: , Previous: , Up: Command Reference   [Contents][Index]


6.1.2.2 Simple Commands

The commands in this subsection have a command code consisting of a single character, taking a fixed number of arguments. Most of them are commands for positioning and text writing. These commands are tolerant of whitespace. Optionally, syntactical space can be inserted before, after, and between the command letter and its arguments. All of these commands are stackable; i.e., they can be preceded by other simple commands or followed by arbitrary other commands on the same line. A separating syntactical space is necessary only when two integer arguments would clash or if the preceding argument ends with a string argument.

C idwhitespace

Typeset the glyph of the special character id. Trailing syntactical space is necessary to allow special character names of arbitrary length. The drawing position is not advanced.

c g

Typeset the glyph of the ordinary character c. The drawing position is not advanced.

f n

Select the font mounted at position n. n cannot be negative.

H n

Horizontally move the drawing position to n basic units from the left edge of the page. n cannot be negative.

h n

Move the drawing position right n basic units. AT&T troff allowed negative n; GNU troff does not produce such values, but groff’s output driver library handles them.

m color-scheme [component]

Select the stroke color using the components in the color space scheme. Each component is an integer between 0 and 65535. The quantity of components and their meanings vary with each scheme. This command is a groff extension.

mc cyan magenta yellow

Use the CMY color scheme with components cyan, magenta, and yellow.

md

Use the default color (no components; black in most cases).

mg gray

Use a grayscale color scheme with a component ranging between 0 (black) and 65535 (white).

mk cyan magenta yellow black

Use the CMYK color scheme with components cyan, magenta, yellow, and black.

mr red green blue

Use the RGB color scheme with components red, green, and blue.

N n

Typeset the glyph with index n in the current font. n is normally a non-negative integer. The drawing position is not advanced. The html and xhtml devices use this command with negative n to produce unbreakable space; the absolute value of n is taken and interpreted in basic units.

n b a

Indicate a break. No action is performed; the command is present to make the output more easily parsed. The integers b and a describe the vertical space amounts before and after the break, respectively. GNU troff issues this command but groff’s output driver library ignores it. See v and V below.

p n

Begin a new page, setting its number to n. Each page is independent, even from those using the same number. The vertical drawing position is set to 0. All positioning, writing, and drawing commands are interpreted in the context of a page, so a p command must precede them.

s n

Set type size to n scaled points (unit z in GNU troff. AT&T troff used unscaled points p instead; see Output Language Compatibility.

t xyzwhitespace
t xyz dummy-argwhitespace

Typeset a word xyz; that is, set a sequence of ordinary glyphs named x, y, z, …, terminated by a space character or a line break; an optional second integer argument is ignored (this allows the formatter to generate an even number of arguments). Each glyph is set at the current drawing position, and the position is then advanced horizontally by the glyph’s width. A glyph’s width is read from its metrics in the font description file, scaled to the current type size, and rounded to a multiple of the horizontal motion quantum. Use the C command to emplace glyphs of special characters. The t command is a groff extension and is output only for devices whose DESC file contains the tcommand directive; see DESC File Format.

u n xyzwhitespace

Typeset word xyz with track kerning. As t, but after placing each glyph, the drawing position is further advanced horizontally by n basic units (u). The u command is a groff extension and is output only for devices whose DESC file contains the tcommand directive; see DESC File Format.

V n

Vertically move the drawing position to n basic units from the top edge of the page. n cannot be negative.

v n

Move the drawing position down n basic units. AT&T troff allowed negative n; GNU troff does not produce such values, but groff’s output driver library handles them.

w

Indicate an inter-word space. No action is performed; the command is present to make the output more easily parsed. Only adjustable, breakable inter-word spaces are thus described; those resulting from \~ or horizontal motion escape sequences are not. GNU troff issues this command but groff’s output driver library ignores it. See h and H above.


Next: , Previous: , Up: Command Reference   [Contents][Index]