purifyeps – Make EPS work with both LaTeX/dvips and pdfLaTeX

While pdfLaTeX has a num­ber of nice fea­tures, its pri­mary
short­com­ing rel­a­tive to stan­dard LaTeX+dvips is that it is un­able
to read or­di­nary En­cap­su­lated PostScript (EPS) files, the most
com­mon graph­ics for­mat in the LaTeX world. Pu­ri­fyeps con­verts EPS
files into a ‘pu­ri­fied’ form that can be read by
both LaTeX+dvips and pdfLaTeX. The trick is that the stan­dard
LaTeX2ε graph­ics pack­ages can parse METAPOST-pro­duced EPS
di­rectly. Hence, pu­ri­fyeps need only con­vert an ar­bi­trary EPS
file into the same styl­ized for­mat that METAPOST out­puts.