Attached is the updated patch (against libs/configure.m4) to detect
image converters (ImageMagick and netpbm) for the image conversion task.
Specifically this handles the conversion when including a GIF/PNG/JPG in
a Latex file or an EPS/JPG/GIF in a PDFLatex file.
It might be that for the PDFLatex some conversions are unneccessary and
it is possible that some better solution for JPEG to EPS exists, however
this is a first solution to get it to work. Refinements are ([almost]
always) possible.
--
Baruch Even
http://baruch.ev-en.org/
Index: lib/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v
retrieving revision 1.79
diff -u -r1.79 ChangeLog
--- lib/ChangeLog 2001/07/23 10:04:17 1.79
+++ lib/ChangeLog 2001/07/24 17:55:41
@@ -1,3 +1,8 @@
+2001-07-23 Baruch Even <[EMAIL PROTECTED]>
+
+ * configure.m4: Added conversion of images support, used when exporting
+ images in formats (PDF)Latex cannot handle directly.
+
2001-07-23 [EMAIL PROTECTED] <J�rgen Spitzm�ller>
* bind/*.bind: add binding for ligature-break-insert
Index: lib/configure.m4
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/configure.m4,v
retrieving revision 1.20
diff -u -r1.20 configure.m4
--- lib/configure.m4 2001/05/17 15:10:58 1.20
+++ lib/configure.m4 2001/07/24 17:55:44
@@ -331,6 +331,19 @@
hevea) latex_to_html_command="hevea -s \$\$i";;
esac
+#### Search for image conversion ####
+SEARCH_PROG([for an Image -> EPS converter], TOEPS, convert pnmtops)
+case $TOEPS in
+ convert) gif_to_eps="convert GIF:\$\$i EPS:\$\$o" png_to_eps="convert
+PNG:\$\$i EPS:\$\$o" jpg_to_eps="convert JPG:\$\$i EPS:\$\$o";;
+ pnmtops) gif_to_eps="giftopnm \$\$i | pnmtops > \$\$o" png_to_eps="pngtopnm
+\$\$i | pnmtops >\$\$o" jpg_to_eps="jpegtopnm \$\$i | pnmtops >\$\$o";;
+esac
+
+SEARCH_PROG([for a GIF -> PNG converter], TOPNG, convert pnmtopng)
+case $TOPNG in
+ convert) gif_to_png="convert GIF:\$\$i PNG:\$\$o" eps_to_png="convert
+EPS:\$\$i PNG:\$\$o" jpg_to_png="convert JPG:\$\$i PNG:\$\$o";;
+ pnmtopng) gif_to_png="giftopnm \$\$i | pnmtopng >\$\$o" eps_to_png="pstopnm
+\$\$i| pnmtopng >\$\$o" jpg_to_png="jpegtopnm \$\$i | pnmtopng >\$\$o";;
+esac
+
#### Explore the LaTeX configuration
MSG_CHECKING(LaTeX configuration)
# First, remove the files that we want to re-create
@@ -423,7 +436,6 @@
\\Format program "" Program ""
\\Format word doc Word W
-
\\converter latex dvi "$LATEX \$\$i" "latex"
\\converter latex pdf2 "$PDFLATEX \$\$i" "latex"
\\converter latex html "$latex_to_html_command" "originaldir,needaux"
@@ -444,10 +456,13 @@
\\converter html latex "$html_to_latex_command" ""
\\converter word latex "$word_to_latex_command" ""
-\converter gif eps "$image_command" ""
-\converter png eps "$image_command" ""
-\converter jpg eps "$image_command" ""
-\converter gif png "$image_command" ""
+\\converter gif eps "$gif_to_eps" ""
+\\converter png eps "$png_to_eps" ""
+\\converter jpg eps "$jpg_to_eps" ""
+
+\\converter gif png "$gif_to_png" ""
+\\converter eps png "$eps_to_png" ""
+\\converter jpg png "$jpg_to_png" ""
\\viewer dvi "$DVI_VIEWER"
\\viewer html "$HTML_VIEWER"