Andre Poenitz wrote: > On Thu, Jun 27, 2002 at 08:32:56PM +0200, Herbert Voss wrote: > >>This was not my point! I do not understand why this is >>defined in the preferences, where things should be saved >>which can be modified by the user. To get an asynchronously >>loading of the math preview I do not need this in the pref. >>On the other hand you have the format "lyxpreview" in the >>list of formats which also confuses the user... >> > > Hm.. maybe you are right. > > So what should we do?
something like this ... works without any converter- abd format definition of lyxpreview as long as you save your files with the extension "lyxpreview". Herbert -- http://www.lyx.org/help/
Index: src/graphics/GraphicsConverter.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/GraphicsConverter.C,v retrieving revision 1.7 diff -u -r1.7 GraphicsConverter.C --- src/graphics/GraphicsConverter.C 19 Jun 2002 10:39:57 -0000 1.7 +++ src/graphics/GraphicsConverter.C 27 Jun 2002 19:11:47 -0000 @@ -117,16 +117,27 @@ } } - if (!success) { + // if we have no success then let's take the defaults for the internal + // math-preview or the external conversion with the default converter + if (!success) { script_file = string(); - script_command = - "convert -depth 8 " + - from_format + ':' + from_file + ' ' + - to_format + ':' + to_file; - lyxerr[Debug::GRAPHICS] - << "\tNo converter defined! I use convert from ImageMagic:\n\t" - << script_command << endl; + if (from_format == "lyxpreview") { + script_command = + LibFileSearch("scripts", "lyxpreview2xpm.sh") + + " " +from_file + " " + to_file; + lyxerr[Debug::GRAPHICS] + << "\tI use lyxpreview2xpm for the conversion\n\t" + << script_command << endl; + } else { + script_command = + "convert -depth 8 " + + from_format + ':' + from_file + ' ' + + to_format + ':' + to_file; + lyxerr[Debug::GRAPHICS] + << "\tNo converter defined! I use convert from +ImageMagic:\n\t" + << script_command << endl; + } } // Launch the conversion process.