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 output-format] [-eqn delimiters] [convert-
10                 arguments]
11
12       pic2graph --help
13
14       pic2graph -v
15       pic2graph --version
16

DESCRIPTION

18       pic2graph reads a pic(1) program from the standard input and writes  an
19       image  file,  by  default in Portable Network Graphics (PNG) format, to
20       the standard output.  It furthermore translates eqn(1)  constructs,  so
21       it can be used for generating images of mathematical formulae.
22
23       The  input  PIC  code should not be wrapped with the .PS and .PE macros
24       that normally guard it within groff(1) documents.
25
26       Arguments not recognized by pic2graph are passed to the ImageMagick  or
27       GraphicsMagick  program  convert(1).  By specifying these, you can give
28       your image a border, set the image's pixel density,  or  perform  other
29       useful transformations.
30
31       The  output image is clipped using convert's -trim option to the small‐
32       est possible bounding box that contains all the black pixels.
33

OPTIONS

35       -eqn delimiters
36              Use delimiters as the opening and closing  characters  that  de‐
37              limit  eqn directives; the default is “$$”.  The option argument
38              delimiters should be a two-character string, but an empty string
39              ("") is accepted as a directive to disable eqn processing.
40
41       -format output-format
42              Write  the  image  in output-format, which must be understood by
43              convert; the default is PNG.
44
45       --help Display a usage message and exit.
46
47       -unsafe
48              Run groff in unsafe mode, enabling the PIC command sh to execute
49              arbitrary  Unix  shell commands.  The groff default is to forbid
50              this.
51
52       -v
53       --version
54              Display version information and exit.
55

ENVIRONMENT

57       GROFF_TMPDIR
58       TMPDIR
59       TMP
60       TEMP   These environment variables are searched in the given  order  to
61              determine  the  directory where temporary files will be created.
62              If none are set, /tmp is used.
63

AUTHORS

65       pic2graph was written by Eric S. Raymond ⟨esr@thyrsus.com⟩, based on  a
66       recipe by W. Richard Stevens.
67

SEE ALSO

69       W. Richard Stevens, Turning PIC into HTMLhttp://www.kohala.com/start/
70       troff/pic2html.html⟩
71
72       eqn2graph(1), grap2graph(1), pic(1), eqn(1), groff(1), convert(1)
73
74
75
76groff 1.22.4                     17 March 2021                    PIC2GRAPH(1)
Impressum