On Monday 29 December 2003 14:50, Angus Leeming wrote: > José, just before Christmas you asked why we always copied external > files (graphics, xfig, gnuplot etc) to the tmp directory even when no > modifications were needed. > > I've just remembered an additional reason: LaTeX can't cope with > spaces in the path. When we copy the file to the temp directory we > rename it in a LaTeX-friendly fashion.
The other reason I got looking to the code is to help the detection of any change in the input (original) file. But in any case you don't need to convert from the file in the temporary directory that could be done from the original file. I am testing the following without any problem: Index: src/insets/ExternalSupport.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ExternalSupport.C,v retrieving revision 1.4 diff -u -p -r1.4 ExternalSupport.C --- src/insets/ExternalSupport.C 13 Oct 2003 02:10:45 -0000 1.4 +++ src/insets/ExternalSupport.C 2 Jan 2004 16:04:19 -0000 @@ -176,7 +176,7 @@ void updateExternal(InsetExternalParams return; // FAILURE } - from_file = temp_file; + //from_file = temp_file; } string const to_file = doSubstitution(params, buffer, Index: src/insets/insetgraphics.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetgraphics.C,v retrieving revision 1.231 diff -u -p -r1.231 insetgraphics.C --- src/insets/insetgraphics.C 11 Dec 2003 15:23:15 -0000 1.231 +++ src/insets/insetgraphics.C 2 Jan 2004 16:04:19 -0000 @@ -518,7 +518,7 @@ string const InsetGraphics::prepareFile( // if no special converter defined, than we take the default one // from ImageMagic: convert from:inname.from to:outname.to - if (!converters.convert(&buf, temp_file, to_file_base, from, to)) { + if (!converters.convert(&buf, orig_file, to_file_base, from, to)) { string const command = "sh " + LibFileSearch("scripts", "convertDefault.sh") + ' ' + from + ':' + temp_file + ' ' + -- José Abílio LyX and docbook, a perfect match. :-)