grops.man revision 104862
179543Sru.ig
2104862SruCopyright (C) 1989-2000, 2001, 2002 Free Software Foundation, Inc.
375584Sru
475584SruPermission is granted to make and distribute verbatim copies of
575584Sruthis manual provided the copyright notice and this permission notice
675584Sruare preserved on all copies.
775584Sru
875584SruPermission is granted to copy and distribute modified versions of this
975584Srumanual under the conditions for verbatim copying, provided that the
1075584Sruentire resulting derived work is distributed under the terms of a
1175584Srupermission notice identical to this one.
1275584Sru
1375584SruPermission is granted to copy and distribute translations of this
1475584Srumanual into another language, under the above conditions for modified
1575584Sruversions, except that this permission notice may be included in
1675584Srutranslations approved by the Free Software Foundation instead of in
1775584Sruthe original English.
1875584Sru..
19104862Sru.
20104862Sru.mso www.tmac
21104862Sru.
22104862Sru.
2375584Sru.\" Like TP, but if specified indent is more than half
2475584Sru.\" the current line-length - indent, use the default indent.
2575584Sru.de Tp
2675584Sru.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
2775584Sru.el .TP "\\$1"
2875584Sru..
29104862Sru.
30104862Sru.
3175584Sru.TH GROPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
32104862Sru.
33104862Sru.
3475584Sru.SH NAME
3575584Srugrops \- PostScript driver for groff
36104862Sru.
37104862Sru.
3875584Sru.SH SYNOPSIS
3975584Sru.nr a \n(.j
4075584Sru.ad l
4175584Sru.nr i \n(.i
4275584Sru.in +\w'\fBgrops 'u
4375584Sru.ti \niu
4475584Sru.B grops
45104862Sru.
4675584Sru.de OP
47104862Sru.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\%\\$2" "\ ]"
4875584Sru.el .RB "[\ " "\\$1" "\ ]"
4975584Sru..
50104862Sru.
5175584Sru.OP \-glmv
5275584Sru.OP \-b n
5375584Sru.OP \-c n
5475584Sru.OP \-F dir
55104862Sru.OP \-p papersize
5675584Sru.OP \-P prologue
57104862Sru.OP \-w n
5875584Sru.RI "[\ " files\|.\|.\|. "\ ]"
5975584Sru.br
6075584Sru.ad \na
61104862Sru.
6275584Sru.PP
6375584SruIt is possible to have whitespace between a command line option and its
6475584Sruparameter.
65104862Sru.
66104862Sru.
6775584Sru.SH DESCRIPTION
6875584Sru.B grops
6975584Srutranslates the output of GNU
7075584Sru.B troff
7175584Sruto PostScript.
72104862Sru.
7375584SruNormally
7475584Sru.B grops
7575584Srushould be invoked by using the groff command
7675584Sruwith a
7775584Sru.B \-Tps
7875584Sruoption.
79104862Sru.
8075584Sru.if '@DEVICE@'ps' (Actually, this is the default for groff.)
81104862Sru.
8275584SruIf no files are given,
8375584Sru.B grops
8475584Sruwill read the standard input.
85104862Sru.
8675584SruA filename of
8775584Sru.B \-
8875584Sruwill also cause
8975584Sru.B grops
9075584Sruto read the standard input.
91104862Sru.
9275584SruPostScript output is written to the standard output.
93104862Sru.
9475584SruWhen
9575584Sru.B grops
9675584Sruis run by
9775584Sru.B groff
9875584Sruoptions can be passed to
9975584Sru.B grops
10075584Sruusing the
10175584Sru.B groff
10275584Sru.B \-P
10375584Sruoption.
104104862Sru.
105104862Sru.
10675584Sru.SH OPTIONS
10775584Sru.TP
10875584Sru.BI \-b n
10975584SruWorkaround broken spoolers and previewers.
110104862Sru.
11175584SruNormally
11275584Sru.B grops
11375584Sruproduces output that conforms
11475584Sruthe Document Structuring Conventions version 3.0.
115104862Sru.
11675584SruUnfortunately some spoolers and previewers can't handle such output.
117104862Sru.
118104862SruThe value of\~\c
11975584Sru.I n
12075584Srucontrols what
12175584Sru.B grops
12275584Srudoes to its output acceptable to such programs.
123104862Sru.
124104862SruA value of\~0 will cause grops not to employ any workarounds.
125104862Sru.
126104862SruAdd\~1 if no
12775584Sru.B %%BeginDocumentSetup
12875584Sruand
12975584Sru.B %%EndDocumentSetup
13075584Srucomments should be generated;
13175584Sruthis is needed for early versions of TranScript that get confused by
13275584Sruanything between the
13375584Sru.B %%EndProlog
13475584Srucomment and the first
13575584Sru.B %%Page
13675584Srucomment.
137104862Sru.
138104862SruAdd\~2 if lines in included files beginning with
13975584Sru.B %!
14075584Srushould be stripped out; this is needed for Sun's pageview previewer.
141104862Sru.
142104862SruAdd\~4 if
14375584Sru.BR %%Page ,
14475584Sru.BR %%Trailer
14575584Sruand
14675584Sru.B %%EndProlog
14775584Srucomments should be
14875584Srustripped out of included files; this is needed for spoolers that
14975584Srudon't understand the
15075584Sru.B %%BeginDocument
15175584Sruand
15275584Sru.B %%EndDocument
15375584Srucomments.
154104862Sru.
155104862SruAdd\~8 if the first line of the PostScript output should be
15675584Sru.B %!PS-Adobe-2.0
15775584Srurather than
15875584Sru.BR %!PS-Adobe-3.0 ;
15975584Sruthis is needed when using Sun's Newsprint with a printer that requires
16075584Srupage reversal.
161104862Sru.
16275584SruThe default value can be specified by a
163104862Sru.
16475584Sru.RS
16575584Sru.IP
16675584Sru.BI broken\  n
167104862Sru.
16875584Sru.LP
16975584Srucommand in the DESC file.
170104862Sru.
171104862SruOtherwise the default value is\~0.
17275584Sru.RE
173104862Sru.
17475584Sru.TP
17575584Sru.BI \-c n
17675584SruPrint
17775584Sru.I n
17875584Srucopies of each page.
179104862Sru.
18075584Sru.TP
181104862Sru.BI \-F dir
182104862SruPrepend directory
183104862Sru.IB dir /dev name
184104862Sruto the search path for prologue, font, and device description files;
185104862Sru.I name
186104862Sruis the name of the device, usually
187104862Sru.BR ps .
188104862Sru.
189104862Sru.TP
19075584Sru.BI \-g
19175584SruGuess the page length.
192104862Sru.
19375584SruThis generates PostScript code that guesses the page length.
194104862Sru.
19575584SruThe guess will be correct only if the imageable area is vertically
19675584Srucentered on the page.
197104862Sru.
19875584SruThis option allows you to generate documents that can be printed
19975584Sruboth on letter (8.5\(mu11) paper and on A4 paper without change.
200104862Sru.
20175584Sru.TP
20275584Sru.B \-l
20375584SruPrint the document in landscape format.
204104862Sru.
20575584Sru.TP
20675584Sru.B \-m
20775584SruTurn manual feed on for the document.
208104862Sru.
20975584Sru.TP
210104862Sru.BI \-p paper-size
211104862SruSet physical dimension of output medium.
212104862Sru.
213104862SruThis overrides the
214104862Sru.B papersize
215104862Sruand
216104862Sru.B paperlength
217104862Srucommands in the
218104862Sru.B DESC
219104862Srufile; it accepts the same arguments as the
220104862Sru.B papersize
221104862Srucommand.
222104862Sru.
22375584Sru.TP
22475584Sru.BI \-P prologue-file
22575584SruUse the file
22675584Sru.I prologue-file
22775584Sru(in the font path) as the prologue instead of the default prologue file
22875584Sru.BR prologue .
229104862Sru.
23075584SruThis option overrides the environment variable
23175584Sru.SM GROPS_PROLOGUE.
232104862Sru.
23375584Sru.TP
23475584Sru.BI \-w n
23575584SruLines should be drawn using a thickness of
236104862Sru.IR n \~\c
23775584Sruthousandths of an em.
238104862SruIf this option is not given, the line thickness defaults to 0.04\~em.
239104862Sru.
24075584Sru.TP
24175584Sru.B \-v
24275584SruPrint the version number.
243104862Sru.
244104862Sru.
24575584Sru.SH USAGE
24675584SruThere are styles called
24775584Sru.BR R ,
24875584Sru.BR I ,
24975584Sru.BR B ,
25075584Sruand
25175584Sru.B BI
252104862Srumounted at font positions 1 to\~4.
253104862Sru.
25475584SruThe fonts are grouped into families
25575584Sru.BR A ,
25675584Sru.BR BM ,
25775584Sru.BR C ,
25875584Sru.BR H ,
25975584Sru.BR HN ,
26075584Sru.BR N ,
26175584Sru.B P
262104862Sruand\~\c
26375584Sru.B T
26475584Sruhaving members in each of these styles:
265104862Sru.
26675584Sru.de FT
26775584Sru.if '\\*(.T'ps' .ft \\$1
26875584Sru..
269104862Sru.
270104862Sru.RS
27175584Sru.TP
27275584Sru.B AR
27375584Sru.FT AR
27475584SruAvantGarde-Book
27575584Sru.FT
276104862Sru.
27775584Sru.TP
27875584Sru.B AI
27975584Sru.FT AI
28075584SruAvantGarde-BookOblique
28175584Sru.FT
282104862Sru.
28375584Sru.TP
28475584Sru.B AB
28575584Sru.FT AB
28675584SruAvantGarde-Demi
28775584Sru.FT
288104862Sru.
28975584Sru.TP
29075584Sru.B ABI
29175584Sru.FT ABI
29275584SruAvantGarde-DemiOblique
29375584Sru.FT
294104862Sru.
29575584Sru.TP
29675584Sru.B BMR
29775584Sru.FT BMR
29875584SruBookman-Light
29975584Sru.FT
300104862Sru.
30175584Sru.TP
30275584Sru.B BMI
30375584Sru.FT BMI
30475584SruBookman-LightItalic
30575584Sru.FT
306104862Sru.
30775584Sru.TP
30875584Sru.B BMB
30975584Sru.FT BMB
31075584SruBookman-Demi
31175584Sru.FT
312104862Sru.
31375584Sru.TP
31475584Sru.B BMBI
31575584Sru.FT BMBI
31675584SruBookman-DemiItalic
31775584Sru.FT
318104862Sru.
31975584Sru.TP
32075584Sru.B CR
32175584Sru.FT CR
32275584SruCourier
32375584Sru.FT
324104862Sru.
32575584Sru.TP
32675584Sru.B CI
32775584Sru.FT CI
32875584SruCourier-Oblique
32975584Sru.FT
330104862Sru.
33175584Sru.TP
33275584Sru.B CB
33375584Sru.FT CB
33475584SruCourier-Bold
33575584Sru.FT
336104862Sru.
33775584Sru.TP
33875584Sru.B CBI
33975584Sru.FT CBI
34075584SruCourier-BoldOblique
34175584Sru.FT
342104862Sru.
34375584Sru.TP
34475584Sru.B HR
34575584Sru.FT HR
34675584SruHelvetica
34775584Sru.FT
348104862Sru.
34975584Sru.TP
35075584Sru.B HI
35175584Sru.FT HI
35275584SruHelvetica-Oblique
35375584Sru.FT
354104862Sru.
35575584Sru.TP
35675584Sru.B HB
35775584Sru.FT HB
35875584SruHelvetica-Bold
35975584Sru.FT
360104862Sru.
36175584Sru.TP
36275584Sru.B HBI
36375584Sru.FT HBI
36475584SruHelvetica-BoldOblique
36575584Sru.FT
366104862Sru.
36775584Sru.TP
36875584Sru.B HNR
36975584Sru.FT HNR
37075584SruHelvetica-Narrow
37175584Sru.FT
372104862Sru.
37375584Sru.TP
37475584Sru.B HNI
37575584Sru.FT HNI
37675584SruHelvetica-Narrow-Oblique
37775584Sru.FT
378104862Sru.
37975584Sru.TP
38075584Sru.B HNB
38175584Sru.FT HNB
38275584SruHelvetica-Narrow-Bold
38375584Sru.FT
384104862Sru.
38575584Sru.TP
38675584Sru.B HNBI
38775584Sru.FT HNBI
38875584SruHelvetica-Narrow-BoldOblique
38975584Sru.FT
390104862Sru.
39175584Sru.TP
39275584Sru.B NR
39375584Sru.FT NR
39475584SruNewCenturySchlbk-Roman
39575584Sru.FT
396104862Sru.
39775584Sru.TP
39875584Sru.B NI
39975584Sru.FT NI
40075584SruNewCenturySchlbk-Italic
40175584Sru.FT
402104862Sru.
40375584Sru.TP
40475584Sru.B NB
40575584Sru.FT NB
40675584SruNewCenturySchlbk-Bold
40775584Sru.FT
408104862Sru.
40975584Sru.TP
41075584Sru.B NBI
41175584Sru.FT NBI
41275584SruNewCenturySchlbk-BoldItalic
41375584Sru.FT
414104862Sru.
41575584Sru.TP
41675584Sru.B PR
41775584Sru.FT PR
41875584SruPalatino-Roman
41975584Sru.FT
420104862Sru.
42175584Sru.TP
42275584Sru.B PI
42375584Sru.FT PI
42475584SruPalatino-Italic
42575584Sru.FT
426104862Sru.
42775584Sru.TP
42875584Sru.B PB
42975584Sru.FT PB
43075584SruPalatino-Bold
43175584Sru.FT
432104862Sru.
43375584Sru.TP
43475584Sru.B PBI
43575584Sru.FT PBI
43675584SruPalatino-BoldItalic
43775584Sru.FT
438104862Sru.
43975584Sru.TP
44075584Sru.B TR
44175584Sru.FT TR
44275584SruTimes-Roman
44375584Sru.FT
444104862Sru.
44575584Sru.TP
44675584Sru.B TI
44775584Sru.FT TI
44875584SruTimes-Italic
44975584Sru.FT
450104862Sru.
45175584Sru.TP
45275584Sru.B TB
45375584Sru.FT TB
45475584SruTimes-Bold
45575584Sru.FT
456104862Sru.
45775584Sru.TP
45875584Sru.B TBI
45975584Sru.FT TBI
46075584SruTimes-BoldItalic
46175584Sru.FT
462104862Sru.RE
463104862Sru.
46475584Sru.LP
46575584SruThere is also the following font which is not a member of a family:
466104862Sru.
467104862Sru.RS
46875584Sru.TP
46975584Sru.B ZCMI
47075584Sru.FT ZCMI
47175584SruZapfChancery-MediumItalic
47275584Sru.FT
473104862Sru.RE
474104862Sru.
47575584Sru.LP
47675584SruThere are also some special fonts called
47775584Sru.B SS
478104862Sruand\~\c
47975584Sru.BR S .
480104862Sru.
48175584SruZapf Dingbats is available as
48275584Sru.BR ZD
48375584Sruand a reversed version of ZapfDingbats (with symbols pointing in the opposite
48475584Srudirection) is available as
48575584Sru.BR ZDR ;
48675584Srumost characters in these fonts are unnamed and must be accessed using
487104862Sru.BR \[rs]N .
488104862Sru.
48975584Sru.LP
490104862SruThe default color for
491104862Sru.B \[rs]m
492104862Sruand
493104862Sru.B \[rs]M
494104862Sruis black; for colors defined in the `rgb' color space,
495104862Sru.B setrgbcolor
496104862Sruis used, for `cmy' and `cmyk'
497104862Sru.BR setcmykcolor ,
498104862Sruand for `gray'
499104862Sru.BR setgray .
500104862Sru.
501104862Sru.LP
50275584Sru.B grops
503104862Sruunderstands various X\~commands produced using the
504104862Sru.B \[rs]X
50575584Sruescape sequence;
50675584Sru.B grops
50775584Sruwill only interpret commands that begin with a
50875584Sru.B ps:
50975584Srutag.
510104862Sru.
51175584Sru.TP
512104862Sru.BI \[rs]X'ps:\ exec\  code '
51375584SruThis executes the arbitrary PostScript commands in
51475584Sru.IR code .
515104862Sru.
51675584SruThe PostScript currentpoint will be set to the position of the
517104862Sru.B \[rs]X
51875584Srucommand before executing
51975584Sru.IR code .
520104862Sru.
52175584SruThe origin will be at the top left corner of the page,
522104862Sruand y\~coordinates will increase down the page.
523104862Sru.
524104862SruA procedure\~\c
52575584Sru.B u
52675584Sruwill be defined that converts groff units
52775584Sruto the coordinate system in effect.
528104862Sru.
52975584SruFor example, 
530104862Sru.
53175584Sru.RS
53275584Sru.IP
53375584Sru.B
53475584Sru\&.nr x 1i
53575584Sru.br
53675584Sru.B
537104862Sru\[rs]X'ps: exec \[rs]nx u 0 rlineto stroke'
53875584Sru.br
53975584Sru.RE
540104862Sru.
54175584Sru.IP
54275584Sruwill draw a horizontal line one inch long.
543104862Sru.
54475584Sru.I code
54575584Srumay make changes to the graphics state,
54675584Srubut any changes will persist only to the
54775584Sruend of the page.
548104862Sru.
54975584SruA dictionary containing the definitions specified by the
55075584Sru.B def
55175584Sruand
55275584Sru.B mdef
55375584Sruwill be on top of the dictionary stack.
554104862Sru.
55575584SruIf your code adds definitions to this dictionary,
55675584Sruyou should allocate space for them using
557104862Sru.BI \[rs]X'ps\ mdef \ n '\fR.
558104862Sru.
55975584SruAny definitions will persist only until the end of the page.
560104862Sru.
56175584SruIf you use the
562104862Sru.B \[rs]Y
56375584Sruescape sequence with an argument that names a macro,
56475584Sru.I code
56575584Srucan extend over multiple lines.
566104862Sru.
56775584SruFor example,
568104862Sru.
56975584Sru.RS
57075584Sru.IP
57175584Sru.nf
57275584Sru.ft B
57375584Sru\&.nr x 1i
57475584Sru\&.de y
57575584Sru\&ps: exec
576104862Sru\&\[rs]nx u 0 rlineto
57775584Sru\&stroke
57875584Sru\&..
579104862Sru\&\[rs]Yy
58075584Sru.fi
58175584Sru.ft R
582104862Sru.
58375584Sru.LP
58475584Sruis another way to draw a horizontal line one inch long.
58575584Sru.RE
586104862Sru.
58775584Sru.TP
588104862Sru.BI \[rs]X'ps:\ file\  name '
58975584SruThis is the same as the
59075584Sru.B exec
59175584Srucommand except that the PostScript code is read from file
59275584Sru.IR name .
593104862Sru.
59475584Sru.TP
595104862Sru.BI \[rs]X'ps:\ def\  code '
59675584SruPlace a PostScript definition contained in
59775584Sru.I code
59875584Sruin the prologue.
599104862Sru.
60075584SruThere should be at most one definition per
601104862Sru.B \[rs]X
60275584Srucommand.
603104862Sru.
60475584SruLong definitions can be split over several
605104862Sru.B \[rs]X
60675584Srucommands;
60775584Sruall the
60875584Sru.I code
60975584Sruarguments are simply joined together separated by newlines.
610104862Sru.
61175584SruThe definitions are placed in a dictionary which is automatically
61275584Srupushed on the dictionary stack when an
61375584Sru.B exec
61475584Srucommand is executed.
615104862Sru.
61675584SruIf you use the
617104862Sru.B \[rs]Y
61875584Sruescape sequence with an argument that names a macro,
61975584Sru.I code
62075584Srucan extend over multiple lines.
621104862Sru.
62275584Sru.TP
623104862Sru.BI \[rs]X'ps:\ mdef\  n\ code  '
62475584SruLike
62575584Sru.BR def ,
62675584Sruexcept that
62775584Sru.I code
62875584Srumay contain up to
629104862Sru.IR n \~\c
63075584Srudefinitions.
631104862Sru.
63275584Sru.B grops
63375584Sruneeds to know how many definitions
63475584Sru.I code
63575584Srucontains
63675584Sruso that it can create an appropriately sized PostScript dictionary
63775584Sruto contain them.
638104862Sru.
63975584Sru.TP
640104862Sru.BI \[rs]X'ps:\ import\  file\ llx\ lly\ urx\ ury\ width\ \fR[\fP\ height\ \fR]\fP '
64175584SruImport a PostScript graphic from
64275584Sru.IR file .
643104862Sru.
64475584SruThe arguments
64575584Sru.IR llx ,
64675584Sru.IR lly ,
64775584Sru.IR urx ,
64875584Sruand
64975584Sru.I ury
65075584Srugive the bounding box of the graphic in the default PostScript
65175584Srucoordinate system; they should all be integers;
65275584Sru.I llx
65375584Sruand
65475584Sru.I lly
655104862Sruare the x and y\~coordinates of the lower left
65675584Srucorner of the graphic;
65775584Sru.I urx
65875584Sruand
65975584Sru.I ury
660104862Sruare the x and y\~coordinates of the upper right corner of the graphic;
66175584Sru.I width
66275584Sruand
66375584Sru.I height
66475584Sruare integers that give the desired width and height in groff
66575584Sruunits of the graphic.
666104862Sru.
66775584SruThe graphic will be scaled so that it has this width and height
66875584Sruand translated so that the lower left corner of the graphic is
66975584Srulocated at the position associated with
670104862Sru.B \[rs]X
67175584Srucommand.
672104862Sru.
67375584SruIf the height argument is omitted it will be scaled uniformly in the
674104862Srux and y\~directions so that it has the specified width.
675104862Sru.
67675584SruNote that the contents of the
677104862Sru.B \[rs]X
67875584Srucommand are not interpreted by
67975584Sru.BR troff ;
68075584Sruso vertical space for the graphic is not automatically added,
68175584Sruand the
68275584Sru.I width
68375584Sruand
68475584Sru.I height
68575584Sruarguments are not allowed to have attached scaling indicators.
686104862Sru.
68775584SruIf the PostScript file complies with the Adobe Document Structuring
68875584SruConventions and contains a
68975584Sru.B %%BoundingBox
69075584Srucomment, then the bounding box can be automatically
69175584Sruextracted from within groff by using the
69275584Sru.B psbb
69375584Srurequest.
694104862Sru.
69575584Sru.RS
69675584Sru.LP
69775584SruThe
69875584Sru.B \-mps
69975584Srumacros (which are automatically loaded when
70075584Sru.B grops
70175584Sruis run by the groff command) include a
70275584Sru.B PSPIC
70375584Srumacro which allows a picture to be easily imported.
704104862Sru.
70575584SruThis has the format
70675584Sru.IP
707104862Sru\&\fB.PSPIC\fP [\fB\-L\fP|\fB-R\fP|\fB\-I\fP \fIn\fP]\ \fI\|file\fP [\fIwidth\fP [\fIheight\fP]]
708104862Sru.
70975584Sru.LP
71075584Sru.I file
71175584Sruis the name of the file containing the illustration;
71275584Sru.I width
71375584Sruand
71475584Sru.I height
71575584Srugive the desired width and height of the graphic.
716104862Sru.
71775584SruThe
71875584Sru.I width
71975584Sruand
72075584Sru.I height
72175584Sruarguments may have scaling indicators attached;
722104862Sruthe default scaling indicator is\~\c
72375584Sru.BR i .
724104862Sru.
72575584SruThis macro will scale the graphic uniformly
726104862Sruin the x and y\~directions so that it is no more than
72775584Sru.I width
72875584Sruwide
72975584Sruand
73075584Sru.I height
73175584Sruhigh.
732104862Sru.
73375584SruBy default, the graphic will be horizontally centered.
734104862Sru.
73575584SruThe
73675584Sru.BI \-L
73775584Sruand
73875584Sru.BI \-R
73975584Srucause the graphic to be left-aligned and right-aligned
74075584Srurespectively.
741104862Sru.
74275584SruThe
74375584Sru.B \-I
744104862Sruoption causes the graphic to be indented by\~\c
74575584Sru.IR n .
74675584Sru.RE
747104862Sru.
74875584Sru.TP
749104862Sru.B \[rs]X'ps:\ invis'
75075584Sru.br
75175584Sru.ns
75275584Sru.TP
753104862Sru.B \[rs]X'ps:\ endinvis'
75475584SruNo output will be generated for text and drawing commands
75575584Sruthat are bracketed with these
756104862Sru.B \[rs]X
75775584Srucommands.
758104862Sru.
75975584SruThese commands are intended for use when output from
76075584Sru.B troff
76175584Sruwill be previewed before being processed with
76275584Sru.BR grops ;
76375584Sruif the previewer is unable to display certain characters
76475584Sruor other constructs, then other substitute characters or constructs
76575584Srucan be used for previewing by bracketing them with these
766104862Sru.B \[rs]X
76775584Srucommands.
768104862Sru.
76975584Sru.RS
77075584Sru.LP
77175584SruFor example,
77275584Sru.B gxditview
77375584Sruis not able to display a proper
774104862Sru.B \[rs](em
77575584Srucharacter because the standard X11 fonts do not provide it;
77675584Sruthis problem can be overcome by executing the following
77775584Srurequest
778104862Sru.
77975584Sru.IP
78075584Sru.ft B
78175584Sru.nf
782104862Sru\&.char \[rs](em \[rs]X'ps: invis'\[rs]
783104862Sru\[rs]Z'\[rs]v'-.25m'\[rs]h'.05m'\[rs]D'l .9m 0'\[rs]h'.05m''\[rs]
784104862Sru\[rs]X'ps: endinvis'\[rs](em
78575584Sru.ft
78675584Sru.fi
787104862Sru.
78875584Sru.LP
78975584SruIn this case,
79075584Sru.B gxditview
79175584Sruwill be unable to display the
792104862Sru.B \[rs](em
79375584Srucharacter and will draw the line,
79475584Sruwhereas
79575584Sru.B grops
79675584Sruwill print the
797104862Sru.B \[rs](em
79875584Srucharacter
79975584Sruand ignore the line.
80075584Sru.RE
801104862Sru.
80275584Sru.LP
80375584SruThe input to
80475584Sru.B grops
80575584Srumust be in the format output by
80675584Sru.BR @g@troff (@MAN1EXT@).
807104862Sru.
80875584SruThis is described in
80975584Sru.BR groff_out (@MAN5EXT@).
810104862Sru.
81175584SruIn addition the device and font description files for the device used
81275584Srumust meet certain requirements.
813104862Sru.
81475584SruThe device and font description files supplied for
81575584Sru.B ps
81675584Srudevice meet all these requirements.
817104862Sru.
81875584Sru.BR afmtodit (@MAN1EXT@)
81975584Srucan be used to create font files from AFM files.
820104862Sru.
821104862SruThe resolution must be an integer multiple of\~72 times the
82275584Sru.BR sizescale .
823104862Sru.
82475584SruThe
82575584Sru.B ps
82675584Srudevice uses a resolution of 72000 and a sizescale of 1000.
827104862Sru.
82875584SruThe device description file should contain a command
82975584Sru.IP
83075584Sru.BI paperlength\  n
83175584Sru.LP
83275584Sruwhich says that output should be generated which is suitable for
83375584Sruprinting on a page whose length is
834104862Sru.IR n \~\c
83575584Srumachine units.
836104862Sru.
837104862SruCommon values are 792000 for letter paper and 841890 for paper in A4 format.
838104862Sru.
839104862SruAlternatively, it can contain
840104862Sru.IP
841104862Sru.BI papersize\  string
842104862Sru.LP
843104862Sruto specify a paper size; see
844104862Sru.BR groff_font (@MAN5EXT@)
845104862Srufor more information.
846104862Sru.
84775584SruEach font description file must contain a command
84875584Sru.IP
84975584Sru.BI internalname\  psname
85075584Sru.LP
85175584Sruwhich says that the PostScript name of the font is
85275584Sru.IR psname .
853104862Sru.
85475584SruIt may also contain a command
85575584Sru.IP
85675584Sru.BI encoding\  enc_file
85775584Sru.LP
85875584Sruwhich says that
85975584Sruthe PostScript font should be reencoded using the encoding described in
86075584Sru.IR enc_file ;
86175584Sruthis file should consist of a sequence of lines of the form:
86275584Sru.IP
86375584Sru.I
86475584Srupschar code
86575584Sru.LP
86675584Sruwhere
86775584Sru.I pschar
86875584Sruis the PostScript name of the character,
86975584Sruand
87075584Sru.I code
87175584Sruis its position in the encoding expressed as a decimal integer.
872104862Sru.
873104862SruLines starting with
874104862Sru.B #
875104862Sruand blank lines are ignored.
876104862Sru.
87775584SruThe code for each character given in the font file must correspond
87875584Sruto the code for the character in encoding file, or to the code in the default
87975584Sruencoding for the font if the PostScript font is not to be reencoded.
880104862Sru.
88175584SruThis code can be used with the
882104862Sru.B \[rs]N
88375584Sruescape sequence in
88475584Sru.B troff
88575584Sruto select the character,
88675584Srueven if the character does not have a groff name.
887104862Sru.
88875584SruEvery character in the font file must exist in the PostScript font, and 
88975584Sruthe widths given in the font file must match the widths used
89075584Sruin the PostScript font.
891104862Sru.
89275584Sru.B grops
89375584Sruwill assume that a character with a groff name of
89475584Sru.B space
89575584Sruis blank (makes no marks on the page);
89675584Sruit can make use of such a character to generate more efficient and
89775584Srucompact PostScript output.
898104862Sru.
89975584Sru.LP
90075584Sru.B grops
90175584Srucan automatically include the downloadable fonts necessary
90275584Sruto print the document.
903104862Sru.
90475584SruAny downloadable fonts which should, when required, be included by
90575584Sru.B grops
90675584Srumust be listed in the file
90775584Sru.BR @FONTDIR@/devps/download ;
90875584Sruthis should consist of lines of the form
909104862Sru.
91075584Sru.IP
91175584Sru.I
912104862Srufont filename
913104862Sru.
91475584Sru.LP
91575584Sruwhere
91675584Sru.I font
91775584Sruis the PostScript name of the font,
91875584Sruand
91975584Sru.I filename
92075584Sruis the name of the file containing the font;
92175584Srulines beginning with
92275584Sru.B #
92375584Sruand blank lines are ignored;
92475584Srufields may be separated by tabs or spaces;
92575584Sru.I filename
92675584Sruwill be searched for using the same mechanism that is used
92775584Srufor groff font metric files.
928104862Sru.
92975584SruThe
93075584Sru.B download
931104862Srufile itself will also be searched for using this mechanism;
932104862Srucurrently, only the first found file in the font path is used.
933104862Sru.
93475584Sru.LP
93575584SruIf the file containing a downloadable font or imported document
93675584Sruconforms to the Adobe Document Structuring Conventions,
93775584Sruthen
93875584Sru.B grops
93975584Sruwill interpret any comments in the files sufficiently to ensure that its
94075584Sruown output is conforming.
941104862Sru.
94275584SruIt will also supply any needed font resources that are listed in the
94375584Sru.B download
94475584Srufile
94575584Sruas well as any needed file resources.
946104862Sru.
94775584SruIt is also able to handle inter-resource dependencies.
948104862Sru.
94975584SruFor example, suppose that you have a downloadable font called Garamond,
95075584Sruand also a downloadable font called Garamond-Outline
95175584Sruwhich depends on Garamond
95275584Sru(typically it would be defined to copy Garamond's font dictionary,
95375584Sruand change the PaintType),
95475584Sruthen it is necessary for Garamond to be appear before Garamond-Outline
95575584Sruin the PostScript document.
956104862Sru.
95775584Sru.B grops
95875584Sruwill handle this automatically
95975584Sruprovided that the downloadable font file for Garamond-Outline
96075584Sruindicates its dependence on Garamond by means of
96175584Sruthe Document Structuring Conventions,
96275584Srufor example by beginning with the following lines
963104862Sru.
96475584Sru.IP
96575584Sru.B
96675584Sru%!PS-Adobe-3.0 Resource-Font
96775584Sru.br
96875584Sru.B
96975584Sru%%DocumentNeededResources: font Garamond
97075584Sru.br
97175584Sru.B
97275584Sru%%EndComments
97375584Sru.br
97475584Sru.B
97575584Sru%%IncludeResource: font Garamond
976104862Sru.
97775584Sru.LP
97875584SruIn this case both Garamond and Garamond-Outline would need to be listed
97975584Sruin the
98075584Sru.B download
98175584Srufile.
982104862Sru.
98375584SruA downloadable font should not include its own name in a
98475584Sru.B %%DocumentSuppliedResources
98575584Srucomment.
986104862Sru.
98775584Sru.LP
98875584Sru.B grops
98975584Sruwill not interpret 
99075584Sru.B %%DocumentFonts
99175584Srucomments.
992104862Sru.
99375584SruThe
99475584Sru.BR %%DocumentNeededResources ,
99575584Sru.BR %%DocumentSuppliedResources ,
99675584Sru.BR %%IncludeResource ,
99775584Sru.BR %%BeginResource
99875584Sruand
99975584Sru.BR %%EndResource
100075584Srucomments
100175584Sru(or possibly the old
100275584Sru.BR %%DocumentNeededFonts ,
100375584Sru.BR %%DocumentSuppliedFonts ,
100475584Sru.BR %%IncludeFont ,
100575584Sru.BR %%BeginFont
100675584Sruand
100775584Sru.BR %%EndFont
100875584Srucomments)
100975584Srushould be used.
1010104862Sru.
1011104862Sru.
1012104862Sru.SS TrueType fonts
1013104862SruTrueType fonts can be used with 
1014104862Sru.B grops 
1015104862Sruif converted first to 
1016104862Sru.B "Type 42"
1017104862Sruformat, an especial PostScript wrapper equivalent to the
1018104862SruPFA format mentioned in
1019104862Sru.BR pfbtops (@MAN1EXT@).
1020104862SruThere are several different methods to generate a type42 
1021104862Sruwrapper and most of them involve the use of a PostScript
1022104862Sruinterpreter such as Ghostscript \(em see
1023104862Sru.BR gs (1).
1024104862SruYet, the easiest method involves the use of the application 
1025104862Sru.BR ttftot42 .
1026104862SruThis program uses
1027104862Sru.BR freetype (3)
1028104862Sru(version 1.3.1) to generate type42
1029104862Srufont wrappers and well-formed AFM files that can be fed to
1030104862Sruthe
1031104862Sru.BR afmtodit (@MAN1EXT@)
1032104862Sruscript to create appropriate metric files.
1033104862SruThe resulting font wrappers should be added to the
1034104862Sru.B download
1035104862Srufile.
1036104862Sru.B ttftot42
1037104862Srusource code can be downloaded from
1038104862Sru.URL ftp://\:www.giga.or.at/\:pub/\:nih/\:ttftot42/ \
1039104862Sru     ftp://\:www.giga.or.at/\:pub/\:nih/\:ttftot42/ .
1040104862Sru.
1041104862Sru.
104275584Sru.SH ENVIRONMENT
104375584Sru.TP
104475584Sru.SM
104575584Sru.B GROPS_PROLOGUE
104675584SruIf this is set to
104775584Sru.IR foo ,
104875584Sruthen
104975584Sru.B grops
105075584Sruwill use the file
105175584Sru.I foo
105275584Sru(in the font path) instead of the default prologue file
105375584Sru.BR prologue .
1054104862Sru.
105575584SruThe option
105675584Sru.B \-P
105775584Sruoverrides this environment variable.
1058104862Sru.
1059104862Sru.
106075584Sru.SH FILES
106175584Sru.Tp \w'\fB@FONTDIR@/devps/download'u+2n
106275584Sru.B @FONTDIR@/devps/DESC
106375584SruDevice description file.
1064104862Sru.
106575584Sru.TP
106675584Sru.BI @FONTDIR@/devps/ F
106775584SruFont description file for font
106875584Sru.IR F .
1069104862Sru.
107075584Sru.TP
107175584Sru.B @FONTDIR@/devps/download
107275584SruList of downloadable fonts.
1073104862Sru.
107475584Sru.TP
107575584Sru.B @FONTDIR@/devps/text.enc
107675584SruEncoding used for text fonts.
1077104862Sru.
107875584Sru.TP
107975584Sru.B @MACRODIR@/ps.tmac
108075584SruMacros for use with
108175584Sru.BR grops ;
108275584Sruautomatically loaded by
108375584Sru.BR troffrc
1084104862Sru.
108575584Sru.TP
108675584Sru.B @MACRODIR@/pspic.tmac
108775584SruDefinition of
108875584Sru.B PSPIC
108975584Srumacro,
109075584Sruautomatically loaded by
109175584Sru.BR ps.tmac .
1092104862Sru.
109375584Sru.TP
109475584Sru.B @MACRODIR@/psold.tmac
109575584SruMacros to disable use of characters not present in older
109675584SruPostScript printers (e.g. `eth' or `thorn').
1097104862Sru.
109875584Sru.TP
109975584Sru.BI /tmp/grops XXXXXX
110075584SruTemporary file.
1101104862Sru.
1102104862Sru.
110375584Sru.SH "SEE ALSO"
110475584Sru.BR afmtodit (@MAN1EXT@),
110575584Sru.BR groff (@MAN1EXT@),
110675584Sru.BR @g@troff (@MAN1EXT@),
110775584Sru.BR psbb (@MAN1EXT@),
110875584Sru.BR groff_out (@MAN5EXT@),
110975584Sru.BR groff_font (@MAN5EXT@),
111075584Sru.BR groff_char (@MAN7EXT@)
111179543Sru.
111279543Sru.\" Local Variables:
111379543Sru.\" mode: nroff
111479543Sru.\" End:
1115