LaTeXML icon indicating copy to clipboard operation
LaTeXML copied to clipboard

Issues with converting documents containing figures in EPS format.

Open Yunelsy opened this issue 1 year ago • 7 comments
trafficstars

I'm trying to convert a document that has figures in EPS format, and I'm facing the following error:

Error:imageprocessing:imageclass No image processing module found to convert types

During the conversion, the name of the figure disappears in the HTML files. Additionally, when attempting to convert the entire document, I do not obtain any XML file (I believe this might be due to the number of figures in EPS format).

Is there a way for LaTeXml to accept the EPS format?

Yunelsy avatar Nov 20 '23 15:11 Yunelsy

Hi @Yunelsy ,

This may be an installation issue. Do you have ImageMagick installed, through one of the ways mentioned in the Get documentation page?

You may also need to change the permissions on some linux distributions, as described in #1216

dginev avatar Nov 20 '23 15:11 dginev

Hello @dginev Yes, I have ImageMagick installed. There is another way?

Yunelsy avatar Nov 20 '23 16:11 Yunelsy

@Yunelsy great, then as long as it is configured to support EPS, latexml should be able to use it. We do support EPS files - it's a matter of configuring a healthy installation.

Could you try the usual convert call from ImageMagick on the file, say something like:

convert -density 300 image.eps -resize 1024x1024 image.jpg

If that doesn't work, you may need to double-check you have ghostscript installed and visible for imagemagick use. If it does work, it may be a matter of getting the right perl wrappers installed (and it would be helpful to know which operating system you're using).

dginev avatar Nov 20 '23 16:11 dginev

@dginev I tried and the conversion worked! I use Windows 10. Thanks in advance.

Yunelsy avatar Nov 20 '23 19:11 Yunelsy

@Yunelsy could you please run perl -MImage::Magick -e "print Image::Magick->VERSION"? This is to check that the perl module Image::Magick is installed correctly.

xworld21 avatar Nov 20 '23 20:11 xworld21

Hello @xworld21 I did it, the return was:

Can't locate Image/Magick.pm in @INC (you may need to install the Image::Magick module) (@INC contains: C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib). BEGIN failed--compilation aborted.

However, I have the Image Magick installed :(

Yunelsy avatar Nov 20 '23 20:11 Yunelsy

@Yunelsy you need to install Image::Magick as well, e.g. cpanm Image::Magick if you are using Strawberry Perl.

If cpanm Image::Magick fails saying that it needs a C++ compiler, you need to pass something like cpanm Image::Magick --build-args=CC=g++. I can check and post the correct command line this Friday.

xworld21 avatar Nov 22 '23 21:11 xworld21