On Wednesday 06 February 2002 8:42 am, Michael Schmitt wrote:
> Hi,
> 
> I am still facing the problem that my EPS files cannot be converted 
> correctly and hence are not shown on screen.
> 
> My EPS files start with:
> 
>    %!PS-Adobe-3.0 EPSF-3.0
>    %%BoundingBox: 9 599 523 723
> 
> This is what LyX prints on the console:
> 
>    try to convert image file: /home/schmitt/foo.eps
>    GetExtension: eps
>    GetExtFromContents: ps
>    ERROR: Do not know how to convert image.
>    from: ps ->
> 
> Any idea why it does not recognize the EPS format correctly? Why does 
> LyX not provide a standard converter for normal PostScript?

I swear I've told you how to do this several times before :-(

Because different people have different software installed on their machine. 
You have a powerful Converter mechanism accessible through the preferences 
dialog. Use it!

If you have ImageMagick's convert program installed:

Define a Format eps, GUI name EPS, Extension eps, Viewer ghostview
Define a Format xpm, GUI name XPM, Extension xpm
Define a converter EPS->XPM, Converter convert $$i XPM:$$o

Note that some older versions of convert produce bogus XPM files.

If you have the netpbm suite of tools installed (much, much faster than 
convert).
Define formats eps and xpm as above.
Define a Format ppm, GUI name PPM, Extension ppm
Define a converter EPS->PPM, Converter pstopnm -ppm $$i; mv $$b001.ppm $$o
Define a converter PPM->XPM, Converter ppmtoxpm $$i > $$o

To give you eeeeeeeeven more help, I attach my own preferences file.

Note that this will work beautifully to convert your files, but you'll end up 
with an "Error reading" message if your tmp directory is on a different 
partition. This has been reported elsewhere and may even be fixed one day.

Angus


### This file is part of
### ========================================================
###          LyX, The Document Processor
###
###          Copyright 1995 Matthias Ettrich
###          Copyright 1995-2001 The LyX Team.
###
### ========================================================

# This file is written by LyX, if you want to make your own
# modifications you should do them from inside LyX and save

\bind_file /usr/local/share/lyx/bind/emacs.bind

#
# MISC SECTION ######################################
#

# Display graphics within LyX
# no|mono|gray|color
\display_graphics color
# The default papersize to use.
\default_papersize "a4"
\kbmap_primary "/usr/users/aleem/OTHERS_CODE/lyx/devel/lib/kbd/hebrew.kmap"
\kbmap_secondary "/usr/users/aleem/OTHERS_CODE/lyx/devel/lib/kbd/greek.kmap"

#
# SCREEN & FONTS SECTION ############################
#

\popup_font_encoding "iso8859-1"
\screen_dpi 114
\screen_zoom 130
\screen_font_scalable false

#
# COLOR SECTION ###################################
#

\set_color "cursor" "#ff0000"

#
# PRINTER SECTION ###################################
#


#
# EXPORT SECTION ####################################
#


#
# TEX SECTION #######################################
#


#
# FILE SECTION ######################################
#


#
# ASCII EXPORT SECTION ##############################
#


#
# SPELLCHECKER SECTION ##############################
#

\use_personal_dictionary true
\personal_dictionary ".ispell_english"

#
# LANGUAGE SUPPORT SECTION ##########################
#


#
# 2nd MISC SUPPORT SECTION ##########################
#

\override_x_deadkeys false

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

\format "ppm" "ppm" "PPM" ""
\viewer "dvi" "xdvi -safer -bg linen -s 6 -expert"
\viewer "pdf2" "acroread"

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

\converter "eps" "ppm" "pstopnm -ppm $$i; mv $$b001.ppm $$o" ""
\converter "gif" "ppm" "giftopnm $$i > $$o" ""
\converter "jpg" "ppm" "convert JPG:$$i PPM:$$o" ""
\converter "png" "eps" "convert $$i EPS:$$o" ""
\converter "ps" "eps" "convert $$i EPS:$$o" ""
\converter "ps" "ppm" "pstopnm -ppm $$i; mv $$b001.ppm $$o" ""
\converter "ppm" "xpm" "ppmtoxpm $$i > $$o" ""
\converter "xpm" "eps" "convert $$i EPS::$$o" ""

Reply via email to