3 Copyright (C) 2000, 2001, 2002 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
25 .\" Like TP, but if specified indent is more than half
26 .\" the current line-length - indent, use the default indent.
28 .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
31 .TH @G@GRN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
33 @g@grn \- groff preprocessor for gremlin files
52 It is possible to have whitespace between a command line option and its
56 is a preprocessor for including
62 writes to standard output, processing only input lines between two that
67 Those lines must contain
70 These commands request a
72 file, and the picture in that file is
73 converted and placed in the
78 request may be followed by a C, L, or R to center, left, or right
81 picture (default justification is center).
84 is mentioned, the standard input is read.
85 At the end of the picture, the position on the page is the bottom of the
94 the position is left at the top of the picture.
96 Please note that currently only the \-me macro package has support for
102 The following command-line options are understood:
105 Prepare output for printer
107 The default device is
110 .BR groff (@MAN1EXT@)
111 for acceptable devices.
116 to the default search path for
119 The default path is (in that order) the current directory, the home
121 .BR @SYSTEMMACRODIR@ ,
122 .BR @LOCALMACRODIR@ ,
132 is the name of the device) for the
134 file before the default font directories
138 .BR @LEGACYFONTDIR@ .
147 even when followed by a character other than space or newline.
150 .\"This switch causes the picture to be traversed twice:
151 .\"The first time, only the interiors of filled polygons (as borderless
152 .\"polygons) are printed.
153 .\"The second time, the outline is printed as a series of line segments.
154 .\"This way, postprocessors that overwrite rather than merge picture elements
155 .\"(such as Postscript) can still have text and graphics on a shaded
159 Print the version number.
161 Each input line between
168 Commands consist of one or two strings separated by white space, the first
169 string being the command and the second its operand.
170 Commands may be upper or lower case and abbreviated down to one character.
172 Commands that affect a picture's environment (those listed before
174 see below) are only in effect for the current picture:
175 The environment is reinitialized to the defaults at the start of the next
177 The commands are as follows:
188 text size number 1 (2, 3, or 4) to
191 The default is 12 (resp. 16, 24, and 36).
200 Set the roman (italics, bold, or special) font to
204 (either a name or number).
205 The default is R (resp. I, B, and S).
210 Set the stipple font to
217 may be abbreviated down as far as `st' (to avoid
222 default for stipples (unless one is set by the default command), and it is
225 picture with polygons without specifying a
231 Magnify the picture (in addition to any default magnification) by
233 a floating point number larger than zero.
236 may be abbreviated down to `sc'.
245 narrow (resp. medium and thick) lines to
247 times 0.15pt (this value can be changed at compile time).
248 The default is 1.0 (resp. 3.0 and 5.0), which corresponds to 0.15pt
249 (resp. 0.45pt and 0.75pt).
250 A thickness value of zero selects the smallest available line thickness.
251 Negative values cause the line thickness to be proportional to the current
254 .BI pointscale\ <off/on>
255 Scale text to match the picture.
256 Gremlin text is usually printed in the point size specified with the
258 .BR 1 ,\ 2 ,\ 3 ,\ or\ 4
259 regardless of any scaling factors in the picture.
262 will cause the point sizes to scale with the picture (within
264 limitations, of course).
265 An operand of anything but
267 will turn text scaling on.
270 Reset the picture environment defaults to the settings in the current
272 This is meant to be used as a global parameter setting mechanism at the
275 input file, but can be used at any time to reset the
279 Forces the picture to be
282 This overrides any scaling factors present in the same picture.
290 inches high, overriding other scaling factors.
291 If both `width' and `height' are specified the tighter constraint will
292 determine the scale of the picture.
296 commands are not saved with a
299 They will, however, affect point size scaling if that option is set.
306 located the current directory (or in the library directory; see the
311 commands are given, the second one overrides the first.
314 doesn't exist, an error message is reported and processing continues from
318 .SH NOTES ABOUT GROFF
321 is a preprocessor, it doesn't know about current indents, point sizes,
322 margins, number registers, etc.
325 input can be placed between the
332 text is now processed by
334 so anything legal in a single line of
336 input is legal in a line of
338 text (barring `.' directives at the beginning of a line).
339 Thus, it is possible to have equations within a
341 figure by including in the
345 expressions enclosed by previously defined delimiters (e.g.
350 along with other preprocessors, it is best to run
360 should always be run last.
362 A picture is considered an entity, but that doesn't stop
364 from trying to break it up if it falls off the end of a page.
365 Placing the picture between `keeps' in \-me macros will ensure proper
379 to the width and height of the
381 figure (in device units) before entering the
383 request (this is for those who want to rewrite these macros).
384 .SH GREMLIN FILE FORMAT
385 There exist two distinct
387 file formats, the original format from the
389 graphic terminal version, and the
396 version allowing reference points with negative coordinates is
403 file does not contain negative coordinates, either format will be read
404 correctly by either version of
408 The other difference to the
410 format is the use of names for picture objects (e.g., POLYGON, CURVE)
412 Files representing the same picture are shown in Table 1 in each format.
417 sungremlinfile@@gremlinfile
418 0 240.00 128.00@@0 240.00 128.00
420 240.00 128.00@@240.00 128.00
421 185.00 120.00@@185.00 120.00
422 240.00 120.00@@240.00 120.00
423 296.00 120.00@@296.00 120.00
426 10 A Triangle@@10 A Triangle
428 224.00 416.00@@224.00 416.00
429 96.00 160.00@@96.00 160.00
430 384.00 160.00@@384.00 160.00
438 Table 1. File examples
442 The first line of each
444 file contains either the string
451 The second line of the file contains an orientation, and
455 values for a positioning point, separated by spaces.
456 The orientation, either
466 will display things in horizontal format (drawing area wider than it is
467 tall, with menu across top).
471 will display things in vertical format (drawing area taller than it is wide,
472 with menu on left side).
476 are floating point values giving a positioning point to be used when this
477 file is read into another file.
478 The stuff on this line really isn't all that important; a value of ``1 0.00
481 The rest of the file consists of zero or more element specifications.
482 After the last element specification is a line containing the string ``-1''.
484 Lines longer than 127 characters are chopped to this limit.
485 .SH ELEMENT SPECIFICATIONS
487 The first line of each element contains a single decimal number giving the
490 version) or its ASCII name
500 \fIgremlin\fP File Format \(mi Object Type Specification
502 \fIAED\fP Number@\fISUN\fP/\fIX11\fP Name@Description
503 0@BOTLEFT@bottom-left-justified text
504 1@BOTRIGHT@bottom-right-justified text
505 2@CENTCENT@center-justified text
512 10@TOPLEFT@top-left-justified text
513 11@TOPCENT@top-center-justified text
514 12@TOPRIGHT@top-right-justified text
515 13@CENTLEFT@left-center-justified text
516 14@CENTRIGHT@right-center-justified text
517 15@BOTCENT@bottom-center-justified text
522 Type Specifications in \fIgremlin\fP Files
526 After the object type comes a variable number of lines, each specifying a
527 point used to display the element.
528 Each line contains an x-coordinate and a y-coordinate in floating point
529 format, separated by spaces.
530 The list of points is terminated by a line containing the string ``-1.0
533 version) or a single asterisk, ``*''
537 After the points comes a line containing two decimal values, giving the
538 brush and size for the element.
539 The brush determines the style in which things are drawn.
540 For vectors, arcs, and curves there are six legal brush values:
545 1 \(mi@@thin dotted lines
546 2 \(mi@@thin dot-dashed lines
547 3 \(mi@@thick solid lines
548 4 \(mi@@thin dashed lines
549 5 \(mi@@thin solid lines
550 6 \(mi@@medium solid lines
553 For polygons, one more value, 0, is legal.
554 It specifies a polygon with an invisible border.
555 For text, the brush selects a font as follows:
560 1 \(mi@@roman (R font in groff)
561 2 \(mi@@italics (I font in groff)
562 3 \(mi@@bold (B font in groff)
563 4 \(mi@@special (S font in groff)
568 to run your pictures through
570 the font is really just a starting font:
571 The text string can contain formatting sequences like
575 which may change the font (as well as do many other things).
576 For text, the size field is a decimal value between 1 and 4.
577 It selects the size of the font in which the text will be drawn.
578 For polygons, this size field is interpreted as a stipple number to fill the
580 The number is used to index into a stipple font at print time.
582 The last line of each element contains a decimal number and a string of
583 characters, separated by a single space.
584 The number is a count of the number of characters in the string.
585 This information is only used for text elements, and contains the text
587 There can be spaces inside the text.
588 For arcs, curves, and vectors, this line of the element contains the string
590 .SH NOTES ON COORDINATES
594 and its coordinates reflect the
597 For vertical pictures, x-values range 116 to 511, and y-values from 0 to
599 For horizontal pictures, x-values range from 0 to 511 and y-values range
601 Although you needn't absolutely stick to this range, you'll get best results
602 if you at least stay in this vicinity.
603 Also, point lists are terminated by a point of (-1, -1), so you shouldn't
604 ever use negative coordinates.
606 writes out coordinates using format ``%f1.2''; it's probably a good idea to
607 use the same format if you want to modify the
610 .SH NOTES ON SUN/X11 COORDINATES
611 There is no longer a restriction on the range of coordinates used to create
616 However, files with negative coordinates
618 cause problems if displayed on the
621 .Tp \w'@FONTDIR@/devname/DESC'u+3n
622 .BI @FONTDIR@/dev name /DESC
623 Device description file for device
627 .BR groff (@MAN1EXT@),
628 .BR @g@pic (@MAN1EXT@),
632 David Slattengren and Barry Roitblat wrote the original Berkeley
635 Daniel Senderowicz and Werner Lemberg modified it for