I am including some jpeg images in a LaTeX file using \includegraphics. Is there a way I can bundle the image files with the source file, and so just send one file to other machines, or collaborators?

The comment by Aditya to Can you embed an image so it doesn't need to be stored as a separate file? seems to be to my point. But it does not tell me what I need to know. I am already using \includegraphics. My question is how to copy the relevant files.

I'm afraid David Carlisle is right that you really cannot bundle the files. But sending them separately by cloud or any other method raises the problem of getting MiKTeX to locate jpeg files. MDR's solution at \includegraphics -- file not found, even when in same directory, using FNDB, works intermittently for me. But even on a single machine it is not reliable. I do not want to depend on it between several different machines.

David, can you give your comment as an answer?

  • 3
    in general no, just send a zip archve of all the files. TeX can write text files so (some) EPS files you can include in the file and write with filecontents environment. Feb 23, 2014 at 21:22
  • 4
    Not only it is not a good practise, but also embedding all your source files into one is not advised. It is recommended to break your code into several files for different chapters, or to separate definitions and styles from actual text. Feb 23, 2014 at 21:25
  • 2
    Why don't you use a cloud service to sync your data between the machines?
    – Tobi
    Feb 23, 2014 at 21:44
  • 2
    I can't answer your question as stated, but it is trivial to use bundledoc for the general goal, with or without arlatex. I once answered a question about this that you might find useful.
    – jon
    Feb 23, 2014 at 22:31
  • 1
    Well, one way is redo all the images you have in TikZ and keep the code for all them as they should appear in the main file.
    – leo
    Feb 27, 2014 at 20:47

1 Answer 1


In general no, just send a zip archive of all the files. TeX can write text files so (some) EPS files you can include in the file and write with filecontents environment.

  • Technically it is possible to embed all kinds of binary data using base64 encoding. Here is a snippet by Paulo Cereda demonstrating how to do it: gist.github.com/cereda/1046388 But I believe that this is hardly a solution to the OP's problem, because the real problem appears not to be how to embed data in text files, but rather how to keep working directories in sync.
    – DG'
    Aug 19, 2014 at 13:03
  • @DG' yes or uuencode (or vvencode if you remember that;-) I didn't mention that intentionally as if you want latex to unpack that you need shell-escape or a custom graphics driver setup, either of which is more bother than simply unzipping a zip file. Aug 19, 2014 at 13:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .