Imported Upstream version 1.22.4
[platform/upstream/groff.git] / contrib / grap2graph / grap2graph.1.man
1 .TH GRAP2GRAPH @MAN1EXT@ "@MDATE@" "groff @VERSION@"
2 .SH NAME
3 grap2graph \- convert a GRAP diagram into a cropped image
4 .
5 .
6 .\" ====================================================================
7 .\" Legal Terms
8 .\" ====================================================================
9 .\"
10 .\" This documentation is released to the public domain.
11 .
12 .
13 .\" ====================================================================
14 .SH SYNOPSIS
15 .\" ====================================================================
16 .
17 .SY grap2graph
18 .OP \-unsafe
19 .OP \-format output-format
20 .RI [ convert-arguments ]
21 .YS
22 .
23 .SY grap2graph
24 .B \-\-help
25 .YS
26 .
27 .SY grap2graph
28 .B \-v
29 .SY grap2graph
30 .B \-\-version
31 .YS
32 .
33 .
34 .\" ====================================================================
35 .SH DESCRIPTION
36 .\" ====================================================================
37 .
38 .I grap2graph
39 reads a
40 .IR grap (1)
41 program from the standard input and writes an image file,
42 by default in Portable Network Graphics (PNG) format,
43 to the standard output.
44 .
45 .
46 .PP
47 The input GRAP code should
48 .I not
49 be wrapped with the
50 .B \&.G1
51 and
52 .B \&.G2
53 macros that normally guard it within
54 .IR groff (@MAN1EXT@)
55 documents.
56 .
57 .
58 .\" FIXME: How old?  This text hasn't been touched since 2008 at latest.
59 .\" Older versions of
60 .\" .I \%convert
61 .\" will produce a black-on-white graphic; newer ones may produce a
62 .\" black-on-transparent graphic.
63 .
64 .PP
65 Arguments not recognized by
66 .I grap2graph
67 are passed to the ImageMagick or GraphicsMagick program
68 .IR \%convert (1).
69 .
70 .
71 By specifying these, you can give your image a border,
72 .\" Transparent backgrounds are the default in 2018.
73 .\" force the background transparent,
74 set the image's pixel density,
75 or perform other useful transformations.
76 .
77 .
78 .PP
79 The output image is clipped using
80 .IR \%convert 's
81 .B \-trim
82 option to the smallest possible bounding box that contains all the black
83 pixels.
84 .
85 .
86 .\" ====================================================================
87 .SH OPTIONS
88 .\" ====================================================================
89 .
90 .TP
91 .BI "\-format " output-format
92 Write the image in
93 .IR output-format ,
94 which must be understood by
95 .IR \%convert ;
96 the default is PNG.
97 .
98 .
99 .TP
100 .B \-\-help
101 Display a usage message and exit.
102 .
103 .
104 .TP
105 .B \-unsafe
106 Run
107 .I groff
108 in
109 .I unsafe
110 mode, enabling the PIC command
111 .B sh
112 to execute arbitrary Unix shell commands.
113 .
114 The
115 .I groff
116 default is to forbid this.
117 .
118 .
119 .TP
120 .B \-v
121 .TQ
122 .B \-\-version
123 Display version information and exit.
124 .
125 .
126 .\" ====================================================================
127 .SH ENVIRONMENT
128 .\" ====================================================================
129 .
130 .TP
131 .I \%GROFF_TMPDIR
132 .TQ
133 .I \%TMPDIR
134 .TQ
135 .I TMP
136 .TQ
137 .I TEMP
138 These environment variables are searched in the given order to determine
139 the directory where temporary files will be created.
140 .
141 If none are set,
142 .I /tmp
143 is used.
144 .
145 .
146 .\" ====================================================================
147 .SH AUTHORS
148 .\" ====================================================================
149 .
150 .B grap2graph
151 was written by
152 .MT esr@\:thyrsus.com
153 Eric S.\& Raymond
154 .ME ,
155 based on a recipe for
156 .IR pic2graph (@MAN1EXT@),
157 by W.\& Richard Stevens.
158 .
159 .
160 .\" ====================================================================
161 .SH "SEE ALSO"
162 .\" ====================================================================
163 .
164 .IR pic2graph (@MAN1EXT@),
165 .IR eqn2graph (@MAN1EXT@),
166 .IR grap (1),
167 .IR @g@pic (@MAN1EXT@),
168 .IR groff (@MAN1EXT@),
169 .IR \%convert (1)
170 .
171 .
172 .\" Local Variables:
173 .\" mode: nroff
174 .\" End:
175 .\" vim: set filetype=groff: