| Commit | Line | Data |
|---|---|---|
| 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 | |
| 16 | eqn2graph \- 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 | |
| 30 | Reads an EQN equation (one line) as input; produces an image | |
| 31 | file (by default in Portable Network Graphics format) suitable for the | |
| 32 | Web as output. | |
| 33 | .P | |
| 4d3e9548 JL |
34 | Your input EQN code should |
| 35 | .I not | |
| 36 | have the \&.EQ/.EN preamble that | |
| 92d0a6a6 JR |
37 | that normally precedes it within |
| 38 | .BR groff (@MAN1EXT@) | |
| 39 | macros; nor do you need to have dollar-sign or other delimiters | |
| 40 | around the equation. | |
| 41 | .P | |
| 4d3e9548 JL |
42 | The output image will be clipped to the smallest possible bounding box |
| 43 | that contains all the black pixels. | |
| 44 | Older versions of | |
| 45 | .BR convert (1) | |
| 46 | will produce a black-on-white graphic; newer ones may produce a | |
| 47 | black-on-transparent graphic. | |
| 92d0a6a6 JR |
48 | By specifying command-line options to be passed to |
| 49 | .BR convert (1) | |
| 4d3e9548 | 50 | you can give it a border, force the background transparent, set the |
| 92d0a6a6 JR |
51 | image's pixel density, or perform other useful transformations. |
| 52 | .P | |
| 53 | This program uses | |
| 54 | .BR @g@eqn (@MAN1EXT@), | |
| 55 | .BR groff (@MAN1EXT@), | |
| 56 | and the ImageMagick | |
| 57 | .BR convert (1) | |
| 58 | program. | |
| 59 | These programs must be installed on your system and accessible on your | |
| 4d3e9548 JL |
60 | $PATH for |
| 61 | .B eqn2graph | |
| 62 | to work. | |
| 92d0a6a6 JR |
63 | . |
| 64 | . | |
| 65 | .SH OPTIONS | |
| 66 | .TP | |
| 67 | .B \-unsafe | |
| 68 | Run | |
| 69 | .BR groff (@MAN1EXT@) | |
| 70 | in the `unsafe' mode enabling the PIC macro | |
| 71 | .B sh | |
| 72 | to execute arbitrary commands. | |
| 73 | The default is to forbid this. | |
| 74 | .TP | |
| 75 | .BI \-format\ fmt | |
| 76 | Specify an output format; the default is PNG (Portable Network Graphics). | |
| 77 | Any format that | |
| 78 | .BR convert (1) | |
| 79 | can emit is supported. | |
| 80 | .PP | |
| 81 | Command-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 | |
| 88 | The | |
| 89 | .BR @g@eqn (@MAN1EXT@) | |
| 90 | initialization file. | |
| 91 | . | |
| 92 | . | |
| 93 | .SH ENVIRONMENT | |
| 94 | .TP | |
| 95 | .B GROFF_TMPDIR | |
| 96 | The directory in which temporary files will be created. | |
| 97 | If this is not set | |
| 98 | .B eqn2graph | |
| 99 | searches the environment variables | |
| 100 | .BR \%TMPDIR , | |
| 101 | .BR TMP , | |
| 102 | and | |
| 103 | .B TEMP | |
| 104 | (in that order). | |
| 105 | Otherwise, temporary files will be created in | |
| 106 | .BR /tmp . | |
| 107 | . | |
| 108 | . | |
| 4d3e9548 JL |
109 | .SH BUGS |
| 110 | Due to changes in the behavior of ImageMagick | |
| 111 | .BR convert (1) | |
| 112 | that are both forward and backward-incompatible, | |
| 113 | mismatches between your | |
| 114 | .B eqn2graph | |
| 115 | and | |
| 116 | .BR convert (1) | |
| 117 | versions may produce zero-sized or untrimmed output images. | |
| 118 | For this version of | |
| 119 | .B eqn2graph | |
| 120 | you will need a version of | |
| 121 | .BR convert (1) | |
| 122 | that supports the | |
| 123 | .B \-trim | |
| 124 | option; older versions of | |
| 125 | .B eqn2graph | |
| 126 | used | |
| 127 | .BR \-crop\~0x0 , | |
| 128 | which 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 | |
| 141 | Eric S. Raymond <esr@thyrsus.com>. | |
| 142 | . | |
| 143 | .\" Local Variables: | |
| 144 | .\" mode: nroff | |
| 145 | .\" End: |