Penguin
Annotated edit history of grops(1) version 4, including all changes. View license author blame.
Rev Author # Line
1 perry 1 GROPS
2 !!!GROPS
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OPTIONS
7 USAGE
8 ENVIRONMENT
9 FILES
10 SEE ALSO
11 ----
12 !!NAME
13
14
3 perry 15 grops - !PostScript driver for groff
1 perry 16 !!SYNOPSIS
17
18
19 __grops__ [[ __-glmv__ ] [[ __-b__''n'' ] [[
20 __-c__''n'' ] [[ __-w__''n'' ] [[
21 __-F__''dir'' ] [[ __-P__''prologue'' ] [[
22 ''files...'' ]
23
24
25 It is possible to have whitespace between a command line
26 option and its parameter.
27 !!DESCRIPTION
28
29
30 __grops__ translates the output of GNU __troff__ to
3 perry 31 !PostScript. Normally __grops__ should be invoked by using
1 perry 32 the groff command with a __-Tps__ option. (Actually, this
33 is the default for groff.) If no files are given,
34 __grops__ will read the standard input. A filename of
35 __-__ will also cause __grops__ to read the standard
3 perry 36 input. !PostScript output is written to the standard output.
1 perry 37 When __grops__ is run by __groff__ options can be
38 passed to __grops__ using the __groff -P__
39 option.
40 !!OPTIONS
41
42
43 __-b__''n''
44
45
46 Workaround broken spoolers and previewers. Normally
47 __grops__ produces output that conforms the Document
48 Structuring Conventions version 3.0. Unfortunately some
49 spoolers and previewers can't handle such output. The value
50 of ''n'' controls what __grops__ does to its output
51 acceptable to such programs. A value of 0 will cause grops
52 not to employ any workarounds. Add 1 if no
3 perry 53 __%%!BeginDocumentSetup__ and __%%!EndDocumentSetup__
1 perry 54 comments should be generated; this is needed for early
3 perry 55 versions of !TranScript that get confused by anything between
56 the __%%!EndProlog__ comment and the first __%%Page__
1 perry 57 comment. Add 2 if lines in included files beginning with
58 __%!__ should be stripped out; this is needed for Sun's
59 pageview previewer. Add 4 if __%%Page__, __%%Trailer__
3 perry 60 and __%%!EndProlog__ comments should be stripped out of
1 perry 61 included files; this is needed for spoolers that don't
3 perry 62 understand the __%%!BeginDocument__ and
63 __%%!EndDocument__ comments. Add 8 if the first line of
64 the !PostScript output should be __%!PS-Adobe-2.0__ rather
1 perry 65 than __%!PS-Adobe-3.0__; this is needed when using Sun's
66 Newsprint with a printer that requires page reversal. The
67 default value can be specified by a
68
69
70 __broken__ ''n''
71
72
73 command in the DESC file. Otherwise the default value is
74 0.
75
76
77 __-c__''n''
78
79
80 Print ''n'' copies of each page.
81
82
83 __-g__
84
85
3 perry 86 Guess the page length. This generates !PostScript code that
1 perry 87 guesses the page length. The guess will be correct only if
88 the imageable area is vertically centered on the page. This
89 option allows you to generate documents that can be printed
90 both on letter (8.511) paper and on A4 paper without
91 change.
92
93
94 __-l__
95
96
97 Print the document in landscape format.
98
99
100 __-m__
101
102
103 Turn manual feed on for the document.
104
105
106 __-F__''dir''
107
108
109 Prepend directory ''dir''__/dev__''name'' to the
110 search path for prologue, font, and device description
111 files; ''name'' is the name of the device, usually
112 __ps__.
113
114
115 __-P__''prologue-file''
116
117
118 Use the file ''prologue-file'' (in the font path) as the
119 prologue instead of the default prologue file
120 __prologue__. This option overrides the environment
121 variable GROPS_PROLOGUE.
122
123
124 __-w__''n''
125
126
127 Lines should be drawn using a thickness of ''n''
128 thousandths of an em.
129
130
131 __-v__
132
133
134 Print the version number.
135 !!USAGE
136
137
138 There are styles called __R__, __I__, __B__, and
139 __BI__ mounted at font positions 1 to 4. The fonts are
140 grouped into families __A__, __BM__, __C__,
141 __H__, __HN__, __N__, __P__ and __T__ having
142 members in each of these styles:
143
144
145 __AR__
146
147
3 perry 148 !AvantGarde-Book
1 perry 149
150
151 __AI__
152
153
3 perry 154 !AvantGarde-!BookOblique
1 perry 155
156
157 __AB__
158
159
3 perry 160 !AvantGarde-Demi
1 perry 161
162
163 __ABI__
164
165
3 perry 166 !AvantGarde-!DemiOblique
1 perry 167
168
169 __BMR__
170
171
172 Bookman-Light
173
174
175 __BMI__
176
177
3 perry 178 Bookman-!LightItalic
1 perry 179
180
181 __BMB__
182
183
184 Bookman-Demi
185
186
187 __BMBI__
188
189
3 perry 190 Bookman-!DemiItalic
1 perry 191
192
193 __CR__
194
195
196 Courier
197
198
199 __CI__
200
201
202 Courier-Oblique
203
204
205 __CB__
206
207
208 Courier-Bold
209
210
211 __CBI__
212
213
3 perry 214 Courier-!BoldOblique
1 perry 215
216
217 __HR__
218
219
220 Helvetica
221
222
223 __HI__
224
225
226 Helvetica-Oblique
227
228
229 __HB__
230
231
232 Helvetica-Bold
233
234
235 __HBI__
236
237
3 perry 238 Helvetica-!BoldOblique
1 perry 239
240
241 __HNR__
242
243
244 Helvetica-Narrow
245
246
247 __HNI__
248
249
250 Helvetica-Narrow-Oblique
251
252
253 __HNB__
254
255
256 Helvetica-Narrow-Bold
257
258
259 __HNBI__
260
261
3 perry 262 Helvetica-Narrow-!BoldOblique
1 perry 263
264
265 __NR__
266
267
3 perry 268 !NewCenturySchlbk-Roman
1 perry 269
270
271 __NI__
272
273
3 perry 274 !NewCenturySchlbk-Italic
1 perry 275
276
277 __NB__
278
279
3 perry 280 !NewCenturySchlbk-Bold
1 perry 281
282
283 __NBI__
284
285
3 perry 286 !NewCenturySchlbk-!BoldItalic
1 perry 287
288
289 __PR__
290
291
292 Palatino-Roman
293
294
295 __PI__
296
297
298 Palatino-Italic
299
300
301 __PB__
302
303
304 Palatino-Bold
305
306
307 __PBI__
308
309
3 perry 310 Palatino-!BoldItalic
1 perry 311
312
313 __TR__
314
315
316 Times-Roman
317
318
319 __TI__
320
321
322 Times-Italic
323
324
325 __TB__
326
327
328 Times-Bold
329
330
331 __TBI__
332
333
3 perry 334 Times-!BoldItalic
1 perry 335
336
337 There is also the following font which is not a member of a
338 family:
339
340
341 __ZCMI__
342
343
3 perry 344 !ZapfChancery-!MediumItalic
1 perry 345
346
347 There are also some special fonts called __SS__ and
348 __S__. Zapf Dingbats is available as __ZD__ and a
3 perry 349 reversed version of !ZapfDingbats (with symbols pointing in
1 perry 350 the opposite direction) is available as __ZDR__; most
351 characters in these fonts are unnamed and must be accessed
352 using __N__.
353
354
355 __grops__ understands various X commands produced using
356 the __X__ escape sequence; __grops__ will only
357 interpret commands that begin with a __ps:__
358 tag.
359
360
361 __X'ps: exec__ ''code''__'__
362
363
3 perry 364 This executes the arbitrary !PostScript commands in
365 ''code''. The !PostScript currentpoint will be set to the
1 perry 366 position of the __X__ command before executing
367 ''code''. The origin will be at the top left corner of
368 the page, and y coordinates will increase down the page. A
369 procedure __u__ will be defined that converts groff units
370 to the coordinate system in effect. For
371 example,
372
373
374 __.nr x 1i
375 X'ps: exec nx u 0 rlineto stroke'__
376
377
378 will draw a horizontal line one inch long. ''code'' may
379 make changes to the graphics state, but any changes will
380 persist only to the end of the page. A dictionary containing
381 the definitions specified by the __def__ and __mdef__
382 will be on top of the dictionary stack. If your code adds
383 definitions to this dictionary, you should allocate space
384 for them using __X'ps mdef__ ''n''__'__. Any
385 definitions will persist only until the end of the page. If
386 you use the __Y__ escape sequence with an argument that
387 names a macro, ''code'' can extend over multiple lines.
388 For example,
389
390
391 __.nr x 1i
392 .de y
393 ps: exec
394 nx u 0 rlineto
395 stroke
396 ..
397 Yy
398 __
399
400
401 is another way to draw a horizontal line one inch
402 long.
403
404
405 __X'ps: file__ ''name''__'__
406
407
408 This is the same as the __exec__ command except that the
3 perry 409 !PostScript code is read from file ''name''.
1 perry 410
411
412 __X'ps: def__ ''code''__'__
413
414
3 perry 415 Place a !PostScript definition contained in ''code'' in
1 perry 416 the prologue. There should be at most one definition per
417 __X__ command. Long definitions can be split over several
418 __X__ commands; all the ''code'' arguments are simply
419 joined together separated by newlines. The definitions are
420 placed in a dictionary which is automatically pushed on the
421 dictionary stack when an __exec__ command is executed. If
422 you use the __Y__ escape sequence with an argument that
423 names a macro, ''code'' can extend over multiple
424 lines.
425
426
427 __X'ps: mdef__ ''n code''__'__
428
429
430 Like __def__, except that ''code'' may contain up to
431 ''n'' definitions. __grops__ needs to know how many
432 definitions ''code'' contains so that it can create an
3 perry 433 appropriately sized !PostScript dictionary to contain
1 perry 434 them.
435
436
437 __X'ps: import__ ''file llx lly urx ury width'' [[
438 ''height'' ]__'__
439
440
3 perry 441 Import a !PostScript graphic from ''file''. The arguments
1 perry 442 ''llx'', ''lly'', ''urx'', and ''ury'' give the
3 perry 443 bounding box of the graphic in the default !PostScript
1 perry 444 coordinate system; they should all be integers; ''llx''
445 and ''lly'' are the x and y coordinates of the lower left
446 corner of the graphic; ''urx'' and ''ury'' are the x
447 and y coordinates of the upper right corner of the graphic;
448 ''width'' and ''height'' are integers that give the
449 desired width and height in groff units of the graphic. The
450 graphic will be scaled so that it has this width and height
451 and translated so that the lower left corner of the graphic
452 is located at the position associated with __X__ command.
453 If the height argument is omitted it will be scaled
454 uniformly in the x and y directions so that it has the
455 specified width. Note that the contents of the __X__
456 command are not interpreted by __troff__; so vertical
457 space for the graphic is not automatically added, and the
458 ''width'' and ''height'' arguments are not allowed to
3 perry 459 have attached scaling indicators. If the !PostScript file
1 perry 460 complies with the Adobe Document Structuring Conventions and
3 perry 461 contains a __%%!BoundingBox__ comment, then the bounding
1 perry 462 box can be automatically extracted from within groff by
463 using the __psbb__ request.
464
465
466 The __-mps__ macros (which are automatically loaded when
467 __grops__ is run by the groff command) include a
468 __PSPIC__ macro which allows a picture to be easily
469 imported. This has the format
470
471
472 __.PSPIC__ [[ __-L__ | __-R__ | __-I__ ''n'' ]
473 ''file'' [[ ''width'' [[ ''height'' ]]
474
475
476 ''file'' is the name of the file containing the
477 illustration; ''width'' and ''height'' give the
478 desired width and height of the graphic. The ''width''
479 and ''height'' arguments may have scaling indicators
480 attached; the default scaling indicator is __i__. This
481 macro will scale the graphic uniformly in the x and y
482 directions so that it is no more than ''width'' wide and
483 ''height'' high. By default, the graphic will be
484 horizontally centered. The __-L__ and __-R__ cause the
485 graphic to be left-aligned and right-aligned respectively.
486 The __-I__ option causes the graphic to be indented by
487 ''n''.
488
489
490 __X'ps: invis'__
491
492
493 __X'ps: endinvis'__
494
495
496 No output will be generated for text and drawing commands
497 that are bracketed with these __X__ commands. These
498 commands are intended for use when output from __troff__
499 will be previewed before being processed with __grops__;
500 if the previewer is unable to display certain characters or
501 other constructs, then other substitute characters or
502 constructs can be used for previewing by bracketing them
503 with these __X__ commands.
504
505
506 For example, __gxditview__ is not able to display a
507 proper ____ character because the standard X11 fonts do
508 not provide it; this problem can be overcome by executing
509 the following request
510
511
512 __.char X'ps: invis'\
513 Z'v'-.25m'h'.05m'D'l .9m 0'h'.05m''\
514 X'ps: endinvis'
515 __
516
517
518 In this case, __gxditview__ will be unable to display the
519 ____ character and will draw the line, whereas
520 __grops__ will print the ____ character and ignore the
521 line.
522
523
524 The input to __grops__ must be in the format output by
4 perry 525 troff(1). This is described in groff_out(5).
1 perry 526 In addition the device and font description files for the
527 device used must meet certain requirements. The device and
528 font description files supplied for __ps__ device meet
529 all these requirements. afmtodit(1) can be used to
530 create font files from AFM files. The resolution must be an
531 integer multiple of 72 times the __sizescale__. The
532 __ps__ device uses a resolution of 72000 and a sizescale
533 of 1000. The device description file should contain a
534 command
535
536
537 __paperlength__ ''n''
538
539
540 which says that output should be generated which is suitable
541 for printing on a page whose length is ''n'' machine
542 units. Each font description file must contain a
543 command
544
545
546 __internalname__ ''psname''
547
548
3 perry 549 which says that the !PostScript name of the font is
1 perry 550 ''psname''. It may also contain a command
551
552
553 __encoding__ ''enc_file''
554
555
3 perry 556 which says that the !PostScript font should be reencoded
1 perry 557 using the encoding described in ''enc_file''; this file
558 should consist of a sequence of lines of the
559 form:
560
561
562 ''pschar code''
563
564
3 perry 565 where ''pschar'' is the !PostScript name of the character,
1 perry 566 and ''code'' is its position in the encoding expressed as
567 a decimal integer. The code for each character given in the
568 font file must correspond to the code for the character in
569 encoding file, or to the code in the default encoding for
3 perry 570 the font if the !PostScript font is not to be reencoded. This
1 perry 571 code can be used with the __N__ escape sequence in
572 __troff__ to select the character, even if the character
573 does not have a groff name. Every character in the font file
3 perry 574 must exist in the !PostScript font, and the widths given in
575 the font file must match the widths used in the !PostScript
1 perry 576 font. __grops__ will assume that a character with a groff
577 name of __space__ is blank (makes no marks on the page);
578 it can make use of such a character to generate more
3 perry 579 efficient and compact !PostScript output.
1 perry 580
581
582 __grops__ can automatically include the downloadable
583 fonts necessary to print the document. Any downloadable
584 fonts which should, when required, be included by
585 __grops__ must be listed in the file
586 __/usr/share/groff/1.17.2/font/devps/download__; this
587 should consist of lines of the form
588
589
590 ''font filename''
591
592
3 perry 593 where ''font'' is the !PostScript name of the font, and
1 perry 594 ''filename'' is the name of the file containing the font;
595 lines beginning with __#__ and blank lines are ignored;
596 fields may be separated by tabs or spaces; ''filename''
597 will be searched for using the same mechanism that is used
598 for groff font metric files. The __download__ file itself
599 will also be searched for using this mechanism.
600
601
602 If the file containing a downloadable font or imported
603 document conforms to the Adobe Document Structuring
604 Conventions, then __grops__ will interpret any comments
605 in the files sufficiently to ensure that its own output is
606 conforming. It will also supply any needed font resources
607 that are listed in the __download__ file as well as any
608 needed file resources. It is also able to handle
609 inter-resource dependencies. For example, suppose that you
610 have a downloadable font called Garamond, and also a
611 downloadable font called Garamond-Outline which depends on
612 Garamond (typically it would be defined to copy Garamond's
3 perry 613 font dictionary, and change the !PaintType), then it is
1 perry 614 necessary for Garamond to be appear before Garamond-Outline
3 perry 615 in the !PostScript document. __grops__ will handle this
1 perry 616 automatically provided that the downloadable font file for
617 Garamond-Outline indicates its dependence on Garamond by
618 means of the Document Structuring Conventions, for example
619 by beginning with the following lines
620
621
622 __%!PS-Adobe-3.0 Resource-Font
3 perry 623 %%!DocumentNeededResources: font Garamond
624 %%!EndComments
625 %%!IncludeResource: font Garamond__
1 perry 626
627
628 In this case both Garamond and Garamond-Outline would need
629 to be listed in the __download__ file. A downloadable
630 font should not include its own name in a
3 perry 631 __%%!DocumentSuppliedResources__ comment.
1 perry 632
633
3 perry 634 __grops__ will not interpret __%%!DocumentFonts__
635 comments. The __%%!DocumentNeededResources__,
636 __%%!DocumentSuppliedResources__,
637 __%%!IncludeResource__, __%%!BeginResource__ and
638 __%%!EndResource__ comments (or possibly the old
639 __%%!DocumentNeededFonts__,
640 __%%!DocumentSuppliedFonts__, __%%!IncludeFont__,
641 __%%!BeginFont__ and __%%!EndFont__ comments) should be
1 perry 642 used.
643 !!ENVIRONMENT
644
645
646 __GROPS_PROLOGUE__
647
648
649 If this is set to ''foo'', then __grops__ will use the
650 file ''foo'' (in the font path) instead of the default
651 prologue file __prologue__. The option __-P__
652 overrides this environment variable.
653 !!FILES
654
655
656 __/usr/share/groff/1.17.2/font/devps/DESC__
657
658
659 Device description file.
660
661
662 __/usr/share/groff/1.17.2/font/devps/__''F''
663
664
665 Font description file for font ''F''.
666
667
668 __/usr/share/groff/1.17.2/font/devps/download__
669
670
671 List of downloadable fonts.
672
673
674 __/usr/share/groff/1.17.2/font/devps/text.enc__
675
676
677 Encoding used for text fonts.
678
679
680 __/usr/share/groff/1.17.2/tmac/ps.tmac__
681
682
683 Macros for use with __grops__; automatically loaded by
684 __troffrc__
685
686
687 __/usr/share/groff/1.17.2/tmac/pspic.tmac__
688
689
690 Definition of __PSPIC__ macro, automatically loaded by
691 __ps.tmac__.
692
693
694 __/usr/share/groff/1.17.2/tmac/psold.tmac__
695
696
697 Macros to disable use of characters not present in older
3 perry 698 !PostScript printers (e.g. `eth' or `thorn').
1 perry 699
700
701 __/tmp/grops__''XXXXXX''
702
703
704 Temporary file.
705 !!SEE ALSO
706
707
708 afmtodit(1), groff(1), troff(1),
4 perry 709 psbb(1), groff_out(5), __groff_font__(5),
710 groff_char(7)
1 perry 711 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.