diff options
author | esr <esr> | 2008-09-29 00:53:28 +0000 |
---|---|---|
committer | esr <esr> | 2008-09-29 00:53:28 +0000 |
commit | 56a1d6d3e97096e1fafe647de2eb3ffe6b3e2076 (patch) | |
tree | 326688b872c13059e9c2b57f9cb9c264f2d827ca /contrib | |
parent | 43452c55e98ea289e037792499a053a1ac5a64c2 (diff) | |
download | groff-56a1d6d3e97096e1fafe647de2eb3ffe6b3e2076.tar.gz |
Cope withnsaty convert(1) changes.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/eqn2graph/eqn2graph.man | 29 | ||||
-rw-r--r-- | contrib/eqn2graph/eqn2graph.sh | 4 | ||||
-rw-r--r-- | contrib/pic2graph/pic2graph.man | 29 | ||||
-rw-r--r-- | contrib/pic2graph/pic2graph.sh | 4 |
4 files changed, 54 insertions, 12 deletions
diff --git a/contrib/eqn2graph/eqn2graph.man b/contrib/eqn2graph/eqn2graph.man index 3f34cc5e..426c8a32 100644 --- a/contrib/eqn2graph/eqn2graph.man +++ b/contrib/eqn2graph/eqn2graph.man @@ -1,4 +1,4 @@ -.\" $Id: eqn2graph.man,v 1.4 2003/10/28 07:46:23 wlemb Exp $ +.\" $Id: eqn2graph.man,v 1.5 2008/09/29 00:53:29 esr Exp $ .\" This documentation is released to the public domain. . . @@ -37,11 +37,14 @@ that normally precedes it within macros; nor do you need to have dollar-sign or other delimiters around the equation. .P -The output image will be a black-on-white graphic clipped to the -smallest possible bounding box that contains all the black pixels. +The output image will be clipped to the smallest possible bounding box +that contains all the black pixels. Older versions of +.BR convert (1) +will produce a black-on-white graphic; newer ones may produce a +black-on-transparent graphic. By specifying command-line options to be passed to .BR convert (1) -you can give it a border, set the background transparent, set the +you can give it a border, force the background transparent, set the image's pixel density, or perform other useful transformations. .P This program uses @@ -98,6 +101,24 @@ Otherwise, temporary files will be created in .BR /tmp . . . +.SH BUGS +Due to changes in the behavior of ImageMagick +.BR convert (1) +that are both forward and backward-incompatible, +mismatches between your +.B eqn2graph +and +.BR convert (1) +versions may produce zero-sized or untrimmed output images. +For this version of +.B eqn2graph +you will need a version of +.BR convert (1) +that supports the \fB-trim\fR option; older versions of +.B eqn2graph +used \fB-crop 0x0\fR, which no longer has trimming behavior. +. +. .SH "SEE ALSO" .BR pic2graph (@MAN1EXT@), .BR grap2graph (@MAN1EXT@), diff --git a/contrib/eqn2graph/eqn2graph.sh b/contrib/eqn2graph/eqn2graph.sh index 98713a85..69196831 100644 --- a/contrib/eqn2graph/eqn2graph.sh +++ b/contrib/eqn2graph/eqn2graph.sh @@ -32,7 +32,7 @@ # # Thus, we pass -U to groff(1), and everything else to convert(1). # -# $Id: eqn2graph.sh,v 1.5 2005/05/18 07:03:06 wl Exp $ +# $Id: eqn2graph.sh,v 1.6 2008/09/29 00:53:29 esr Exp $ # groff_opts="" convert_opts="" @@ -85,7 +85,7 @@ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15 read equation (echo ".EQ"; echo 'delim $$'; echo ".EN"; echo '$'"$equation"'$') | \ groff -e $groff_opts -Tps -P-pletter > $tmp/eqn2graph.ps \ - && convert -trim -crop 0x0 $convert_opts $tmp/eqn2graph.ps $tmp/eqn2graph.$format \ + && convert -trim $convert_opts $tmp/eqn2graph.ps $tmp/eqn2graph.$format \ && cat $tmp/eqn2graph.$format # End diff --git a/contrib/pic2graph/pic2graph.man b/contrib/pic2graph/pic2graph.man index 36008cba..4d7e83f9 100644 --- a/contrib/pic2graph/pic2graph.man +++ b/contrib/pic2graph/pic2graph.man @@ -1,4 +1,4 @@ -.\" $Id: pic2graph.man,v 1.5 2003/10/28 07:46:24 wlemb Exp $ +.\" $Id: pic2graph.man,v 1.6 2008/09/29 00:53:29 esr Exp $ .\" This documentation is released to the public domain. .TH PIC2GRAPH @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" .IX pic2graph @@ -46,11 +46,14 @@ that normally guard it within .BR groff (@MAN1EXT@) macros. .P -The output image will be a black-on-white graphic clipped to the -smallest possible bounding box that contains all the black pixels. +The output image will be clipped to the smallest possible bounding box +that contains all the black pixels. Older versions of +.BR convert (1) +will produce a black-on-white graphic; newer ones may produce a +black-on-transparent graphic. By specifying command-line options to be passed to .BR convert (1) -you can give it a border, set the background transparent, set the +you can give it a border, force the background transparent, set the image's pixel density, or perform other useful transformations. .P This program uses @@ -122,6 +125,24 @@ Otherwise, temporary files will be created in .BR /tmp . . . +.SH BUGS +Due to changes in the behavior of ImageMagick +.BR convert (1) +that are both forward and backward-incompatible, +mismatches between your +.B pic2graph +and +.BR convert (1) +versions may produce zero-sized or untrimmed output images. +For this version of +.B pic2graph +you will need a version of +.BR convert (1) +that supports the \fB-trim\fR option; older versions of +.B pic2graph +used \fB-crop 0x0\fR, which no longer has trimming behavior. +. +. .SH "SEE ALSO" .BR eqn2graph (@MAN1EXT@), .BR grap2graph (@MAN1EXT@), diff --git a/contrib/pic2graph/pic2graph.sh b/contrib/pic2graph/pic2graph.sh index 5a066cef..9d4854ff 100644 --- a/contrib/pic2graph/pic2graph.sh +++ b/contrib/pic2graph/pic2graph.sh @@ -32,7 +32,7 @@ # We don't have complete option coverage on eqn because this is primarily # intended as a pic translator; we can live with eqn defaults. # -# $Id: pic2graph.sh,v 1.7 2005/05/18 07:03:07 wl Exp $ +# $Id: pic2graph.sh,v 1.8 2008/09/29 00:53:29 esr Exp $ # groffpic_opts="" gs_opts="" @@ -95,7 +95,7 @@ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15 # 4. Use convert(1) to crop the PostScript and turn it into a bitmap. (echo ".EQ"; echo $eqndelim; echo ".EN"; echo ".PS"; cat; echo ".PE") | \ groff -e -p $groffpic_opts -Tps -P-pletter > $tmp/pic2graph.ps \ - && convert -trim -crop 0x0 $convert_opts $tmp/pic2graph.ps $tmp/pic2graph.$format \ + && convert -trim $convert_opts $tmp/pic2graph.ps $tmp/pic2graph.$format \ && cat $tmp/pic2graph.$format # End |