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