google-research / arxiv-latex-cleaner

arXiv LaTeX Cleaner: Easily clean the LaTeX code of your paper to submit to arXiv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Eps files

orybkin opened this issue · 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!

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.

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

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

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.

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

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