grops.man revision 114402
179543Sru.ig
2114402SruCopyright (C) 1989-2000, 2001, 2002, 2003 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
26114402Sru.  ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
27114402Sru.  el .TP "\\$1"
2875584Sru..
29104862Sru.
30114402Sru.de TQ
31114402Sru.  br
32114402Sru.  ns
33114402Sru.  TP \$1
34114402Sru..
35104862Sru.
36114402Sru.de FT
37114402Sru.  if '\\*(.T'ps' .ft \\$1
38114402Sru..
39114402Sru.
40114402Sru.
4175584Sru.TH GROPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
42104862Sru.
43104862Sru.
4475584Sru.SH NAME
4575584Srugrops \- PostScript driver for groff
46104862Sru.
47104862Sru.
4875584Sru.SH SYNOPSIS
4975584Sru.nr a \n(.j
5075584Sru.ad l
5175584Sru.nr i \n(.i
5275584Sru.in +\w'\fBgrops 'u
5375584Sru.ti \niu
5475584Sru.B grops
55104862Sru.
5675584Sru.de OP
57104862Sru.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\%\\$2" "\ ]"
5875584Sru.el .RB "[\ " "\\$1" "\ ]"
5975584Sru..
60104862Sru.
6175584Sru.OP \-glmv
6275584Sru.OP \-b n
6375584Sru.OP \-c n
6475584Sru.OP \-F dir
65104862Sru.OP \-p papersize
6675584Sru.OP \-P prologue
67104862Sru.OP \-w n
6875584Sru.RI "[\ " files\|.\|.\|. "\ ]"
6975584Sru.br
7075584Sru.ad \na
71104862Sru.
7275584Sru.PP
7375584SruIt is possible to have whitespace between a command line option and its
7475584Sruparameter.
75104862Sru.
76104862Sru.
7775584Sru.SH DESCRIPTION
7875584Sru.B grops
7975584Srutranslates the output of GNU
8075584Sru.B troff
8175584Sruto PostScript.
82104862Sru.
8375584SruNormally
8475584Sru.B grops
8575584Srushould be invoked by using the groff command
8675584Sruwith a
8775584Sru.B \-Tps
8875584Sruoption.
89104862Sru.
9075584Sru.if '@DEVICE@'ps' (Actually, this is the default for groff.)
91104862Sru.
9275584SruIf no files are given,
9375584Sru.B grops
9475584Sruwill read the standard input.
95104862Sru.
9675584SruA filename of
9775584Sru.B \-
9875584Sruwill also cause
9975584Sru.B grops
10075584Sruto read the standard input.
101104862Sru.
10275584SruPostScript output is written to the standard output.
103104862Sru.
10475584SruWhen
10575584Sru.B grops
10675584Sruis run by
10775584Sru.B groff
10875584Sruoptions can be passed to
10975584Sru.B grops
11075584Sruusing the
11175584Sru.B groff
11275584Sru.B \-P
11375584Sruoption.
114104862Sru.
115104862Sru.
11675584Sru.SH OPTIONS
11775584Sru.TP
11875584Sru.BI \-b n
119114402SruProvide workarounds for older printers, broken spoolers, and previewers.
120104862Sru.
12175584SruNormally
12275584Sru.B grops
123114402Sruproduces output at PostScript LanguageLevel\~2 that conforms to the
124114402SruDocument Structuring Conventions version 3.0.
125104862Sru.
126114402SruSome older printers, spoolers, and previewers can't handle such output.
127104862Sru.
128104862SruThe value of\~\c
12975584Sru.I n
13075584Srucontrols what
13175584Sru.B grops
132114402Srudoes to make its output acceptable to such programs.
133104862Sru.
134104862SruA value of\~0 will cause grops not to employ any workarounds.
135104862Sru.
136114402Sru.IP
137104862SruAdd\~1 if no
138114402Sru.B %%Begin\%Document\%Setup
13975584Sruand
140114402Sru.B %%End\%Document\%Setup
14175584Srucomments should be generated;
14275584Sruthis is needed for early versions of TranScript that get confused by
14375584Sruanything between the
144114402Sru.B %%End\%Prolog
14575584Srucomment and the first
14675584Sru.B %%Page
14775584Srucomment.
148104862Sru.
149114402Sru.IP
150104862SruAdd\~2 if lines in included files beginning with
15175584Sru.B %!
15275584Srushould be stripped out; this is needed for Sun's pageview previewer.
153104862Sru.
154114402Sru.IP
155104862SruAdd\~4 if
15675584Sru.BR %%Page ,
15775584Sru.BR %%Trailer
15875584Sruand
159114402Sru.B %%End\%Prolog
16075584Srucomments should be
16175584Srustripped out of included files; this is needed for spoolers that
16275584Srudon't understand the
163114402Sru.B %%Begin\%Document
16475584Sruand
165114402Sru.B %%End\%Document
16675584Srucomments.
167104862Sru.
168114402Sru.IP
169104862SruAdd\~8 if the first line of the PostScript output should be
17075584Sru.B %!PS-Adobe-2.0
17175584Srurather than
17275584Sru.BR %!PS-Adobe-3.0 ;
17375584Sruthis is needed when using Sun's Newsprint with a printer that requires
17475584Srupage reversal.
175104862Sru.
176114402Sru.IP
177114402SruAdd\~16 if no media size information should be included in the document
178114402Sru(this is, neither use
179114402Sru.B %%Document\%Media
180114402Srunor the
181114402Sru.B setpagedevice
182114402SruPostScript command).
183114402Sru.
184114402SruThis was the behaviour of groff version 1.18.1 and earlier; it is needed
185114402Srufor older printers which don't understand PostScript LanguageLevel\~2.
186114402Sru.
187114402Sru.IP
18875584SruThe default value can be specified by a
189104862Sru.
19075584Sru.RS
19175584Sru.IP
19275584Sru.BI broken\  n
193104862Sru.
19475584Sru.LP
19575584Srucommand in the DESC file.
196104862Sru.
197104862SruOtherwise the default value is\~0.
19875584Sru.RE
199104862Sru.
20075584Sru.TP
20175584Sru.BI \-c n
20275584SruPrint
20375584Sru.I n
20475584Srucopies of each page.
205104862Sru.
20675584Sru.TP
207104862Sru.BI \-F dir
208104862SruPrepend directory
209104862Sru.IB dir /dev name
210104862Sruto the search path for prologue, font, and device description files;
211104862Sru.I name
212104862Sruis the name of the device, usually
213104862Sru.BR ps .
214104862Sru.
215104862Sru.TP
21675584Sru.BI \-g
21775584SruGuess the page length.
218104862Sru.
21975584SruThis generates PostScript code that guesses the page length.
220104862Sru.
22175584SruThe guess will be correct only if the imageable area is vertically
22275584Srucentered on the page.
223104862Sru.
22475584SruThis option allows you to generate documents that can be printed
22575584Sruboth on letter (8.5\(mu11) paper and on A4 paper without change.
226104862Sru.
22775584Sru.TP
22875584Sru.B \-l
22975584SruPrint the document in landscape format.
230104862Sru.
23175584Sru.TP
23275584Sru.B \-m
23375584SruTurn manual feed on for the document.
234104862Sru.
23575584Sru.TP
236104862Sru.BI \-p paper-size
237104862SruSet physical dimension of output medium.
238104862Sru.
239104862SruThis overrides the
240114402Sru.BR papersize ,
241114402Sru.BR paperlength ,
242104862Sruand
243114402Sru.B paperwidth
244104862Srucommands in the
245104862Sru.B DESC
246104862Srufile; it accepts the same arguments as the
247104862Sru.B papersize
248104862Srucommand.
249104862Sru.
250114402SruSee
251114402Sru.B groff_font (@MAN5EXT@)
252114402Srufor details.
253114402Sru.
25475584Sru.TP
25575584Sru.BI \-P prologue-file
25675584SruUse the file
25775584Sru.I prologue-file
25875584Sru(in the font path) as the prologue instead of the default prologue file
25975584Sru.BR prologue .
260104862Sru.
26175584SruThis option overrides the environment variable
26275584Sru.SM GROPS_PROLOGUE.
263104862Sru.
26475584Sru.TP
26575584Sru.BI \-w n
26675584SruLines should be drawn using a thickness of
267104862Sru.IR n \~\c
26875584Sruthousandths of an em.
269104862SruIf this option is not given, the line thickness defaults to 0.04\~em.
270104862Sru.
27175584Sru.TP
27275584Sru.B \-v
27375584SruPrint the version number.
274104862Sru.
275104862Sru.
27675584Sru.SH USAGE
27775584SruThere are styles called
27875584Sru.BR R ,
27975584Sru.BR I ,
28075584Sru.BR B ,
28175584Sruand
28275584Sru.B BI
283104862Srumounted at font positions 1 to\~4.
284104862Sru.
28575584SruThe fonts are grouped into families
28675584Sru.BR A ,
28775584Sru.BR BM ,
28875584Sru.BR C ,
28975584Sru.BR H ,
29075584Sru.BR HN ,
29175584Sru.BR N ,
292114402Sru.BR P ,
293104862Sruand\~\c
29475584Sru.B T
29575584Sruhaving members in each of these styles:
296104862Sru.
297104862Sru.RS
29875584Sru.TP
29975584Sru.B AR
30075584Sru.FT AR
30175584SruAvantGarde-Book
30275584Sru.FT
303104862Sru.
304114402Sru.TQ
30575584Sru.B AI
30675584Sru.FT AI
30775584SruAvantGarde-BookOblique
30875584Sru.FT
309104862Sru.
310114402Sru.TQ
31175584Sru.B AB
31275584Sru.FT AB
31375584SruAvantGarde-Demi
31475584Sru.FT
315104862Sru.
316114402Sru.TQ
31775584Sru.B ABI
31875584Sru.FT ABI
31975584SruAvantGarde-DemiOblique
32075584Sru.FT
321104862Sru.
322114402Sru.TQ
32375584Sru.B BMR
32475584Sru.FT BMR
32575584SruBookman-Light
32675584Sru.FT
327104862Sru.
328114402Sru.TQ
32975584Sru.B BMI
33075584Sru.FT BMI
33175584SruBookman-LightItalic
33275584Sru.FT
333104862Sru.
334114402Sru.TQ
33575584Sru.B BMB
33675584Sru.FT BMB
33775584SruBookman-Demi
33875584Sru.FT
339104862Sru.
340114402Sru.TQ
34175584Sru.B BMBI
34275584Sru.FT BMBI
34375584SruBookman-DemiItalic
34475584Sru.FT
345104862Sru.
346114402Sru.TQ
34775584Sru.B CR
34875584Sru.FT CR
34975584SruCourier
35075584Sru.FT
351104862Sru.
352114402Sru.TQ
35375584Sru.B CI
35475584Sru.FT CI
35575584SruCourier-Oblique
35675584Sru.FT
357104862Sru.
358114402Sru.TQ
35975584Sru.B CB
36075584Sru.FT CB
36175584SruCourier-Bold
36275584Sru.FT
363104862Sru.
364114402Sru.TQ
36575584Sru.B CBI
36675584Sru.FT CBI
36775584SruCourier-BoldOblique
36875584Sru.FT
369104862Sru.
370114402Sru.TQ
37175584Sru.B HR
37275584Sru.FT HR
37375584SruHelvetica
37475584Sru.FT
375104862Sru.
376114402Sru.TQ
37775584Sru.B HI
37875584Sru.FT HI
37975584SruHelvetica-Oblique
38075584Sru.FT
381104862Sru.
382114402Sru.TQ
38375584Sru.B HB
38475584Sru.FT HB
38575584SruHelvetica-Bold
38675584Sru.FT
387104862Sru.
388114402Sru.TQ
38975584Sru.B HBI
39075584Sru.FT HBI
39175584SruHelvetica-BoldOblique
39275584Sru.FT
393104862Sru.
394114402Sru.TQ
39575584Sru.B HNR
39675584Sru.FT HNR
39775584SruHelvetica-Narrow
39875584Sru.FT
399104862Sru.
400114402Sru.TQ
40175584Sru.B HNI
40275584Sru.FT HNI
40375584SruHelvetica-Narrow-Oblique
40475584Sru.FT
405104862Sru.
406114402Sru.TQ
40775584Sru.B HNB
40875584Sru.FT HNB
40975584SruHelvetica-Narrow-Bold
41075584Sru.FT
411104862Sru.
412114402Sru.TQ
41375584Sru.B HNBI
41475584Sru.FT HNBI
41575584SruHelvetica-Narrow-BoldOblique
41675584Sru.FT
417104862Sru.
418114402Sru.TQ
41975584Sru.B NR
42075584Sru.FT NR
42175584SruNewCenturySchlbk-Roman
42275584Sru.FT
423104862Sru.
424114402Sru.TQ
42575584Sru.B NI
42675584Sru.FT NI
42775584SruNewCenturySchlbk-Italic
42875584Sru.FT
429104862Sru.
430114402Sru.TQ
43175584Sru.B NB
43275584Sru.FT NB
43375584SruNewCenturySchlbk-Bold
43475584Sru.FT
435104862Sru.
436114402Sru.TQ
43775584Sru.B NBI
43875584Sru.FT NBI
43975584SruNewCenturySchlbk-BoldItalic
44075584Sru.FT
441104862Sru.
442114402Sru.TQ
44375584Sru.B PR
44475584Sru.FT PR
44575584SruPalatino-Roman
44675584Sru.FT
447104862Sru.
448114402Sru.TQ
44975584Sru.B PI
45075584Sru.FT PI
45175584SruPalatino-Italic
45275584Sru.FT
453104862Sru.
454114402Sru.TQ
45575584Sru.B PB
45675584Sru.FT PB
45775584SruPalatino-Bold
45875584Sru.FT
459104862Sru.
460114402Sru.TQ
46175584Sru.B PBI
46275584Sru.FT PBI
46375584SruPalatino-BoldItalic
46475584Sru.FT
465104862Sru.
466114402Sru.TQ
46775584Sru.B TR
46875584Sru.FT TR
46975584SruTimes-Roman
47075584Sru.FT
471104862Sru.
472114402Sru.TQ
47375584Sru.B TI
47475584Sru.FT TI
47575584SruTimes-Italic
47675584Sru.FT
477104862Sru.
478114402Sru.TQ
47975584Sru.B TB
48075584Sru.FT TB
48175584SruTimes-Bold
48275584Sru.FT
483104862Sru.
484114402Sru.TQ
48575584Sru.B TBI
48675584Sru.FT TBI
48775584SruTimes-BoldItalic
48875584Sru.FT
489104862Sru.RE
490104862Sru.
49175584Sru.LP
49275584SruThere is also the following font which is not a member of a family:
493104862Sru.
494104862Sru.RS
49575584Sru.TP
49675584Sru.B ZCMI
49775584Sru.FT ZCMI
49875584SruZapfChancery-MediumItalic
49975584Sru.FT
500104862Sru.RE
501104862Sru.
50275584Sru.LP
50375584SruThere are also some special fonts called
504114402Sru.B S
505114402Srufor the PS Symbol font, and
506114402Sru.BR SS ,
507114402Srucontaining slanted lowercase Greek letters taken from PS Symbol.
508104862Sru.
50975584SruZapf Dingbats is available as
51075584Sru.BR ZD
51175584Sruand a reversed version of ZapfDingbats (with symbols pointing in the opposite
51275584Srudirection) is available as
51375584Sru.BR ZDR ;
51475584Srumost characters in these fonts are unnamed and must be accessed using
515104862Sru.BR \[rs]N .
516104862Sru.
51775584Sru.LP
518104862SruThe default color for
519104862Sru.B \[rs]m
520104862Sruand
521104862Sru.B \[rs]M
522104862Sruis black; for colors defined in the `rgb' color space,
523104862Sru.B setrgbcolor
524104862Sruis used, for `cmy' and `cmyk'
525104862Sru.BR setcmykcolor ,
526104862Sruand for `gray'
527104862Sru.BR setgray .
528114402SruNote that
529114402Sru.B setcmykcolor
530114402Sruis a PostScript LanguageLevel\~2 command and thus not available on some
531114402Sruolder printers.
532104862Sru.
533104862Sru.LP
53475584Sru.B grops
535104862Sruunderstands various X\~commands produced using the
536104862Sru.B \[rs]X
53775584Sruescape sequence;
53875584Sru.B grops
53975584Sruwill only interpret commands that begin with a
54075584Sru.B ps:
54175584Srutag.
542104862Sru.
54375584Sru.TP
544104862Sru.BI \[rs]X'ps:\ exec\  code '
54575584SruThis executes the arbitrary PostScript commands in
54675584Sru.IR code .
547104862Sru.
54875584SruThe PostScript currentpoint will be set to the position of the
549104862Sru.B \[rs]X
55075584Srucommand before executing
55175584Sru.IR code .
552104862Sru.
55375584SruThe origin will be at the top left corner of the page,
554104862Sruand y\~coordinates will increase down the page.
555104862Sru.
556104862SruA procedure\~\c
55775584Sru.B u
55875584Sruwill be defined that converts groff units
55975584Sruto the coordinate system in effect.
560104862Sru.
56175584SruFor example, 
562104862Sru.
56375584Sru.RS
56475584Sru.IP
56575584Sru.B
56675584Sru\&.nr x 1i
56775584Sru.br
56875584Sru.B
569104862Sru\[rs]X'ps: exec \[rs]nx u 0 rlineto stroke'
57075584Sru.br
57175584Sru.RE
572104862Sru.
57375584Sru.IP
57475584Sruwill draw a horizontal line one inch long.
575104862Sru.
57675584Sru.I code
57775584Srumay make changes to the graphics state,
57875584Srubut any changes will persist only to the
57975584Sruend of the page.
580104862Sru.
58175584SruA dictionary containing the definitions specified by the
58275584Sru.B def
58375584Sruand
58475584Sru.B mdef
58575584Sruwill be on top of the dictionary stack.
586104862Sru.
58775584SruIf your code adds definitions to this dictionary,
58875584Sruyou should allocate space for them using
589104862Sru.BI \[rs]X'ps\ mdef \ n '\fR.
590104862Sru.
59175584SruAny definitions will persist only until the end of the page.
592104862Sru.
59375584SruIf you use the
594104862Sru.B \[rs]Y
59575584Sruescape sequence with an argument that names a macro,
59675584Sru.I code
59775584Srucan extend over multiple lines.
598104862Sru.
59975584SruFor example,
600104862Sru.
60175584Sru.RS
60275584Sru.IP
60375584Sru.nf
60475584Sru.ft B
60575584Sru\&.nr x 1i
60675584Sru\&.de y
60775584Sru\&ps: exec
608104862Sru\&\[rs]nx u 0 rlineto
60975584Sru\&stroke
61075584Sru\&..
611104862Sru\&\[rs]Yy
61275584Sru.fi
61375584Sru.ft R
614104862Sru.
61575584Sru.LP
61675584Sruis another way to draw a horizontal line one inch long.
61775584Sru.RE
618104862Sru.
61975584Sru.TP
620104862Sru.BI \[rs]X'ps:\ file\  name '
62175584SruThis is the same as the
62275584Sru.B exec
62375584Srucommand except that the PostScript code is read from file
62475584Sru.IR name .
625104862Sru.
62675584Sru.TP
627104862Sru.BI \[rs]X'ps:\ def\  code '
62875584SruPlace a PostScript definition contained in
62975584Sru.I code
63075584Sruin the prologue.
631104862Sru.
63275584SruThere should be at most one definition per
633104862Sru.B \[rs]X
63475584Srucommand.
635104862Sru.
63675584SruLong definitions can be split over several
637104862Sru.B \[rs]X
63875584Srucommands;
63975584Sruall the
64075584Sru.I code
64175584Sruarguments are simply joined together separated by newlines.
642104862Sru.
64375584SruThe definitions are placed in a dictionary which is automatically
64475584Srupushed on the dictionary stack when an
64575584Sru.B exec
64675584Srucommand is executed.
647104862Sru.
64875584SruIf you use the
649104862Sru.B \[rs]Y
65075584Sruescape sequence with an argument that names a macro,
65175584Sru.I code
65275584Srucan extend over multiple lines.
653104862Sru.
65475584Sru.TP
655104862Sru.BI \[rs]X'ps:\ mdef\  n\ code  '
65675584SruLike
65775584Sru.BR def ,
65875584Sruexcept that
65975584Sru.I code
66075584Srumay contain up to
661104862Sru.IR n \~\c
66275584Srudefinitions.
663104862Sru.
66475584Sru.B grops
66575584Sruneeds to know how many definitions
66675584Sru.I code
66775584Srucontains
66875584Sruso that it can create an appropriately sized PostScript dictionary
66975584Sruto contain them.
670104862Sru.
67175584Sru.TP
672104862Sru.BI \[rs]X'ps:\ import\  file\ llx\ lly\ urx\ ury\ width\ \fR[\fP\ height\ \fR]\fP '
67375584SruImport a PostScript graphic from
67475584Sru.IR file .
675104862Sru.
67675584SruThe arguments
67775584Sru.IR llx ,
67875584Sru.IR lly ,
67975584Sru.IR urx ,
68075584Sruand
68175584Sru.I ury
68275584Srugive the bounding box of the graphic in the default PostScript
68375584Srucoordinate system; they should all be integers;
68475584Sru.I llx
68575584Sruand
68675584Sru.I lly
687104862Sruare the x and y\~coordinates of the lower left
68875584Srucorner of the graphic;
68975584Sru.I urx
69075584Sruand
69175584Sru.I ury
692104862Sruare the x and y\~coordinates of the upper right corner of the graphic;
69375584Sru.I width
69475584Sruand
69575584Sru.I height
69675584Sruare integers that give the desired width and height in groff
69775584Sruunits of the graphic.
698104862Sru.
69975584SruThe graphic will be scaled so that it has this width and height
70075584Sruand translated so that the lower left corner of the graphic is
70175584Srulocated at the position associated with
702104862Sru.B \[rs]X
70375584Srucommand.
704104862Sru.
70575584SruIf the height argument is omitted it will be scaled uniformly in the
706104862Srux and y\~directions so that it has the specified width.
707104862Sru.
70875584SruNote that the contents of the
709104862Sru.B \[rs]X
71075584Srucommand are not interpreted by
71175584Sru.BR troff ;
71275584Sruso vertical space for the graphic is not automatically added,
71375584Sruand the
71475584Sru.I width
71575584Sruand
71675584Sru.I height
71775584Sruarguments are not allowed to have attached scaling indicators.
718104862Sru.
71975584SruIf the PostScript file complies with the Adobe Document Structuring
72075584SruConventions and contains a
721114402Sru.B %%Bounding\%Box
72275584Srucomment, then the bounding box can be automatically
72375584Sruextracted from within groff by using the
72475584Sru.B psbb
72575584Srurequest.
726104862Sru.
727114402Sru.IP
728114402SruSee
729114402Sru.BR groff_tmac (@MAN5EXT@)
730114402Srufor a description of the
73175584Sru.B PSPIC
732114402Srumacro which provides a convenient high-level interface for inclusion of
733114402SruPostScript graphics.
734104862Sru.
73575584Sru.TP
736104862Sru.B \[rs]X'ps:\ invis'
737114402Sru.TQ
738104862Sru.B \[rs]X'ps:\ endinvis'
73975584SruNo output will be generated for text and drawing commands
74075584Sruthat are bracketed with these
741104862Sru.B \[rs]X
74275584Srucommands.
743104862Sru.
74475584SruThese commands are intended for use when output from
74575584Sru.B troff
74675584Sruwill be previewed before being processed with
74775584Sru.BR grops ;
74875584Sruif the previewer is unable to display certain characters
74975584Sruor other constructs, then other substitute characters or constructs
75075584Srucan be used for previewing by bracketing them with these
751104862Sru.B \[rs]X
75275584Srucommands.
753104862Sru.
75475584Sru.RS
75575584Sru.LP
75675584SruFor example,
75775584Sru.B gxditview
75875584Sruis not able to display a proper
759104862Sru.B \[rs](em
76075584Srucharacter because the standard X11 fonts do not provide it;
76175584Sruthis problem can be overcome by executing the following
76275584Srurequest
763104862Sru.
76475584Sru.IP
76575584Sru.ft B
76675584Sru.nf
767104862Sru\&.char \[rs](em \[rs]X'ps: invis'\[rs]
768104862Sru\[rs]Z'\[rs]v'-.25m'\[rs]h'.05m'\[rs]D'l .9m 0'\[rs]h'.05m''\[rs]
769104862Sru\[rs]X'ps: endinvis'\[rs](em
77075584Sru.ft
77175584Sru.fi
772104862Sru.
77375584Sru.LP
77475584SruIn this case,
77575584Sru.B gxditview
77675584Sruwill be unable to display the
777104862Sru.B \[rs](em
77875584Srucharacter and will draw the line,
77975584Sruwhereas
78075584Sru.B grops
78175584Sruwill print the
782104862Sru.B \[rs](em
78375584Srucharacter
784114402Sruand ignore the line (this code is already in file
785114402Sru.B Xps.tmac
786114402Sruwhich will be loaded if a documented intended for
787114402Sru.B grops
788114402Sruis previewed with
789114402Sru.BR gxditview ).
79075584Sru.RE
791104862Sru.
79275584Sru.LP
79375584SruThe input to
79475584Sru.B grops
79575584Srumust be in the format output by
79675584Sru.BR @g@troff (@MAN1EXT@).
797104862Sru.
79875584SruThis is described in
79975584Sru.BR groff_out (@MAN5EXT@).
800104862Sru.
801114402Sru.LP
802114402SruIn addition, the device and font description files for the device used
80375584Srumust meet certain requirements.
804104862Sru.
80575584SruThe device and font description files supplied for
80675584Sru.B ps
80775584Srudevice meet all these requirements.
808104862Sru.
80975584Sru.BR afmtodit (@MAN1EXT@)
81075584Srucan be used to create font files from AFM files.
811104862Sru.
812104862SruThe resolution must be an integer multiple of\~72 times the
81375584Sru.BR sizescale .
814104862Sru.
81575584SruThe
81675584Sru.B ps
81775584Srudevice uses a resolution of 72000 and a sizescale of 1000.
818104862Sru.
81975584Sru.LP
820114402SruThe device description file must contain a valid paper size; see
821104862Sru.BR groff_font (@MAN5EXT@)
822104862Srufor more information.
823104862Sru.
824114402Sru.LP
82575584SruEach font description file must contain a command
82675584Sru.IP
82775584Sru.BI internalname\  psname
82875584Sru.LP
82975584Sruwhich says that the PostScript name of the font is
83075584Sru.IR psname .
831104862Sru.
83275584SruIt may also contain a command
83375584Sru.IP
83475584Sru.BI encoding\  enc_file
83575584Sru.LP
83675584Sruwhich says that
83775584Sruthe PostScript font should be reencoded using the encoding described in
83875584Sru.IR enc_file ;
83975584Sruthis file should consist of a sequence of lines of the form:
84075584Sru.IP
84175584Sru.I
84275584Srupschar code
84375584Sru.LP
84475584Sruwhere
84575584Sru.I pschar
84675584Sruis the PostScript name of the character,
84775584Sruand
84875584Sru.I code
849114402Sruis its position in the encoding expressed as a decimal integer; valid
850114402Sruvalues are in the range 0 to\~255.
851104862Sru.
852104862SruLines starting with
853104862Sru.B #
854104862Sruand blank lines are ignored.
855104862Sru.
85675584SruThe code for each character given in the font file must correspond
85775584Sruto the code for the character in encoding file, or to the code in the default
85875584Sruencoding for the font if the PostScript font is not to be reencoded.
859104862Sru.
86075584SruThis code can be used with the
861104862Sru.B \[rs]N
86275584Sruescape sequence in
86375584Sru.B troff
86475584Sruto select the character,
86575584Srueven if the character does not have a groff name.
866104862Sru.
86775584SruEvery character in the font file must exist in the PostScript font, and 
86875584Sruthe widths given in the font file must match the widths used
86975584Sruin the PostScript font.
870104862Sru.
87175584Sru.B grops
87275584Sruwill assume that a character with a groff name of
87375584Sru.B space
87475584Sruis blank (makes no marks on the page);
87575584Sruit can make use of such a character to generate more efficient and
87675584Srucompact PostScript output.
877104862Sru.
87875584Sru.LP
879114402SruNote that
88075584Sru.B grops
881114402Sruis able to display all glyphs in a PostScript font, not only 256.
882114402Sru.I enc_file
883114402Sru(or the default encoding if no encoding file specified) just defines the
884114402Sruorder of glyphs for the first 256 characters; all other glyphs are
885114402Sruaccessed with additional encoding vectors which
886114402Sru.B grops
887114402Sruproduces on the fly.
888114402Sru.
889114402Sru.LP
890114402Sru.B grops
89175584Srucan automatically include the downloadable fonts necessary
89275584Sruto print the document.
893114402SruSuch fonts must be in PFA format.
894114402SruUse
895114402Sru.BR pfbtops (@MAN1EXT@)
896114402Sruto convert a Type\~1 font in PFB format.
89775584SruAny downloadable fonts which should, when required, be included by
89875584Sru.B grops
89975584Srumust be listed in the file
90075584Sru.BR @FONTDIR@/devps/download ;
90175584Sruthis should consist of lines of the form
902104862Sru.
90375584Sru.IP
90475584Sru.I
905104862Srufont filename
906104862Sru.
90775584Sru.LP
90875584Sruwhere
90975584Sru.I font
91075584Sruis the PostScript name of the font,
91175584Sruand
91275584Sru.I filename
91375584Sruis the name of the file containing the font;
91475584Srulines beginning with
91575584Sru.B #
91675584Sruand blank lines are ignored;
91775584Srufields may be separated by tabs or spaces;
91875584Sru.I filename
91975584Sruwill be searched for using the same mechanism that is used
92075584Srufor groff font metric files.
921104862Sru.
92275584SruThe
92375584Sru.B download
924104862Srufile itself will also be searched for using this mechanism;
925104862Srucurrently, only the first found file in the font path is used.
926104862Sru.
92775584Sru.LP
92875584SruIf the file containing a downloadable font or imported document
92975584Sruconforms to the Adobe Document Structuring Conventions,
93075584Sruthen
93175584Sru.B grops
93275584Sruwill interpret any comments in the files sufficiently to ensure that its
93375584Sruown output is conforming.
934104862Sru.
93575584SruIt will also supply any needed font resources that are listed in the
93675584Sru.B download
93775584Srufile
93875584Sruas well as any needed file resources.
939104862Sru.
94075584SruIt is also able to handle inter-resource dependencies.
941104862Sru.
94275584SruFor example, suppose that you have a downloadable font called Garamond,
94375584Sruand also a downloadable font called Garamond-Outline
94475584Sruwhich depends on Garamond
94575584Sru(typically it would be defined to copy Garamond's font dictionary,
94675584Sruand change the PaintType),
947114402Sruthen it is necessary for Garamond to appear before Garamond-Outline
94875584Sruin the PostScript document.
949104862Sru.
95075584Sru.B grops
95175584Sruwill handle this automatically
95275584Sruprovided that the downloadable font file for Garamond-Outline
95375584Sruindicates its dependence on Garamond by means of
95475584Sruthe Document Structuring Conventions,
95575584Srufor example by beginning with the following lines
956104862Sru.
95775584Sru.IP
95875584Sru.B
95975584Sru%!PS-Adobe-3.0 Resource-Font
96075584Sru.br
96175584Sru.B
96275584Sru%%DocumentNeededResources: font Garamond
96375584Sru.br
96475584Sru.B
96575584Sru%%EndComments
96675584Sru.br
96775584Sru.B
96875584Sru%%IncludeResource: font Garamond
969104862Sru.
97075584Sru.LP
97175584SruIn this case both Garamond and Garamond-Outline would need to be listed
97275584Sruin the
97375584Sru.B download
97475584Srufile.
975104862Sru.
97675584SruA downloadable font should not include its own name in a
977114402Sru.B %%Document\%Supplied\%Resources
97875584Srucomment.
979104862Sru.
98075584Sru.LP
98175584Sru.B grops
98275584Sruwill not interpret 
983114402Sru.B %%Document\%Fonts
98475584Srucomments.
985104862Sru.
98675584SruThe
987114402Sru.BR %%Document\%Needed\%Resources ,
988114402Sru.BR %%Document\%Supplied\%Resources ,
989114402Sru.BR %%Include\%Resource ,
990114402Sru.BR %%Begin\%Resource ,
99175584Sruand
992114402Sru.BR %%End\%Resource
99375584Srucomments
99475584Sru(or possibly the old
995114402Sru.BR %%Document\%Needed\%Fonts ,
996114402Sru.BR %%Document\%Supplied\%Fonts ,
997114402Sru.BR %%Include\%Font ,
998114402Sru.BR %%Begin\%Font ,
99975584Sruand
1000114402Sru.BR %%End\%Font
100175584Srucomments)
100275584Srushould be used.
1003104862Sru.
1004104862Sru.
1005104862Sru.SS TrueType fonts
1006104862SruTrueType fonts can be used with 
1007104862Sru.B grops 
1008104862Sruif converted first to 
1009104862Sru.B "Type 42"
1010104862Sruformat, an especial PostScript wrapper equivalent to the
1011104862SruPFA format mentioned in
1012104862Sru.BR pfbtops (@MAN1EXT@).
1013104862SruThere are several different methods to generate a type42 
1014104862Sruwrapper and most of them involve the use of a PostScript
1015104862Sruinterpreter such as Ghostscript \(em see
1016104862Sru.BR gs (1).
1017104862SruYet, the easiest method involves the use of the application 
1018104862Sru.BR ttftot42 .
1019104862SruThis program uses
1020104862Sru.BR freetype (3)
1021104862Sru(version 1.3.1) to generate type42
1022104862Srufont wrappers and well-formed AFM files that can be fed to
1023104862Sruthe
1024104862Sru.BR afmtodit (@MAN1EXT@)
1025104862Sruscript to create appropriate metric files.
1026104862SruThe resulting font wrappers should be added to the
1027104862Sru.B download
1028104862Srufile.
1029104862Sru.B ttftot42
1030104862Srusource code can be downloaded from
1031104862Sru.URL ftp://\:www.giga.or.at/\:pub/\:nih/\:ttftot42/ \
1032104862Sru     ftp://\:www.giga.or.at/\:pub/\:nih/\:ttftot42/ .
1033104862Sru.
1034104862Sru.
103575584Sru.SH ENVIRONMENT
103675584Sru.TP
103775584Sru.SM
103875584Sru.B GROPS_PROLOGUE
103975584SruIf this is set to
104075584Sru.IR foo ,
104175584Sruthen
104275584Sru.B grops
104375584Sruwill use the file
104475584Sru.I foo
104575584Sru(in the font path) instead of the default prologue file
104675584Sru.BR prologue .
1047104862Sru.
104875584SruThe option
104975584Sru.B \-P
105075584Sruoverrides this environment variable.
1051104862Sru.
1052104862Sru.
105375584Sru.SH FILES
105475584Sru.Tp \w'\fB@FONTDIR@/devps/download'u+2n
105575584Sru.B @FONTDIR@/devps/DESC
105675584SruDevice description file.
1057104862Sru.
105875584Sru.TP
105975584Sru.BI @FONTDIR@/devps/ F
106075584SruFont description file for font
106175584Sru.IR F .
1062104862Sru.
106375584Sru.TP
106475584Sru.B @FONTDIR@/devps/download
106575584SruList of downloadable fonts.
1066104862Sru.
106775584Sru.TP
106875584Sru.B @FONTDIR@/devps/text.enc
106975584SruEncoding used for text fonts.
1070104862Sru.
107175584Sru.TP
107275584Sru.B @MACRODIR@/ps.tmac
107375584SruMacros for use with
107475584Sru.BR grops ;
107575584Sruautomatically loaded by
107675584Sru.BR troffrc
1077104862Sru.
107875584Sru.TP
107975584Sru.B @MACRODIR@/pspic.tmac
108075584SruDefinition of
108175584Sru.B PSPIC
108275584Srumacro,
108375584Sruautomatically loaded by
108475584Sru.BR ps.tmac .
1085104862Sru.
108675584Sru.TP
108775584Sru.B @MACRODIR@/psold.tmac
108875584SruMacros to disable use of characters not present in older
108975584SruPostScript printers (e.g. `eth' or `thorn').
1090104862Sru.
109175584Sru.TP
109275584Sru.BI /tmp/grops XXXXXX
109375584SruTemporary file.
1094104862Sru.
1095104862Sru.
109675584Sru.SH "SEE ALSO"
109775584Sru.BR afmtodit (@MAN1EXT@),
109875584Sru.BR groff (@MAN1EXT@),
109975584Sru.BR @g@troff (@MAN1EXT@),
1100114402Sru.BR pfbtops (@MAN1EXT@),
110175584Sru.BR groff_out (@MAN5EXT@),
110275584Sru.BR groff_font (@MAN5EXT@),
1103114402Sru.BR groff_char (@MAN7EXT@),
1104114402Sru.BR groff_tmac (@MAN5EXT@)
110579543Sru.
110679543Sru.\" Local Variables:
110779543Sru.\" mode: nroff
110879543Sru.\" End:
1109