1PIC2GRAPH(1)                General Commands Manual               PIC2GRAPH(1)
2
3
4

NAME

6       pic2graph - convert a PIC diagram into a cropped image
7

SYNOPSIS

9       pic2graph [ -unsafe ] [ -format fmt ] [ -eqn delim ]
10

DESCRIPTION

12       Reads  a  PIC  program  as input; produces an image file (by default in
13       Portable Network Graphics format) suitable for the Web as output.  Also
14       translates  eqn(1)  constructs, so it can be used for generating images
15       of mathematical formulae.
16
17       PIC is a rather expressive graphics minilanguage suitable for producing
18       box-and-arrow  diagrams of the kind frequently used in technical papers
19       and textbooks.  The language is sufficiently flexible to be quite  use‐
20       ful  for  state charts, Petri-net diagrams, flow charts, simple circuit
21       schematics, jumper layouts, and other kinds of  illustration  involving
22       repetitive  uses  of  simple  geometric forms and splines.  Because PIC
23       descriptions are procedural and object-based, they are both compact and
24       easy to modify.
25
26       The PIC language is fully documented in Making Pictures With GNU PIC, a
27       document which is part of the groff(1) distribution.
28
29       Your input PIC code should not be wrapped with the .PS and  .PE  macros
30       that normally guard it within groff(1) macros.
31
32       The  output image will be clipped to the smallest possible bounding box
33       that contains all the black pixels.  Older versions of convert(1)  will
34       produce  a  black-on-white  graphic; newer ones may produce a black-on-
35       transparent graphic.  By specifying command-line options to  be  passed
36       to  convert(1) you can give it a border, force the background transpar‐
37       ent, set the image's pixel density, or perform other useful transforma‐
38       tions.
39
40       This  program uses pic(1), eqn(1), groff(1), gs(1), and the ImageMagick
41       convert(1) program.  These programs must be installed  on  your  system
42       and accessible on your $PATH for pic2graph to work.
43

OPTIONS

45       -unsafe
46              Run  pic(1)  and  groff(1) in the `unsafe' mode enabling the PIC
47              macro sh to execute arbitrary commands.  The default is to  for‐
48              bid this.
49
50       -format fmt
51              Specify  an  output format; the default is PNG (Portable Network
52              Graphics).  Any format that convert(1) can emit is supported.
53
54       -eqn delim
55              Change the fencepost characters that delimit  eqn(1)  directives
56              ($ and $, by default).  This option requires an argument, but an
57              empty string is accepted as a directive to disable  eqn(1)  pro‐
58              cessing.
59
60       Command-line  switches  and  arguments  not  listed above are passed to
61       convert(1).
62

FILES

64       /usr/share/groff/1.20.1/tmac/eqnrc  The eqn(1) initialization file.
65

ENVIRONMENT

67       GROFF_TMPDIR
68              The directory in which temporary files will be created.  If this
69              is  not set pic2graph searches the environment variables TMPDIR,
70              TMP, and TEMP (in that order).  Otherwise, temporary files  will
71              be created in /tmp.
72

BUGS

74       Due  to changes in the behavior of ImageMagick convert(1) that are both
75       forward and backward-incompatible, mismatches  between  your  pic2graph
76       and  convert(1)  versions  may  produce  zero-sized or untrimmed output
77       images.  For this version of pic2graph  you  will  need  a  version  of
78       convert(1)  that supports the -trim option; older versions of pic2graph
79       used -crop 0x0, which no longer has trimming behavior.
80

SEE ALSO

82       eqn2graph(1),   grap2graph(1),   pic(1),   eqn(1),   groff(1),   gs(1),
83       convert(1).
84

AUTHOR

86       Eric  S.  Raymond  <esr@thyrsus.com>,  based  on a recipe by W. Richard
87       Stevens.
88
89
90
91Groff Version 1.20.1            9 January 2009                    PIC2GRAPH(1)
Impressum