What is “Encapsulated PostScript” (“EPS”)?

PostScript has been for many years a lingua franca of powerful printers (though modern high-quality printers now tend to require some constrained form of Adobe Acrobat, instead); since PostScript is also a powerful graphical programming language, it is commonly used as an output medium for drawing (and other) packages.

However, since PostScript is such a powerful language, some rules need to be imposed, so that the output drawing may be included in a document as a figure without “leaking” (and thereby destroying the surrounding document, or failing to draw at all).

Appendix H of the PostScript Language Reference Manual (second and subsequent editions), specifies a set of rules for PostScript to be used as figures in this way. The important features are:

A PostScript figure that conforms to these rules is said to be in “Encapsulated PostScript” (EPS) format. Most (La)TeX packages for including PostScript are structured to use Encapsulated PostScript; which of course leads to much hilarity as exasperated (La)TeX users struggle to cope with the output of drawing software whose authors don’t know the rules.