1GRAP2GRAPH(1) General Commands Manual GRAP2GRAPH(1)
2
3
4
6 grap2graph - convert a grap diagram into a cropped bitmap image
7
9 grap2graph [ -unsafe ] [ -resolution M|MxN ] [ -format fmt ]
10
12 Reads a grap program as input; produces an image file (by default in
13 Portable Network Graphics format) suitable for the Web as output. For
14 a description of the grap language, see grap(1).
15
16 Your graph specification should not be wrapped with the .G1 and .G2
17 macros that normally guard it within groff(1) macros.
18
19 The output image will be a black-on-white graphic clipped to the small‐
20 est possible bounding box that contains all the black pixels. By spec‐
21 ifying command-line options to be passed to convert(1) you can give it
22 a border, set the background transparent, set the image's pixel den‐
23 sity, or perform other useful transformations.
24
25 This program uses grap(1), pic(1), groff(1), and the ImageMagick con‐
26 vert(1) program. These programs must be installed on your system and
27 accessible on your $PATH for grap2graph to work.
28
30 -unsafe
31 Run pic(1) and groff(1) in the `unsafe' mode enabling the PIC
32 macro sh to execute arbitrary commands. The default is to for‐
33 bid this.
34
35 -format fmt
36 Specify an output format; the default is PNG (Portable Network
37 Graphics). Any format that convert(1) can emit is supported.
38
39 Command-line switches and arguments not listed above are passed to con‐
40 vert(1).
41
43 GROFF_TMPDIR
44 The directory in which temporary files will be created. If this
45 is not set grap2graph searches the environment variables TMPDIR,
46 TMP, and TEMP (in that order). Otherwise, temporary files will
47 be created in /tmp.
48
50 pic2graph(1), eqn2graph(1), pic(1), groff(1), gs(1), convert(1).
51
53 This documentation is released to the public domain.
54
56 This document was written by Eric S. Raymond ⟨esr@thyrsus.com⟩.
57
58
59
60Groff Version 1.22.3 4 November 2014 GRAP2GRAPH(1)