I'd like to know whether it is possible to embed an image file into LaTeX code, such that the picture will appear in a resulting PDF file without it having to be stored in a separate .eps file during processing.
The reason is that I am generating LaTeX code on the fly (using PHP) and running pdflatex in a chroot environment, so I have to copy any required files before calling pdflatex. Since I am generating lots of different PDFs, they all use different image files. My options are thus:
- Hard-code which .eps files to copy, and change the PHP code to match the LaTeX code each time an image changes (bad, hard to maintain)
- Copy every single .eps file, whether it's used or not (bad, slow)
- Embed the image in the source LaTeX code (ideal)
Everything I can find about
\includegraphics seems to suggest images can only be read in from external files. Is there any way an .eps file can somehow be embedded within LaTeX code?