1pic2graph(1) General Commands Manual pic2graph(1)
2
3
4
6 pic2graph - convert a pic diagram into a cropped image
7
9 pic2graph [-unsafe] [-format output-format] [-eqn delimiters] [convert-
10 argument ...]
11
12 pic2graph --help
13
14 pic2graph -v
15 pic2graph --version
16
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/.PF
24 macros 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
35 --help displays a usage message, while -v and --version show version
36 information; all exit afterward.
37
38 -eqn delimiters
39 Use delimiters as the opening and closing characters that de‐
40 limit eqn directives; the default is “$$”. The option argument
41 delimiters should be a two-character string, but an empty string
42 ("") is accepted as a directive to disable eqn processing.
43
44 -format output-format
45 Write the image in output-format, which must be understood by
46 convert; the default is PNG.
47
48 -unsafe
49 Run groff in unsafe mode, enabling the PIC command sh to execute
50 arbitrary Unix shell commands. The groff default is to forbid
51 this.
52
54 GROFF_TMPDIR
55 TMPDIR
56 TMP
57 TEMP These environment variables are searched in the given order to
58 determine the directory where temporary files will be created.
59 If none are set, /tmp is used.
60
62 pic2graph was written by Eric S. Raymond ⟨esr@thyrsus.com⟩, based on a
63 recipe by W. Richard Stevens.
64
66 W. Richard Stevens, Turning PIC into HTML ⟨http://www.kohala.com/start/
67 troff/pic2html.html⟩
68
69 eqn2graph(1), grap2graph(1), pic(1), eqn(1), groff(1), convert(1)
70
71
72
73groff 1.23.0 2 November 2023 pic2graph(1)