8d56768fbd2743a852dbf08bc7fda145e9e9e33e
[platform/upstream/groff.git] / contrib / eqn2graph / eqn2graph.man
1 .TH EQN2GRAPH @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
2 .SH NAME
3 eqn2graph \- convert an EQN equation into a cropped image
4 .
5 .
6 .\" This documentation is released to the public domain.
7 .
8 .
9 .\" Like TP, but if specified indent is more than half
10 .\" the current line-length - indent, use the default indent.
11 .de Tp
12 .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
13 .el .TP "\\$1"
14 ..
15 .
16 .\" --------------------------------------------------------------------
17 .SH SYNOPSIS
18 .\" --------------------------------------------------------------------
19 .
20 .B eqn2graph
21 [
22 .B \-unsafe
23 ]
24 [
25 .BI \-format\  fmt
26 ]
27 .
28 .
29 .\" --------------------------------------------------------------------
30 .SH DESCRIPTION
31 .\" --------------------------------------------------------------------
32 .
33 Reads an EQN equation (one line) as input; produces an image
34 file (by default in Portable Network Graphics format) suitable for the
35 Web as output.
36 .
37 .
38 .P
39 Your input EQN code should
40 .I not
41 have the \&.EQ/.EN preamble that normally precedes it within
42 .BR groff (@MAN1EXT@)
43 macros; nor do you need to have dollar-sign or other delimiters
44 around the equation.
45 .
46 .
47 .P
48 The output image will be clipped to the smallest possible bounding box
49 that contains all the black pixels.
50 .
51 Older versions of
52 .BR convert (1)
53 will produce a black-on-white graphic; newer ones may produce a
54 black-on-transparent graphic.
55 .
56 By specifying command-line options to be passed to
57 .BR convert (1)
58 you can give it a border, force the background transparent, set the
59 image's pixel density, or perform other useful transformations.
60 .
61 .
62 .P
63 This program uses
64 .BR @g@eqn (@MAN1EXT@),
65 .BR groff (@MAN1EXT@),
66 and the ImageMagick
67 .BR convert (1)
68 program.
69 .
70 These programs must be installed on your system and accessible on your
71 $PATH for
72 .B eqn2graph
73 to work.
74 .
75 .
76 .\" --------------------------------------------------------------------
77 .SH OPTIONS
78 .\" --------------------------------------------------------------------
79 .
80 .TP
81 .B \-unsafe
82 Run
83 .BR groff (@MAN1EXT@)
84 in the `unsafe' mode enabling the PIC macro
85 .B sh
86 to execute arbitrary commands.
87 .
88 The default is to forbid this.
89 .
90 .TP
91 .BI \-format\  fmt
92 Specify an output format; the default is PNG (Portable Network Graphics).
93 .
94 Any format that
95 .BR convert (1)
96 can emit is supported.
97 .
98 .
99 .PP
100 Command-line switches and arguments not listed above are passed to
101 .BR convert (1).
102 .
103 .
104 .\" --------------------------------------------------------------------
105 .SH FILES
106 .\" --------------------------------------------------------------------
107 .
108 .Tp \w'\fB@MACRODIR@/eqnrc'u+2n
109 .B @MACRODIR@/eqnrc
110 The
111 .BR @g@eqn (@MAN1EXT@)
112 initialization file.
113 .
114 .
115 .\" --------------------------------------------------------------------
116 .SH ENVIRONMENT
117 .\" --------------------------------------------------------------------
118 .
119 .TP
120 .B GROFF_TMPDIR
121 The directory in which temporary files will be created.
122 .
123 If this is not set
124 .B eqn2graph
125 searches the environment variables
126 .BR \%TMPDIR ,
127 .BR TMP ,
128 and
129 .B TEMP
130 (in that order).
131 .
132 Otherwise, temporary files will be created in
133 .BR /tmp .
134 .
135 .
136 .\" --------------------------------------------------------------------
137 .SH BUGS
138 .\" --------------------------------------------------------------------
139 .
140 Due to changes in the behavior of ImageMagick
141 .BR convert (1)
142 that are both forward and backward-incompatible,
143 mismatches between your
144 .B eqn2graph
145 and
146 .BR convert (1)
147 versions may produce zero-sized or untrimmed output images.
148 .
149 For this version of
150 .B eqn2graph
151 you will need a version of
152 .BR convert (1)
153 that supports the
154 .B \-trim
155 option; older versions of
156 .B eqn2graph
157 used
158 .BR \-crop\~0x0 ,
159 which no longer has trimming behavior.
160 .
161 .
162 .\" --------------------------------------------------------------------
163 .ad l
164 .SH "SEE ALSO"
165 .\" --------------------------------------------------------------------
166 .
167 .BR pic2graph (@MAN1EXT@),
168 .BR grap2graph (@MAN1EXT@),
169 .BR @g@eqn (@MAN1EXT@),
170 .BR groff (@MAN1EXT@),
171 .BR gs (1),
172 .BR convert (1).
173 .
174 .
175 .SH AUTHORS
176 Eric S.\& Raymond <esr@thyrsus.com>.
177 .
178 This documentation is released to the public domain.
179 .
180 .
181 .\" Local Variables:
182 .\" mode: nroff
183 .\" End: