PURIFYEPS(1)
๐ NAME ๐
purifyeps โ the girlboss utility that makes an Encapsulated PostScript file work with both dvips and pdflatex. yes bestie, both. at the same time. no cap. ๐
โจ SYNOPSIS โจ
purifyeps --help
purifyeps --version
purifyeps [--fontmap=.fmp file] [.eps input file [.eps output file]]
purifyeps --make-man[=filename] [--section=section]
purifyeps --make-ps-man[=filename] [--section=section]
๐ฆ DESCRIPTION ๐ฆ
okay so here's the tea. โ pdflatex has a bunch of genuinely cute features, but its biggest glow-down compared to standard latex+dvips is that it is unable to read ordinary Encapsulated PostScript (EPS) files โ and EPS is literally the most common graphics format in the whole LaTeX world. it's giving tragedy. ๐ญ
pdflatex can read only the following types of graphics files:
- PDF โ most people who use
pdflatexconvert their documents to PDF using a utility such asepstopdf. this works great and preserves the vector nature of the original EPS. unfortunately,dvipsdoes not read PDF, so if your document has to be processed with bothlatex+dvipsandpdflatex, you have to maintain two versions of the graphic. pain. - PNG โ PNG is a bitmap format and therefore scales poorly (blurry era, we don't claim her). also,
dvipsdoes not read PNG, so again: two versions of the graphic must be maintained if you want bothlatex+dvipsandpdflatexto work. ๐ - JPEG โ JPEG is a bitmap format and therefore scales poorly. also,
dvipsdoes not read JPEG, so two versions of the graphic must be maintained if the document is to be processed with bothlatex+dvipsandpdflatex. - MPS โ probably the least-used
pdflatex-compatible graphics format, ngl. MPS is actually a stylized version of EPS that MetaPost outputs. like PDF, MPS is a vector format and remains as such when imported into apdflatexdocument. and also like PDF,dvipsdoes not read MPS, so two versions of the graphic must be maintained if the document is to be processed with bothlatex+dvipsandpdflatex.
so yeah. rough out here. ๐ฎโ๐จ
but here's the insight behind purifyeps, and it ate: there are only a few, small differences between MPS and EPS, and a file can be converted into a format that matches both the MPS and EPS specifications simultaneously. icon behavior, honestly.
purifyeps inputs an EPS file, uses pstoedit's "mpost" filter to convert the file to MetaPost (.mp), runs mpost on the file to convert it to MPS, and finally performs some touchups on the result to convert the file back to EPS โ all while preserving its ability to be parsed by pdflatex. โจ
๐ OPTIONS ๐
--helpโ displays"Usage"and"Options"from thepurifyepsdocumentation.-V,--versionโ displays thepurifyepsversion number, copyright, and license. the receipts, basically. ๐งพ--fontmap=.fmp fileโ specifies the name of a file that tellspurifyepshow to map from TeX font names to PostScript font names. [Default:mpost.fmp]--make-man [=filename]] [--section=section]โ automatically creates a Unix man page forpurifyeps.sectionspecifies the section [default:1(User Commands)].filenamedefaults topurifyeps.1or an analogous filename ifsectionis specified.--make-ps-man [=filename]] [--section=section]โ automatically creates a PostScript version of thepurifyepsdocumentation. the documentation is formatted like a Unix man page.sectionspecifies the section [default:1(User Commands)].filenamedefaults topurifyeps.ps.
in normal operation (i.e., when not run with "--help", "--make-man", or "--make-ps-man"), purifyeps takes the name of an input file and an output file. ๐ซ the same filename can safely be used for both files โ she's chill like that. if the output filename is omitted, output will go to the standard output device. if the input filename is omitted, purifyeps will read from the standard input device.
๐ธ EXAMPLES ๐ธ
create a PostScript version of the purifyeps documentation, but call it happydoc.ps instead of the default, purifyeps.ps:
purifyeps --make-ps-man=happydoc.ps
create a Unix man page for purifyeps (in the usual roff format), but indicate that it belongs in section "LOCAL" instead of the default of section 1:
purifyeps --make-man --section=LOCAL
purify sample.eps (mpost.fmp is in the current directory):
purifyeps sample.eps sample.eps
purify sample.eps (mpost.fmp is in a different location):
purifyeps --fontmap=/usr/share/pstoedit/mpost.fmp sample.eps sample.eps
rename the purified version while purifying:
purifyeps sample.eps sample-pure.eps
do the same, but in a Unix pipeline:
cat sample.eps | purifyeps > sample-pure.eps
when you run purifyeps, you should see the output from both pstoedit and mpost, followed by a success message from purifyeps:
% cat sample.eps | purifyeps > sample-pure.eps
pstoedit: version 3.30 / DLL interface 107 (build Mar 14 2002) :
Copyright (C) 1993 - 2001 Wolfgang Glunz
Interpreter finished. Return status 0
This is MetaPost, Version 0.641 (Web2C 7.3.1)
(/tmp/purifyeps-jdeGPkh9.mp [1] )
1 output file written: purifyeps-jdeGPkh9.1
Transcript written on purifyeps-jdeGPkh9.log.
File seems to have been purified successfully.
๐ FILES ๐
mpost.fmpโ file containing mappings between TeX and PostScript font names. see"NOTES"for a description of this file's contents. ๐
๐ BUGS ๐
error reporting could definitely stand to be improved, bestie. ๐ญ error messages produced by pstoedit and mpost are sometimes silently ignored. also, errors sometimes cause purifyeps to leave temporary files (purifyeps-#####) lying around. she's messy like that sometimes.
purifyeps is subject to all of the limitations that affect pstoedit and especially the "mpost" backend to pstoedit. as a result, purifyeps ignores certain PostScript constructs, such as nonuniformly scaled text.
๐ง NOTES ๐ง
purifyeps needs a file that tells it how to map from TeX font names to PostScript font names. this file must contain two, space-separated columns. the first lists a PostScript font name, and the second lists the TeX equivalent. blank lines and lines that start with "%" are ignored. the following is a sample .fmp file:
% This is a sample font map for purifyeps.
Times-Bold ptmb
Times-Italic ptmri
Times-Roman ptmr
Helvetica phvr
Helvetica-Bold phvb
Helvetica-Oblique phvro
Courier pcrr
Courier-Bold pcrb
Courier-Oblique pcrro
note that this is exactly the same format that pstoedit uses. by default, purifyeps looks in the current directory for a font map called mpost.fmp. the "--fontmap" command-line option tells purifyeps to use a different font map, which will typically be the mpost.fmp file that comes with pstoedit. ๐ซถ
once you create purified EPS files with purifyeps, you need to instruct pdflatex to use them. the pdfLaTeX configuration of the "graphics" and "graphicx" packages (pdftex.def) normally ignores .eps files. putting the following LaTeX code in your document's preamble tells pdflatex that all .eps files are in MPS format:
% Tell pdfLaTeX that all .eps files were produced by MetaPost.
\usepackage{graphicx} % or graphics
\usepackage{ifpdf}
\ifpdf
\DeclareGraphicsRule{.eps}{mps}{*}{}
\makeatletter
\g@addto@macro\Gin@extensions{,.eps}
\makeatother
\fi
๐ SEE ALSO ๐
dvips(1), epstopdf(1), latex(1), mpost(1), pdflatex(1), pstoedit(1)
๐ AUTHOR ๐
Scott Pakin, scott+peps@pakin.org
aww and that's the whole page, bestie!! ๐ฅน this waspurifyepsversionv1.1, dated2010-11-28. thanks for reading, you're literally the main character of this man page now. slay, periodt, go purify some EPS files. ๐โจ๐
๐ฆ where this page comes from
- arch rolling: texlive-doc 2026.1-1 ยท GPL
- debian bookworm: purifyeps 1.1-3 ยท LPPL-1.3c+
- debian trixie: purifyeps 1.1-3 ยท LPPL-1.3c+
- fedora 43: texlive-purifyeps 11:svn29725-93.fc43 ยท LPPL-1.3c
- fedora 43: texlive-purifyeps 11:svn29725-95.fc43.1 ยท LPPL-1.3c
- fedora 44: texlive-purifyeps 12:svn29725-105.fc44 ยท LPPL-1.3c
- fedora 44: texlive-purifyeps 12:svn29725-111.fc44 ยท LPPL-1.3c
- opensuse-leap 16.0: texlive-purifyeps-doc 2025.221.1.1svn29725-160000.3.1 ยท LPPL-1.0
- ubuntu jammy: purifyeps 1.1-3 ยท LPPL-1.3c+
- ubuntu noble: purifyeps 1.1-3 ยท LPPL-1.3c+
- ubuntu resolute: purifyeps 1.1-3build1 ยท LPPL-1.3c+
- ubuntu stonking: purifyeps 1.1-3build1 ยท LPPL-1.3c+
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms