Imported Upstream version 1.22.3
[platform/upstream/groff.git] / contrib / grap2graph / grap2graph.man
1 .TH GRAP2GRAPH @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
2 .SH NAME
3 grap2graph \- convert a grap diagram into a cropped bitmap image
4 .
5 .
6 .\" --------------------------------------------------------------------
7 .SH SYNOPSIS
8 .\" --------------------------------------------------------------------
9 .
10 .B grap2graph
11 [
12 .B \-unsafe
13 ]
14 [
15 .BI \-resolution\  M\fR\^|\^\fPMxN
16 ]
17 [
18 .BI \-format\  fmt
19 ]
20 .
21 .
22 .\" --------------------------------------------------------------------
23 .SH DESCRIPTION
24 .\" --------------------------------------------------------------------
25 .
26 Reads a grap program as input; produces an image file (by default in
27 Portable Network Graphics format) suitable for the Web as output.
28 .
29 For a description of the grap language, see
30 .BR grap (1).
31 .
32 .
33 .P
34 Your graph specification should \fInot\fR be wrapped with the \&.G1 and
35 \&.G2 macros that normally guard it within
36 .BR groff (@MAN1EXT@)
37 macros.
38 .
39 .
40 .P
41 The output image will be a black-on-white graphic clipped to the
42 smallest possible bounding box that contains all the black pixels.
43 .
44 By specifying command-line options to be passed to
45 .BR convert (1)
46 you can give it a border, set the background transparent, set the
47 image's pixel density, or perform other useful transformations.
48 .
49 .
50 .P
51 This program uses
52 .BR grap (1),
53 .BR @g@pic (@MAN1EXT@),
54 .BR groff (@MAN1EXT@),
55 and the ImageMagick
56 .BR convert (1)
57 program.
58 .
59 These programs must be installed on your system and accessible on your
60 $PATH for \fBgrap2graph\fR to work.
61 .
62 .
63 .\" --------------------------------------------------------------------
64 .SH OPTIONS
65 .\" --------------------------------------------------------------------
66 .
67 .TP
68 .B \-unsafe
69 Run
70 .BR @g@pic (@MAN1EXT@)
71 and
72 .BR groff (@MAN1EXT@)
73 in the `unsafe' mode enabling the PIC macro
74 .B sh
75 to execute arbitrary commands.
76 .
77 The default is to forbid this.
78 .
79 .TP
80 .BI \-format\  fmt
81 Specify an output format; the default is PNG (Portable Network Graphics).
82 .
83 Any format that
84 .BR convert (1)
85 can emit is supported.
86 .
87 .
88 .PP
89 Command-line switches and arguments not listed above are passed to
90 .BR convert (1).
91 .
92 .
93 .\" --------------------------------------------------------------------
94 .SH ENVIRONMENT
95 .\" --------------------------------------------------------------------
96 .
97 .TP
98 .B GROFF_TMPDIR
99 The directory in which temporary files will be created.
100 .
101 If this is not set
102 .B grap2graph
103 searches the environment variables
104 .BR \%TMPDIR ,
105 .BR TMP ,
106 and
107 .B TEMP
108 (in that order).
109 .
110 Otherwise, temporary files will be created in
111 .BR /tmp .
112 .
113 .
114 .\" --------------------------------------------------------------------
115 .na
116 .SH "SEE ALSO"
117 .\" --------------------------------------------------------------------
118 .
119 .BR pic2graph (@MAN1EXT@),
120 .BR eqn2graph (@MAN1EXT@),
121 .BR @g@pic (@MAN1EXT@),
122 .BR groff (@MAN1EXT@),
123 .BR gs (1),
124 .BR convert (1).
125 .
126 .
127 .\" --------------------------------------------------------------------
128 .SH COPYING
129 .\" --------------------------------------------------------------------
130 .
131 This documentation is released to the public domain.
132 .
133 .\" --------------------------------------------------------------------
134 .SH AUTHORS
135 .\" --------------------------------------------------------------------
136 .
137 This document was written by
138 .MT esr@thyrsus.com
139 Eric S.\& Raymond
140 .ME .
141 .
142 .
143 .\" Local Variables:
144 .\" mode: nroff
145 .\" End: