Prepare output for printer dev. The default device is ps. See groff(1) for acceptable devices.
-Mdir
Prepend dir to the default search path for gremlin files. The default path is (in that order) the current directory, the home directory, /usr/share/tmac, /usr/share/tmac, and /usr/share/tmac.
-Fdir
Search dir for subdirectories devname (name is the name of the device) for the DESC file before the default font directories /usr/share/groff_font, /usr/share/groff_font, and /usr/share/groff_font.
-C
Recognize .GS and .GE (resp. .GF) even when followed by a character other than space or newline.
Set gremlins text size number 1 (2, 3, or 4) to N points. The default is 12 (resp. 16, 24, and 36).
roman f
italics f
bold f
special f
Set the roman (italics, bold, or special) font to troffs font f (either a name or number). The default is R (resp. I, B, and S).
l f
stipple f
Set the stipple font to troffs stipple font f (name or number). The command stipple may be abbreviated down as far as st (to avoid confusion with special). There is no default for stipples (unless one is set by the default command), and it is invalid to include a gremlin picture with polygons without specifying a stipple font.
x N
scale N
Magnify the picture (in addition to any default magnification) by N, a floating point number larger than zero. The command scale may be abbreviated down to sc.
narrow N
medium N
thick N
Set the thickness of gremlins narrow (resp. medium and thick) lines to N times 0.15pt (this value can be changed at compile time). The default is 1.0 (resp. 3.0 and 5.0), which corresponds to 0.15pt (resp. 0.45pt and 0.75pt). A thickness value of zero selects the smallest available line thickness. Negative values cause the line thickness to be proportional to the current point size.
pointscale <off/on>
Scale text to match the picture. Gremlin text is usually printed in the point size specified with the commands 1, 2, 3, or 4 regardless of any scaling factors in the picture. Setting pointscale will cause the point sizes to scale with the picture (within troffs limitations, of course). An operand of anything but off will turn text scaling on.
default
Reset the picture environment defaults to the settings in the current picture. This is meant to be used as a global parameter setting mechanism at the beginning of the troff input file, but can be used at any time to reset the default settings.
width N
Forces the picture to be N inches wide. This overrides any scaling factors present in the same picture. width0 is ignored.
height N
Forces picture to be N inches high, overriding other scaling factors. If both width and height are specified the tighter constraint will determine the scale of the picture. Height and width commands are not saved with a default command. They will, however, affect point size scaling if that option is set.
file name
Get picture from gremlin file name located the current directory (or in the library directory; see the -M option above). If two file commands are given, the second one overrides the first. If name doesnt exist, an error message is reported and processing continues from the .GE line.
The first line of each gremlin file contains either the string gremlinfile (AED version) or sungremlinfile (SUN/X11)
o
The second line of the file contains an orientation, and x and y values for a positioning point, separated by spaces. The orientation, either 0 or 1, is ignored by the SUN/X11 version. 0 means that gremlin will display things in horizontal format (drawing area wider than it is tall, with menu across top). 1 means that gremlin will display things in vertical format (drawing area taller than it is wide, with menu on left side). x and y are floating point values giving a positioning point to be used when this file is read into another file. The stuff on this line really isnt all that important; a value of 1 0.00 0.00 is suggested.
o
The rest of the file consists of zero or more element specifications. After the last element specification is a line containing the string -1.
o
Lines longer than 127 characters are chopped to this limit.
The first line of each element contains a single decimal number giving the type of the element (AED version) or its ASCII name (SUN/X11 version). See Table 2.
gremlin File Format - Object Type Specification
AED Number
SUN/X11 Name
Description
0
BOTLEFT
bottom-left-justified text
1
BOTRIGHT
bottom-right-justified text
2
CENTCENT
center-justified text
3
VECTOR
vector
4
ARC
arc
5
CURVE
curve
6
POLYGON
polygon
7
BSPLINE
b-spline
8
BEZIER
B[e]zier
10
TOPLEFT
top-left-justified text
11
TOPCENT
top-center-justified text
12
TOPRIGHT
top-right-justified text
13
CENTLEFT
left-center-justified text
14
CENTRIGHT
right-center-justified text
15
BOTCENT
bottom-center-justified text
Table 2.
Type Specifications in gremlin Files
o
After the object type comes a variable number of lines, each specifying a point used to display the element. Each line contains an x-coordinate and a y-coordinate in floating point format, separated by spaces. The list of points is terminated by a line containing the string -1.0 -1.0 (AED version) or a single asterisk, * (SUN/X11 version).
o
After the points comes a line containing two decimal values, giving the brush and size for the element. The brush determines the style in which things are drawn. For vectors, arcs, and curves there are six legal brush values:
1 -
thin dotted lines
2 -
thin dot-dashed lines
3 -
thick solid lines
4 -
thin dashed lines
5 -
thin solid lines
6 -
medium solid lines
For polygons, one more value, 0, is legal. It specifies a polygon with an invisible border. For text, the brush selects a font as follows:
1 -
roman (R font in groff)
2 -
italics (I font in groff)
3 -
bold (B font in groff)
4 -
special (S font in groff)
If youre using grn to run your pictures through groff, the font is really just a starting font: The text string can contain formatting sequences like \fI or \d which may change the font (as well as do many other things). For text, the size field is a decimal value between 1 and 4. It selects the size of the font in which the text will be drawn. For polygons, this size field is interpreted as a stipple number to fill the polygon with. The number is used to index into a stipple font at print time.
o
The last line of each element contains a decimal number and a string of characters, separated by a single space. The number is a count of the number of characters in the string. This information is only used for text elements, and contains the text string. There can be spaces inside the text. For arcs, curves, and vectors, this line of the element contains the string 0.