Jean-Marc Lasgouttes wrote: >>>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> If we assume that all 'proper' systems will have a > Angus> lyxrc.defaults file that can be found by > lyxpreview2bitmap.sh, Angus> could we not use this: > > And how would it find that? > > Angus> sed -n '/^\\converter *latex *dvi/p' ../lyxrc.defaults | cut > Angus> -d'"' -f 2` > > Angus> Here is gives latex $$i > > Not really, because the interesting case is when the user has > changed the value of the latex converter in the prefs. > > Could we have a new converter flag indicating that we want to pass a > converter as argument? > > Something ugly like > > lyxpreview2bitmap.sh $$c(latex, dvi) $$i > > OK, it is probably too ugly... > > JMarc
Ugly indeed. However, why not turn this around and get configure to generate lyxpreview2bitmap.sh, filling in the missing LATEX information? Ok, that too is nasty and effectively prevents the user from using his own version of lyxpreview2bitmap.sh. Second thought. Have a shell script that just initialises such variables and call it from lyxpreview2bitmap.sh. Get configure to autogenerate this script #! /bin/sh LATEX=latex export LATEX DVIPS=dvips export DVIPS GS=gs export GS -- Angus