Debian Codegraph @

upstream/debian-unstable/man1/pic2graph.1

raw
1 .TH pic2graph 1 "2026-04-22" "groff 1.24.1"
2 .SH Name
3 pic2graph \- convert a
4 .I pic
5 diagram into a cropped image
6 .
7 .
8 .\" ====================================================================
9 .\" Legal Terms
10 .\" ====================================================================
11 .\"
12 .\" This documentation is released to the public domain.
13 .
14 .
15 .\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
16 .do nr *groff_pic2graph_1_man_C \n[.cp]
17 .cp 0
18 .
19 .\" Define fallback for groff 1.23's MR macro if the system lacks it.
20 .nr do-fallback 0
21 .if !\n(.f .nr do-fallback 1 \" mandoc
22 .if \n(.g .if !d MR .nr do-fallback 1 \" older groff
23 .if !\n(.g .nr do-fallback 1 \" non-groff *roff
24 .if \n[do-fallback] \{\
25 . de MR
26 . ie \\n(.$=1 \
27 . I \%\\$1
28 . el \
29 . IR \%\\$1 (\\$2)\\$3
30 . .
31 .\}
32 .rr do-fallback
33 .
34 .
35 .\" ====================================================================
36 .SH Synopsis
37 .\" ====================================================================
38 .
39 .SY pic2graph
40 .RB [ \-unsafe ]
41 .RB [ \-format\~\c
42 .IR output-format ]
43 .RB [ \-eqn\~\c
44 .IR delimiters ]
45 .RI [ convert-argument \~.\|.\|.]
46 .YS
47 .
48 .
49 .P
50 .SY pic2graph
51 .B \-\-help
52 .YS
53 .
54 .
55 .P
56 .SY pic2graph
57 .B \-v
58 .YS
59 .
60 .SY pic2graph
61 .B \%\-\-version
62 .YS
63 .
64 .
65 .\" ====================================================================
66 .SH Description
67 .\" ====================================================================
68 .
69 .I pic2graph
70 reads a
71 .MR \%pic 1
72 program from the standard input and writes an image file,
73 by default in Portable Network Graphics (PNG) format,
74 to the standard output.
75 .
76 It furthermore translates
77 .MR \%eqn 1
78 constructs,
79 so it can be used to generate images of mathematical formulae.
80 .
81 .
82 .PP
83 The input PIC code should
84 .I not
85 be wrapped with the
86 .B .PS
87 and
88 .BR .PE / .PF / .PY
89 macros that normally guard it within
90 .MR groff 1
91 documents.
92 .
93 .
94 .\" FIXME: How old? This text hasn't been touched since 2008 at latest.
95 .\" Older versions of
96 .\" .I \%convert
97 .\" will produce a black-on-white graphic; newer ones may produce a
98 .\" black-on-transparent graphic.
99 .
100 .PP
101 Arguments not recognized by
102 .I pic2graph
103 are passed to the ImageMagick or GraphicsMagick program
104 .MR convert 1 .
105 .
106 .
107 By specifying these, you can give your image a border,
108 .\" Transparent backgrounds are the default in 2018.
109 .\" force the background transparent,
110 set the image's pixel density,
111 or perform other useful transformations.
112 .
113 .
114 .PP
115 The output image is clipped using
116 .IR \%convert 's
117 .B \-trim
118 option to the smallest possible bounding box that contains all the black
119 pixels.
120 .
121 .
122 .\" ====================================================================
123 .SH Options
124 .\" ====================================================================
125 .
126 .B \-\-help
127 displays a usage message,
128 while
129 .B \-v
130 and
131 .B \%\-\-version
132 show version information;
133 all exit afterward.
134 .
135 .TP
136 .BI \-eqn\~ delimiters
137 Use
138 .I delimiters
139 as the opening and closing
140 characters that delimit
141 .I \%eqn
142 directives;
143 the default is \(lq$$\(rq.
144 .
145 The option argument
146 .I delimiters
147 should be a two-character string,
148 but an empty string (\(dq\(dq) is accepted as a directive to disable
149 .I \%eqn
150 processing.
151 .
152 .
153 .TP
154 .BI \-format\~ output-format
155 Write the image in
156 .IR output-format ,
157 which must be understood by
158 .IR \%convert ;
159 the default is PNG.
160 .
161 .
162 .TP
163 .B \-unsafe
164 Run
165 .I groff
166 in
167 .I unsafe
168 mode, enabling the PIC command
169 .B sh
170 to execute arbitrary Unix shell commands.
171 .
172 The
173 .I groff
174 default is to forbid this.
175 .
176 .
177 .\" ====================================================================
178 .SH Environment
179 .\" ====================================================================
180 .
181 .TP
182 .I \%GROFF_TMPDIR
183 .TQ
184 .I \%TMPDIR
185 .TQ
186 .I TMP
187 .TQ
188 .I TEMP
189 These environment variables are searched in the order shown to determine
190 the directory where temporary files will be created.
191 .
192 If none are set,
193 .I /tmp
194 is used.
195 .
196 .
197 .\" ====================================================================
198 .SH Authors
199 .\" ====================================================================
200 .
201 .I pic2graph
202 was written by
203 .MT esr@\:thyrsus\:.com
204 Eric S.\& Raymond
205 .ME ,
206 based on a recipe by W.\& Richard Stevens.
207 .
208 .
209 .\" ====================================================================
210 .SH "See also"
211 .\" ====================================================================
212 .
213 W.\& Richard Stevens,
214 .UR http://\:www\:.kohala\:.com/\:start/\:troff/\:pic2html\:.html
215 .I Turning PIC into HTML
216 .UE
217 .
218 .
219 .PP
220 .MR eqn2graph 1 ,
221 .MR grap2graph 1 ,
222 .MR \%pic 1 ,
223 .MR \%eqn 1 ,
224 .MR groff 1 ,
225 .MR convert 1
226 .
227 .
228 .\" Restore compatibility mode (for, e.g., Solaris 10/11).
229 .cp \n[*groff_pic2graph_1_man_C]
230 .do rr *groff_pic2graph_1_man_C
231 .
232 .
233 .\" Local Variables:
234 .\" fill-column: 72
235 .\" mode: nroff
236 .\" End:
237 .\" vim: set filetype=groff textwidth=72: