brucemiller / LaTeXML

LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
http://dlmf.nist.gov/LaTeXML/
Other
915 stars 96 forks source link

Issues with converting documents containing figures in EPS format. #2267

Open Yunelsy opened 9 months ago

Yunelsy commented 9 months ago

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?

dginev commented 9 months ago

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

Yunelsy commented 9 months ago

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

dginev commented 9 months ago

@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).

Yunelsy commented 9 months ago

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

xworld21 commented 9 months ago

@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.

Yunelsy commented 9 months ago

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 :(

xworld21 commented 9 months ago

@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.