I have a TeX document that is embedding a huge amount of figures from a fig folder that is full of another humongous amount of other figures.
I would like to move the document along with its figures, but I don't want to take the whole fig folder, just the figures in there that are embedded by the document.
Is there a package (or any other way) that allows me to, for example, print out the filenames of all the figures embedded by the document? Something like:
fig/figurename1.eps
fig/figurename2.eps
...
etc
I could then just copy-paste that list and add some cp's in a plain text file and automate the copy of those files to my desired location by running the file in my shell:
$ cp fig/figurename1.eps wherever/fig/
$ cp fig/figurename2.eps wherever/fig/
...
etc
Of course this is just an idea, if somebody has an alternative to the "file listing and copy-pasting in a shell file" I would be happy to listen =)
for name in \grep includegraphics document.tex | cut -d{ -f2 | cut -d} -f1`; do cp $name otherfolder; done` – Mike Renfro Sep 26 '14 at 15:45cp: incorrect option -- «{»– Xirux Nefer Sep 26 '14 at 15:55{}characters on an\includegraphicsline. Or use one of the suggestions below. – Mike Renfro Sep 26 '14 at 16:15