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 smart about 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 only necessary when two integer arguments would clash or if the preceding argument ends with a string argument.
Print a special character named xxx. The trailing syntactical space or line break is necessary to allow glyph names of arbitrary length. The glyph is printed at the current print position; the glyph’s size is read from the font file. The print position is not changed.
Print glyph g at the current print position;30 the glyph’s size is read from the font file. The print position is not changed.
Set font to font number n (a non-negative integer).
Move right to the absolute vertical position n (a non-negative integer in basic units ‘u’ relative to left edge of current page.
Move n (a non-negative integer) basic units ‘u’ horizontally
to the right. The original UNIX troff manual allows negative
values for n also, but
gtroff doesn’t use this.
m color-scheme [component …]
Set the color for text (glyphs), line drawing, and the outline of
graphic objects using different color schemes; the analoguous command
for the filling color of graphic objects is ‘DF’. The color
components are specified as integer arguments between 0 and 65536. The
number of color components and their meaning vary for the different
color schemes. These commands are generated by
\m. No position changing. These commands are a
mc cyan magenta yellow
Set color using the CMY color scheme, having the 3 color components cyan, magenta, and yellow.
Set color to the default color value (black in most cases). No component arguments.
Set color to the shade of gray given by the argument, an integer between 0 (black) and 65536 (white).
mk cyan magenta yellow black
Set color using the CMYK color scheme, having the 4 color components cyan, magenta, yellow, and black.
mr red green blue
Set color using the RGB color scheme, having the 3 color components red, green, and blue.
Print glyph with index n (a non-negative integer) of the
current font. This command is a
n b a
Inform the device about a line break, but no positioning is done by this
command. In AT&T
troff, the integer arguments b
and a informed about the space before and after the current
line to make the intermediate output more human readable without
performing any action. In
groff, they are just ignored, but they
must be provided for compatibility reasons.
Begin a new page in the outprint. The page number is set to n. This page is completely independent of pages formerly processed even if those have the same page number. The vertical position on the outprint is automatically set to 0. All positioning, writing, and drawing is always done relative to a page, so a ‘p’ command must be issued before any of these commands.
Set point size to n scaled points (this is unit ‘z’).
troff used the unit points (‘p’) instead.
See Output Language Compatibility.
t xxx dummy-arg<whitespace>
Print a word, i.e., a sequence of characters xxx representing
output glyphs which names are single characters, 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). The first glyph should be printed at the current position,
the current horizontal position should then be increased by the width of
the first glyph, and so on for each glyph. The widths of the glyphs are
read from the font file, scaled for the current point size, and rounded
to a multiple of the horizontal resolution. Special characters cannot
be printed using this command (use the ‘C’ command for special
characters). This command is a
gtroff extension; it is only used
for devices whose DESC file contains the
(see DESC File Format).
u n xxx<whitespace>
Print word with track kerning. This is the same as the ‘t’ command
except that after printing each glyph, the current horizontal position
is increased by the sum of the width of that glyph and n (an
integer in basic units ‘u’). This command is a
extension; it is only used for devices whose DESC file contains
tcommand keyword (see DESC File Format).
Move down to the absolute vertical position n (a non-negative integer in basic units ‘u’) relative to upper edge of current page.
Move n basic units ‘u’ down (n is a non-negative
integer). The original UNIX troff manual allows negative
values for n also, but
gtroff doesn’t use this.
Informs about a paddable white space to increase readability. The spacing itself must be performed explicitly by a move command.