On Thursday 21 February 2002 10:03 am, Yann MORERE wrote:
> Ce Thu, 21 Feb 2002 09:55:21 +0000
> Angus Leeming <[EMAIL PROTECTED]> a écrit :
> 
> AL> Apparently it doesn't work with eps (Dekel's comment) and you'll
> need a shell AL> script wrapper for pstoppm. I think.
> 
> in fact it seems that you must do with 2 passes
> first pstopnm 
> second pnm to something but not xpm, which seems not to be supported by
> netpbm from pnm but from ppm

pnm means Portable Any Map, as opposed to Portable PixMap or Portable BitMap 
which are subset of "any".

You could use

        pstopnm -ppm file.ps

which will produce a file file001.ppm. 

You SHOULD be able to define a converter

\converter "ps" "ppm" "pstopnm -ppm $$i; mv $$b001.ppm $$o" ""

which will result in conversion from file.ps to file.ppm

but I think that the $$b (base-name) expansion of the converters code is 
wrong. I think it is correct in the new code that hasn't made it into cvs 
yet. I'll test.

> Argglll
> 
> what was the way to display graphics in the 1.1.6 release....

It had it's own, much more horrible problems that we would NEVER be able to 
overcome. The current solution will eventually become "perfect", by which I 
mean that you will be able to display graphics in ANY format, so long as you 
can define a converter from that format to a "loadable format". For now, we 
use libxpm to load the graphics files into memory, which means that the only 
"loadable format" is XPM. Thus, you must define converters from any other 
format to XPM. Eventually, we'll use the qt2 or xforms built-in image loading 
routines, so we'll be able to load many more formats directly and your 
complaints will cease!

For now, however, you have all the power but you, personally, have to  make a 
little effort to use it. That is, you must define the converters.

The only current REAL show stopper is that loading takes a long, long time 
and blocks the rest of LyX. We have code that overcomes this, but it isn't 
yet in cvs. A day or so only...

Anyway, these are my formats and converters, defined in my ~/.lyx/preferences 
file. Note that I have to remove the converters from 
/usr/local/share/lyx/lyxrc.defaults for this to work. (Or from 
$LYXHOME/lib/lyxrc.defaults if you are using a cvs version of lyx that you 
haven't installed.)

#
# FORMATS SECTION ##########################
#

\format "ppm" "ppm" "PPM" ""

#
# CONVERTERS SECTION ##########################
#

\converter "eps" "ppm" "convert $$i PPM:$$o" ""
\converter "ps" "ppm" "convert $$i PPM:$$o" ""
\converter "gif" "ppm" "giftopnm $$i > $$o" ""
\converter "jpg" "ppm" "convert JPG:$$i PPM:$$o" ""

\converter "ppm" "xpm" "ppmtoxpm $$i > $$o" ""

\converter "png" "eps" "convert $$i EPS:$$o" ""
\converter "ps" "eps" "convert $$i EPS:$$o" ""
\converter "xpm" "eps" "convert $$i EPS::$$o" ""


> I think you should add a dependancy to imagemagick (if the is no other
> solution) for the install in order to avoid lots of messages about
> graphics

Maybe.
Angus


Reply via email to