Does anyone know why the filecontents environment was introduced?
What is the purpose of packing it all in one file, but without using a tarball?
It's a natural extension of the ideas of docstrip that extracts comments and writes out the .sty and .cls files of the LaTeX distribution. It could have been written in perl or something but writing it in TeX makes it more portable to anyone who has tex at all.
Note that in 1991-1993 while latex2e was being developed, perl (introduced 1987) and a portable zip (info-zip introduced 1989) were not as commonly installed as they are today. Even now it is much easier to add small .csv data files or local .sty files to examples posted to this site by using filecontents than it is to post them as separate files and have to give instructions about saving and file names, or posting to some other site as a zip or tar file and then hoping people on windows can unpack it.
comp.text(.tex) but it's the same questions, just recycled:-)
– David Carlisle
Mar 26 '13 at 23:02
filecontentskeeps everything together in one.texfile. – barbara beeton Mar 26 '13 at 22:29source2edocumentation, p 361): "The environmentfilecontentsis intended for passing the contents of packages, options, or other files along with a document in a single file." – Werner Mar 26 '13 at 22:31.epsfile inclusion. : http://tex.stackexchange.com/questions/47341/can-you-embed-an-image-so-it-doesnt-need-to-be-stored-as-a-separate-file – percusse Mar 26 '13 at 22:37