groff: update vendor branch to v1.20.1
[dragonfly.git] / contrib / groff / contrib / pic2graph / pic2graph.man
CommitLineData
4d3e9548 1.\" $Id: pic2graph.man,v 1.7 2008/09/29 21:55:15 wl Exp $
92d0a6a6
JR
2.\" This documentation is released to the public domain.
3.TH PIC2GRAPH @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
4.IX pic2graph
5.SH NAME
6pic2graph \- convert a PIC diagram into a cropped image
7.
8.
9.SH SYNOPSIS
10.B pic2graph
11[
12.B \-unsafe
13]
14[
15.BI \-format\ fmt
16]
17[
18.BI \-eqn\ delim
19]
20.
21.
22.SH DESCRIPTION
23Reads a PIC program as input; produces an image file (by default in
24Portable Network Graphics format) suitable for the Web as output.
25Also translates
26.BR @g@eqn (@MAN1EXT@)
27constructs, so it can be used for generating images of mathematical
28formulae.
29.P
30PIC is a rather expressive graphics minilanguage suitable for
31producing box-and-arrow diagrams of the kind frequently used in
4d3e9548
JL
32technical papers and textbooks.
33The language is sufficiently flexible to be quite useful for state
34charts, Petri-net diagrams, flow charts, simple circuit schematics,
35jumper layouts, and other kinds of illustration involving repetitive
36uses of simple geometric forms and splines.
37Because PIC descriptions are procedural and object-based, they are
38both compact and easy to modify.
92d0a6a6 39.P
4d3e9548
JL
40The PIC language is fully documented in
41.IR "Making Pictures With GNU PIC" ,
42a document which is part of the
92d0a6a6
JR
43.BR groff (@MAN1EXT@)
44distribution.
45.P
4d3e9548
JL
46Your input PIC code should
47.I not
48be wrapped with the \&.PS and \&.PE macros that normally guard it within
92d0a6a6
JR
49.BR groff (@MAN1EXT@)
50macros.
51.P
4d3e9548
JL
52The output image will be clipped to the smallest possible bounding box
53that contains all the black pixels.
54Older versions of
55.BR \%convert (1)
56will produce a black-on-white graphic; newer ones may produce a
57black-on-transparent graphic.
92d0a6a6 58By specifying command-line options to be passed to
4d3e9548
JL
59.BR \%convert (1)
60you can give it a border, force the background transparent, set the
92d0a6a6
JR
61image's pixel density, or perform other useful transformations.
62.P
63This program uses
64.BR @g@pic (@MAN1EXT@),
65.BR @g@eqn (@MAN1EXT@),
66.BR groff (@MAN1EXT@),
67.BR gs (1),
68and the ImageMagick
4d3e9548 69.BR \%convert (1)
92d0a6a6
JR
70program.
71These programs must be installed on your system and accessible on your
4d3e9548
JL
72$PATH for
73.B pic2graph
74to work.
92d0a6a6
JR
75.
76.
77.SH OPTIONS
78.TP
79.B \-unsafe
80Run
81.BR @g@pic (@MAN1EXT@)
82and
83.BR groff (@MAN1EXT@)
84in the `unsafe' mode enabling the PIC macro
85.B sh
4d3e9548
JL
86to execute arbitrary commands.
87The default is to forbid this.
92d0a6a6
JR
88.TP
89.BI \-format\ fmt
90Specify an output format; the default is PNG (Portable Network Graphics).
91Any format that
4d3e9548 92.BR \%convert (1)
92d0a6a6
JR
93can emit is supported.
94.TP
95.BI \-eqn\ delim
96Change the fencepost characters that delimit
97.BR @g@eqn (@MAN1EXT@)
98directives
99.RB ( $
100and
101.BR $ ,
4d3e9548
JL
102by default).
103This option requires an argument, but an empty string is
92d0a6a6
JR
104accepted as a directive to disable
105.BR @g@eqn (@MAN1EXT@)
106processing.
107.PP
108Command-line switches and arguments not listed above are passed to
4d3e9548 109.BR \%convert (1).
92d0a6a6
JR
110.
111.
112.SH FILES
113.TP \w'\fB@MACRODIR@/eqnrc'u+2n
114.B @MACRODIR@/eqnrc
115The
116.BR @g@eqn (@MAN1EXT@)
117initialization file.
118.
119.
120.SH ENVIRONMENT
121.TP
122.B GROFF_TMPDIR
123The directory in which temporary files will be created.
124If this is not set
125.B pic2graph
126searches the environment variables
127.BR \%TMPDIR ,
128.BR TMP ,
129and
130.B TEMP
131(in that order).
132Otherwise, temporary files will be created in
133.BR /tmp .
134.
135.
4d3e9548
JL
136.SH BUGS
137Due to changes in the behavior of ImageMagick
138.BR \%convert (1)
139that are both forward and backward-incompatible,
140mismatches between your
141.B pic2graph
142and
143.BR \%convert (1)
144versions may produce zero-sized or untrimmed output images.
145For this version of
146.B pic2graph
147you will need a version of
148.BR \%convert (1)
149that supports the
150.B \-trim
151option; older versions of
152.B pic2graph
153used
154.BR \-crop\~0x0 ,
155which no longer has trimming behavior.
156.
157.
92d0a6a6
JR
158.SH "SEE ALSO"
159.BR eqn2graph (@MAN1EXT@),
160.BR grap2graph (@MAN1EXT@),
161.BR @g@pic (@MAN1EXT@),
162.BR @g@eqn (@MAN1EXT@),
163.BR groff (@MAN1EXT@),
164.BR gs (1),
4d3e9548 165.BR \%convert (1).
92d0a6a6
JR
166.
167.
168.SH AUTHOR
169Eric S. Raymond <esr@thyrsus.com>, based on a recipe by W. Richard Stevens.
170.
171.\" Local Variables:
172.\" mode: nroff
173.\" End: