[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Files Reference


troff File Format

Purpose

Describes the output language from the troff command.

Description

The device-independent troff file format outputs a pure ASCII description of a typeset document. The description specifies the typesetting device, the fonts, and the point sizes of characters to be used, as well as the position of each character on the page.

A list of all the legal commands follows. Most numbers are denoted by the Number variable and are ASCII strings. Strings inside [ ] (brackets) are optional. The troff command can produce them, but they are not required for the specification of the language. The \n command character has the standard meaning of new-line character. Between commands, white space has no meaning. White-space characters are spaces and new lines.

The following are the legal commands:

sNumber Specifies the point size of the characters to be generated.
fNumber Indicates the font is to be mounted in the position specified by the Number variable value, which ranges from 0 (zero) to the highest font currently mounted. The 0 (zero) value is a special position, called by the troff command, but not directly accessible by the user. Fonts are normally mounted starting at position 1 (one).
cCharacter Generates the specified character at the current location on the page; the value specified by the Character variable is a single-byte character.
CXYZ Generates the XYZ special character whose name is delimited by white space. The name is one of the special characters legal for the typesetting device as specified in the DESC file. This file resides in a directory specific to the typesetting device. For instruction, see troff Font File Format and the /usr/lib/font/devDevice directory.
HNumber Changes the horizontal position on the page to the number specified. The number is in basic units of motions as specified by the DESC file. This is an absolute goto statement.
hNumber Adds the number specified to the current horizontal position. This is a relative goto statement.
VNumber Changes the vertical position on the page to the number specified (down is positive).
vNumber Adds the number specified to the current vertical position.
NumberCharacter This is a two-digit number followed by an single-byte character. The meaning is a combination of the hNumber command followed by the cCharacter command. The specified number is added to the current horizontal position and then the single-byte character, specified by the Character variable, is produced. This is the most common form of character specification.
nB A Indicates that the end of a line has been reached. No action is required, though by convention the horizontal position is set to 0 (zero). The troff command specifies a resetting of the x,y coordinates on the page before printing more characters. The first number, B, is the amount of space before the line and the second number, A, the amount of space after the line. The second number is delimited by white space.
w A w command appears between words of the input document. No action is required. It is included so that one device can be emulated more easily on another device.
pNumber Begins a new page. The new page number is included in this command. The vertical position on the page should be set to 0 (zero).
#...\n Initiates a comment line with the # (pound sign).
Dl X Y Draws a line from the current position to that specified by the X,Y variables.
Dc D\n Draws a circle of the diameter specified by the D variable with the leftmost edge being at the current location (X,Y). The current location after drawing the circle is X+D,Y, the rightmost edge of the circle.
DeDX DY\n Draws an ellipse with the specified axes. The DX variable is the axis in the X direction and the DY variable is the axis in the Y direction. The leftmost edge of the ellipse is at the current location. After drawing the ellipse, the current location is X+DX,Y.
Da DH1 DV1 DH2 DV2\n Draws a counterclockwise arc from the current position to the DH1I+DH2, DV1+DV2 variable that has a center of DH1, DV1 from the current position. The current location after drawing the arc is at its end.
D~ X Y X Y ...\n Draws a spline curve (wiggly line) between each of the X,Y coordinate pairs starting at the current location. The final location is the final X,Y pair of the list.
x P[aper] PaperSize W L\n Specifies the name of the paper size to be printed. Valid paper sizes are Letter, Legal, A4, B5, Executive, and A5, where W and L are the paper width and length in machine units.
x i[nit]\n Initializes the typesetting device. The actions required are dependent on the device. An initializing command always occurs before any output generation is attempted.
x T Device\n Specifies the name of the typesetter with the Device variable. This is the same as the variable to the -T flag. Information about the typesetter is found in the /usr/lib/font/devDevice directory.
x r[es] N H V\n Specifies the resolution of the typesetting device in increments per inch with the N variable. The H variable specifies units of basic increments that horizontal motion will take place. The V variable indicates the units of basic increments for vertical motion.
x p[ause]\n Pauses the process by causing the current page to finish but does not relinquish the typesetter.
x s[top]\n Stops the process by causing the current page to finish and then relinquishes the typesetter. Performs any shutdown and bookkeeping procedures required.
x t[railer]\n Generates a trailer. On some devices, no operation is performed.
x f[ont] N Font\n Loads the specified font into position N.
x H[eight] N\n Sets the character height to N points. This causes the letters to be elongated or shortened. It does not affect the width of a letter. Not all typesetters can do this.
x S[lant] N\n Sets the slant to N degrees. Only some typesetters can do this and not all angles are supported.
x c[codeset] CS\n Switch to codeset CS. For example:

x codeset ISO8859-1

The following commands are effective on multi-byte characters.

QC1C2 Outputs the character specified by the 2 bytes specified by the C1 and C2 variables. The high-order bits can be set in these bytes.
RC1C2C3 Outputs the character specified by the three bytes of the C1, C2, and C3 parameters. The high-order bits can be set in these bytes.
SC1C2C3C4 Outputs the character specified by the four bytes of the C1, C2, C3, and C4 parameters. The high-order bits can be set in these bytes.

Implementation Specifics

This file is part of Formatting Tools in the Text Formatting System.

Files


/usr/lib/font/devDevice Contains the DESC file and phototypesetter-specific files.

Related Information

International Character Support in Text Formatting Overview in AIX 5L Version 5.1 System User's Guide: Operating System and Devices discusses the European-language extended character set and the commands that use it.

The troff Font File Format.

The troff command.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]