3 Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
5 Permission is granted to make and distribute verbatim copies of
6 this manual provided the copyright notice and this permission notice
7 are preserved on all copies.
9 Permission is granted to copy and distribute modified versions of this
10 manual under the conditions for verbatim copying, provided that the
11 entire resulting derived work is distributed under the terms of a
12 permission notice identical to this one.
14 Permission is granted to copy and distribute translations of this
15 manual into another language, under the above conditions for modified
16 versions, except that this permission notice may be included in
17 translations approved by the Free Software Foundation instead of in
30 .\" Like TP, but if specified indent is more than half
31 .\" the current line-length - indent, use the default indent.
33 . ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
38 .TH @G@GRN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
40 @g@grn \- groff preprocessor for gremlin files
59 It is possible to have whitespace between a command line option and its
63 is a preprocessor for including
69 writes to standard output, processing only input lines between two that
74 Those lines must contain
77 These commands request a
79 file, and the picture in that file is
80 converted and placed in the
85 request may be followed by a C, L, or R to center, left, or right
88 picture (default justification is center).
91 is mentioned, the standard input is read.
92 At the end of the picture, the position on the page is the bottom of the
101 the position is left at the top of the picture.
103 Please note that currently only the \-me macro package has support for
109 The following command-line options are understood:
112 Prepare output for printer
114 The default device is
117 .BR groff (@MAN1EXT@)
118 for acceptable devices.
123 to the default search path for
126 The default path is (in that order) the current directory, the home
128 .BR @SYSTEMMACRODIR@ ,
129 .BR @LOCALMACRODIR@ ,
139 is the name of the device) for the
141 file before the default font directories
145 .BR @LEGACYFONTDIR@ .
154 even when followed by a character other than space or newline.
157 .\"This switch causes the picture to be traversed twice:
158 .\"The first time, only the interiors of filled polygons (as borderless
159 .\"polygons) are printed.
160 .\"The second time, the outline is printed as a series of line segments.
161 .\"This way, postprocessors that overwrite rather than merge picture elements
162 .\"(such as Postscript) can still have text and graphics on a shaded
166 Print the version number.
168 Each input line between
175 Commands consist of one or two strings separated by white space, the first
176 string being the command and the second its operand.
177 Commands may be upper or lower case and abbreviated down to one character.
179 Commands that affect a picture's environment (those listed before
181 see below) are only in effect for the current picture:
182 The environment is reinitialized to the defaults at the start of the next
184 The commands are as follows:
195 text size number 1 (2, 3, or 4) to
198 The default is 12 (16, 24, and 36, respectively).
207 Set the roman (italics, bold, or special) font to
211 (either a name or number).
212 The default is R (I, B, and S, respectively).
217 Set the stipple font to
224 may be abbreviated down as far as `st' (to avoid
229 default for stipples (unless one is set by the default command), and it is
232 picture with polygons without specifying a
238 Magnify the picture (in addition to any default magnification) by
240 a floating point number larger than zero.
243 may be abbreviated down to `sc'.
252 narrow (medium and thick, respectively) lines to
254 times 0.15pt (this value can be changed at compile time).
255 The default is 1.0 (3.0 and 5.0, respectively), which corresponds to 0.15pt
256 (0.45pt and 0.75pt, respectively).
257 A thickness value of zero selects the smallest available line thickness.
258 Negative values cause the line thickness to be proportional to the current
261 .BI pointscale\ <off/on>
262 Scale text to match the picture.
263 Gremlin text is usually printed in the point size specified with the
269 regardless of any scaling factors in the picture.
272 will cause the point sizes to scale with the picture (within
274 limitations, of course).
275 An operand of anything but
277 will turn text scaling on.
280 Reset the picture environment defaults to the settings in the current
282 This is meant to be used as a global parameter setting mechanism at the
285 input file, but can be used at any time to reset the
289 Forces the picture to be
292 This overrides any scaling factors present in the same picture.
300 inches high, overriding other scaling factors.
301 If both `width' and `height' are specified the tighter constraint will
302 determine the scale of the picture.
306 commands are not saved with a
309 They will, however, affect point size scaling if that option is set.
316 located the current directory (or in the library directory; see the
321 commands are given, the second one overrides the first.
324 doesn't exist, an error message is reported and processing continues from
328 .SH NOTES ABOUT GROFF
331 is a preprocessor, it doesn't know about current indents, point sizes,
332 margins, number registers, etc.
335 input can be placed between the
342 text is now processed by
344 so anything legal in a single line of
346 input is legal in a line of
348 text (barring `.' directives at the beginning of a line).
349 Thus, it is possible to have equations within a
351 figure by including in the
355 expressions enclosed by previously defined delimiters (e.g.
360 along with other preprocessors, it is best to run
370 should always be run last.
372 A picture is considered an entity, but that doesn't stop
374 from trying to break it up if it falls off the end of a page.
375 Placing the picture between `keeps' in \-me macros will ensure proper
389 to the width and height of the
391 figure (in device units) before entering the
393 request (this is for those who want to rewrite these macros).
394 .SH GREMLIN FILE FORMAT
395 There exist two distinct
397 file formats, the original format from the
399 graphic terminal version, and the
406 version allowing reference points with negative coordinates is
413 file does not contain negative coordinates, either format will be read
414 correctly by either version of
418 The other difference to the
420 format is the use of names for picture objects (e.g., POLYGON, CURVE)
422 Files representing the same picture are shown in Table 1 in each format.
427 sungremlinfile@@gremlinfile
428 0 240.00 128.00@@0 240.00 128.00
430 240.00 128.00@@240.00 128.00
431 185.00 120.00@@185.00 120.00
432 240.00 120.00@@240.00 120.00
433 296.00 120.00@@296.00 120.00
436 10 A Triangle@@10 A Triangle
438 224.00 416.00@@224.00 416.00
439 96.00 160.00@@96.00 160.00
440 384.00 160.00@@384.00 160.00
448 Table 1. File examples
452 The first line of each
454 file contains either the string
461 The second line of the file contains an orientation, and
465 values for a positioning point, separated by spaces.
466 The orientation, either
476 will display things in horizontal format (drawing area wider than it is
477 tall, with menu across top).
481 will display things in vertical format (drawing area taller than it is wide,
482 with menu on left side).
486 are floating point values giving a positioning point to be used when this
487 file is read into another file.
488 The stuff on this line really isn't all that important; a value of ``1 0.00
491 The rest of the file consists of zero or more element specifications.
492 After the last element specification is a line containing the string ``-1''.
494 Lines longer than 127 characters are chopped to this limit.
495 .SH ELEMENT SPECIFICATIONS
497 The first line of each element contains a single decimal number giving the
500 version) or its ASCII name
510 \fIgremlin\fP File Format \(mi Object Type Specification
512 \fIAED\fP Number@\fISUN\fP/\fIX11\fP Name@Description
513 0@BOTLEFT@bottom-left-justified text
514 1@BOTRIGHT@bottom-right-justified text
515 2@CENTCENT@center-justified text
522 10@TOPLEFT@top-left-justified text
523 11@TOPCENT@top-center-justified text
524 12@TOPRIGHT@top-right-justified text
525 13@CENTLEFT@left-center-justified text
526 14@CENTRIGHT@right-center-justified text
527 15@BOTCENT@bottom-center-justified text
532 Type Specifications in \fIgremlin\fP Files
536 After the object type comes a variable number of lines, each specifying a
537 point used to display the element.
538 Each line contains an x-coordinate and a y-coordinate in floating point
539 format, separated by spaces.
540 The list of points is terminated by a line containing the string ``-1.0
543 version) or a single asterisk, ``*''
547 After the points comes a line containing two decimal values, giving the
548 brush and size for the element.
549 The brush determines the style in which things are drawn.
550 For vectors, arcs, and curves there are six legal brush values:
555 1 \(mi@@thin dotted lines
556 2 \(mi@@thin dot-dashed lines
557 3 \(mi@@thick solid lines
558 4 \(mi@@thin dashed lines
559 5 \(mi@@thin solid lines
560 6 \(mi@@medium solid lines
563 For polygons, one more value, 0, is legal.
564 It specifies a polygon with an invisible border.
565 For text, the brush selects a font as follows:
570 1 \(mi@@roman (R font in groff)
571 2 \(mi@@italics (I font in groff)
572 3 \(mi@@bold (B font in groff)
573 4 \(mi@@special (S font in groff)
578 to run your pictures through
580 the font is really just a starting font:
581 The text string can contain formatting sequences like
585 which may change the font (as well as do many other things).
586 For text, the size field is a decimal value between 1 and 4.
587 It selects the size of the font in which the text will be drawn.
588 For polygons, this size field is interpreted as a stipple number to fill the
590 The number is used to index into a stipple font at print time.
592 The last line of each element contains a decimal number and a string of
593 characters, separated by a single space.
594 The number is a count of the number of characters in the string.
595 This information is only used for text elements, and contains the text
597 There can be spaces inside the text.
598 For arcs, curves, and vectors, this line of the element contains the string
600 .SH NOTES ON COORDINATES
604 and its coordinates reflect the
607 For vertical pictures, x-values range 116 to 511, and y-values from 0 to
609 For horizontal pictures, x-values range from 0 to 511 and y-values range
611 Although you needn't absolutely stick to this range, you'll get best results
612 if you at least stay in this vicinity.
613 Also, point lists are terminated by a point of (-1, -1), so you shouldn't
614 ever use negative coordinates.
616 writes out coordinates using format ``%f1.2''; it's probably a good idea to
617 use the same format if you want to modify the
620 .SH NOTES ON SUN/X11 COORDINATES
621 There is no longer a restriction on the range of coordinates used to create
626 However, files with negative coordinates
628 cause problems if displayed on the
631 .Tp \w'@FONTDIR@/devname/DESC'u+3n
632 .BI @FONTDIR@/dev name /DESC
633 Device description file for device
637 .BR groff (@MAN1EXT@),
638 .BR @g@pic (@MAN1EXT@),
642 David Slattengren and Barry Roitblat wrote the original Berkeley
645 Daniel Senderowicz and Werner Lemberg modified it for