arxiv-latex-cleaner icon indicating copy to clipboard operation
arxiv-latex-cleaner copied to clipboard

Eps files

Open orybkin opened this issue 5 years ago • 6 comments

Hi,

Thanks for open-sourcing this! I have a feature request related to .eps files. My understanding that the common installations of TeX convert each existing myfile.eps into a file myfile-eps-converted-to.pdf, and this file is then looked up when the pdf needs to be compiled.

When I try to use the arxiv-latex-cleaner on a LaTeX project with .eps files, the *-eps-converted-to.pdf are generated in the old project folder, but not the new cleaned-up folder. I am also not sure whether these files are compressed.

The minimal fix I am looking for is to automatically move the *-eps-converted-to.pdf files from the old to the new folder. I might eventually fix this myself, but just letting you know about this problem. Thanks!

orybkin avatar Feb 12 '19 01:02 orybkin

Hi Oleh, thanks for commenting! What's the usual way to work with eps files (sorry, I haven't used them in a while)? You include the figure with \includegraphics without extension, then pdflatex converts them automatically, and finally the \includegraphics is clever enough to include the *-eps-converted-to.pdf?

In this case, what would need to be done is to check the eps files that are referenced and copy the matching converted PDF.

jponttuset avatar Feb 12 '19 08:02 jponttuset

The cleaner could copy the *-eps-converted-to.pdf alongside the *.eps, but as *.pdf (if the latter not exists already)

krono avatar Feb 23 '19 10:02 krono

Jordi,

Sorry for not answering earlier, my notification settings were off.

I am not an expert on LaTeX either, but I think what you're describing is correct.

Tobias,

I think this won't work because LaTeX compilation (not sure which function though) expects the *-eps-converted-to.pdf file. I think what is needed is simply to copy the *-eps-converted-to.pdf, but I might be wrong

orybkin avatar Mar 24 '19 03:03 orybkin

Hi Oleh, Might give it a shot at some point. For now, I'll leave this open as enhancement in case someone would like to chip in.

jponttuset avatar Mar 24 '19 19:03 jponttuset

@orybkin It depends: If you do

\includegraphics{foo}

then pdflatex will prefer foo.pdf and latex will prefer foo.eps. (not sure about XeTeX, tho)

krono avatar Mar 24 '19 21:03 krono

I am echoing also this issue. *.eps files are tricky and depends on which latex compiler you use. Better to pass the eps files as it is like another image format I guess and don't delete them

peymmo avatar Jul 29 '20 22:07 peymmo