1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
.TH EQN2GRAPH 1 "7 February 2022" "groff 1.22.4"
.SH NAME
eqn2graph \- convert an EQN equation into a cropped image
.
.
.\" ====================================================================
.\" Legal Terms
.\" ====================================================================
.\"
.\" This documentation is released to the public domain.
.
.
.\" ====================================================================
.SH SYNOPSIS
.\" ====================================================================
.
.SY eqn2graph
.OP \-format output-format
.RI [ convert-arguments ]
.YS
.
.SY eqn2graph
.B \-\-help
.YS
.
.SY eqn2graph
.B \-v
.SY eqn2graph
.B \-\-version
.YS
.
.
.\" ====================================================================
.SH DESCRIPTION
.\" ====================================================================
.
.I eqn2graph
reads a one-line
.IR eqn (1)
equation from the standard input and writes an image file,
by default in Portable Network Graphics (PNG) format,
to the standard output.
.
.
.PP
The input EQN code should
.I not
be preceded by the
.B \&.EQ
macro that normally precedes it within
.IR groff (1)
macros;
nor do you need to have dollar-sign or other delimiters around the
equation.
.
.
.\" FIXME: How old? This text hasn't been touched since 2008 at latest.
.\" Older versions of
.\" .I \%convert
.\" will produce a black-on-white graphic; newer ones may produce a
.\" black-on-transparent graphic.
.
.PP
Arguments not recognized by
.I eqn2graph
are passed to the ImageMagick or GraphicsMagick program
.IR \%convert (1).
.
.
By specifying these, you can give your image a border,
.\" Transparent backgrounds are the default in 2018.
.\" force the background transparent,
set the image's pixel density,
or perform other useful transformations.
.
.
.PP
The output image is clipped using
.IR \%convert 's
.B \-trim
option to the smallest possible bounding box that contains all the black
pixels.
.
.
.\" ====================================================================
.SH OPTIONS
.\" ====================================================================
.
.TP
.BI "\-format " output-format
Write the image in
.IR output-format ,
which must be understood by
.IR \%convert ;
the default is PNG.
.
.
.TP
.B \-\-help
Display a usage message and exit.
.
.
.TP
.B \-v
.TQ
.B \-\-version
Display version information and exit.
.
.
.\" ====================================================================
.SH ENVIRONMENT
.\" ====================================================================
.
.TP
.I \%GROFF_TMPDIR
.TQ
.I \%TMPDIR
.TQ
.I TMP
.TQ
.I TEMP
These environment variables are searched in the given order to determine
the directory where temporary files will be created.
.
If none are set,
.I /tmp
is used.
.
.
.\" ====================================================================
.SH AUTHORS
.\" ====================================================================
.
.I eqn2graph
was written by
.MT esr@\:thyrsus.com
Eric S.\& Raymond
.ME ,
based on a recipe for
.IR pic2graph (1),
by W.\& Richard Stevens.
.
.
.\" ====================================================================
.SH "SEE ALSO"
.\" ====================================================================
.
.IR pic2graph (1),
.IR grap2graph (1),
.IR eqn (1),
.IR groff (1),
.IR \%convert (1)
.
.
.\" Local Variables:
.\" mode: nroff
.\" End:
.\" vim: set filetype=groff:
|