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