How to Typeset EPS Figures in LaTeX

The extension EPS stands for Encapsulated PostScript and is my favorite filetype for graphics and figures I produce using applications like Illustrator, Inkscape, and MATLAB. Here is how to insert EPS figures into a LaTex document. First you have to use the graphicx package so insert the following after the \documentclass tag and before the \begin{document} tag.


Next save your EPS graphic to a known location in the folder or subfolder where your .tex file resides. Then, insert the following code where you want your figure to appear in your compiled document.

\caption{insert a figure caption here}

In the above code the [thbp] arguments specify your order of preference for where you want the figure to be displayed, top of the page (t), in between the text where the code above was inserted (h, which stands for here), at the bottom of the page (b), or where ever it is possible (p). The angle argument can be used to rotate the figure (angle=90 would rotate the figure 90 degrees counterclockwise while angle=-90 would rotate the figure 90 degrees clockwise). The rest of the code should be self explanatory.

Thats it; just make sure you compile using TeX and Ghostscript (if you are using TexShop on Mac OS X) instead of Pdftex because Pdftex does not handle EPS graphics. You would have to first convert your EPS to a PDF or JPG in order to compile using Pdftex. This is relatively easy to do using Preview on Mac OS X.

Leave a Reply

Your email address will not be published.