Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ troff(5) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

troff(1)

troff(5)




troff(5) troff(5)
NAME troff - description of troff output language DESCRIPTION The device-independent troff 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 as n and are ASCII strings. Strings inside of brackets ([]) are optional. troff may produce them, but they are not required for the specification of the language. The character \n has the standard meaning of ``newline'' character. Between commands, white space has no meaning. White space characters are spaces and newlines. sn The point size of the characters to be generated. fn The font mounted in the specified position is to be used. The number ranges from 0 to the highest font presently mounted. 0 is a special position, invoked by troff, but not directly accessible to the troff user. Normally fonts are mounted starting at position 1. cx Generate the character x at the current location on the page; x is a single ASCII character. Cxyz Generate the special character xyz. The name of the character is delimited by white space. The name will be one of the special characters legal for the typesetting device as specified by the device specification found in the file DESC. This file resides in a directory specific for the typesetting device. (See font(5) and /usr/lib/font/dev*.) Hn Change the horizontal position on the page to the number specified. The number is in basic units of motions as specified by DESC. This is an absolute ``goto''. hn Add the number specified to the current horizontal position. This is a relative ``goto''. Vn Change the vertical position on the page to the number specified (down is positive). vn Add the number specified to the current vertical position. nnx This is a two-digit number followed by an ASCII character. The meaning is a combination of hn followed January 1992 1



troff(5) troff(5)
by cx. The two digits nn are added to the current horizontal position and then the ASCII character, x, is produced. This is the most common form of character specification. nb a This command indicates that the end of a line has been reached. No action is required, though by convention the horizontal position is set to 0. troff will specify a resetting of the x,y coordinates on the page before requesting that more characters be printed. 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 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. pn Begin a new page. The new page number is included in this command. The vertical position on the page should be set to 0. # .... \n A line beginning with a pound sign is a comment. Dl x y\n Draw a line from the current location to x,y. Dc d\n Draw a circle of diameter d with the leftmost edge being at the current location (x, y). The current location after drawing the circle will be x+d,y, the rightmost edge of the circle. De dx dy\n Draw an ellipse with the specified axes. dx is the axis in the x direction and dy is the axis in the y direction. The leftmost edge of the ellipse will be at the current location. After drawing the ellipse the current location will be x+dx,y. Da x y u v Draw a counterclockwise arc from the current location to x+u,y+v using a circle of whose center is x,y from the current location. The current location after drawing the arc will be at its end. D~ x y x y...\n Draw a spline curve (wiggly line) between each of the x,y coordinate pairs starting at the current location. The final location will be the final x,y pair of the list. 2 January 1992



troff(5) troff(5)
x i[nit]\n Initialize the typesetting device. The actions required are dependent on the device. An init command will always occur before any output generation is attempted. x T device\n The name of the typesetter is device. This is the same as the argument to the -T option. The information about the typesetter will be found in the directory /usr/lib/font/dev{device}. x r[es] n h v\n The resolution of the typesetting device in increments per inch is n. Motion in the horizontal direction can take place in units of h basic increments. Motion in the vertical direction can take place in units of v basic increments. For example, the APS-5 typesetter has a basic resolution of 723 increments per inch and can move in either direction in 723rds of an inch. Its specification is: x res 723 1 1 x p[ause]\n Pause. Cause the current page to finish but do not relinquish the typesetter. x s[top]\n Stop. Cause the current page to finish and then relinquish the typesetter. Perform any shutdown and bookkeeping procedures required. x t[railer]\n Generate a trailer. On some devices no operation is performed. x f[ont] n name\n Load the font name into position n. x H[eight] n\n Set the character height to n points. This causes the letters to be elongated or shortened. It does not affect the width of a letter. x S[lant] n\n Set the slant to n degrees. Only some typesetters can do this and not all angles are supported. SEE ALSO troff(1) in A/UX Command Reference January 1992 3



troff(5) troff(5)
``nroff/troff Reference'' and ``Introduction to troff and mm'' in A/UX Text Processing Tools 4 January 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026