1grap2graph(1) General Commands Manual grap2graph(1)
2
3
4
6 grap2graph - convert a grap diagram into a cropped image
7
9 grap2graph [-unsafe] [-format output-format] [convert-argument ...]
10
11 grap2graph --help
12
13 grap2graph -v
14 grap2graph --version
15
17 grap2graph reads a grap(1) program from the standard input and writes
18 an image file, by default in Portable Network Graphics (PNG) format, to
19 the standard output.
20
21 The input GRAP code should not be wrapped with the .G1 and .G2 macros
22 that normally guard it within groff(1) documents.
23
24 Arguments not recognized by grap2graph are passed to the ImageMagick or
25 GraphicsMagick program convert(1). By specifying these, you can give
26 your image a border, set the image's pixel density, or perform other
27 useful transformations.
28
29 The output image is clipped using convert's -trim option to the small‐
30 est possible bounding box that contains all the black pixels.
31
33 --help displays a usage message, while -v and --version show version
34 information; all exit afterward.
35
36 -format output-format
37 Write the image in output-format, which must be understood by
38 convert; the default is PNG.
39
40 -unsafe
41 Run groff in unsafe mode, enabling the PIC command sh to execute
42 arbitrary Unix shell commands. The groff default is to forbid
43 this.
44
46 GROFF_TMPDIR
47 TMPDIR
48 TMP
49 TEMP These environment variables are searched in the given order to
50 determine the directory where temporary files will be created.
51 If none are set, /tmp is used.
52
54 grap2graph was written by Eric S. Raymond ⟨esr@thyrsus.com⟩, based on a
55 recipe for pic2graph(1), by W. Richard Stevens.
56
58 pic2graph(1), eqn2graph(1), grap(1), pic(1), groff(1), convert(1)
59
60
61
62groff 1.23.0 2 November 2023 grap2graph(1)