How to Include EPS Figures in Latex?

  • Context: LaTeX 
  • Thread starter Thread starter DukeLuke
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary

Discussion Overview

The discussion revolves around the challenges of including EPS (Encapsulated PostScript) figures in a LaTeX document. Participants explore various methods and tools for successfully integrating graphics into LaTeX, particularly focusing on the compatibility of different LaTeX compilers with EPS files.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant describes their attempt to include an EPS file using the \includegraphics command and encounters a compiler error regarding the unknown graphics extension.
  • Another participant inquires about the specific LaTeX command being used and whether pdflatex is the compiler, suggesting that it may not work well with EPS files directly.
  • A participant clarifies their experience level with LaTeX, noting that they have only previously created documents with text and equations, and they are using TeXnic Center with MiKTeX 2.7.
  • One participant mentions a workaround involving using the latex command followed by dvips and Ghostscript to convert the output to PDF, indicating a method that does not involve pdflatex.
  • A later reply reveals that TeXnicCenter has a built-in option for converting LaTeX to PS to PDF, which resolved the initial issue for the participant.

Areas of Agreement / Disagreement

Participants express differing views on the compatibility of pdflatex with EPS files, with some suggesting alternative methods while others confirm that pdflatex does not handle EPS files directly. The discussion does not reach a consensus on the best approach, as multiple methods are proposed.

Contextual Notes

The discussion highlights the limitations of using pdflatex with EPS files and the need for additional steps or alternative tools for successful integration. Specific dependencies on software versions and configurations are also noted.

Who May Find This Useful

This discussion may be useful for individuals new to LaTeX who are attempting to include graphics, particularly those using EPS files and facing similar compilation issues.

DukeLuke
Messages
92
Reaction score
0
I want to include a graph in eps file format in a Latex paper and I'm having some trouble. I have read a few online tutorials, but I can't seem to make any headway. I started by putting the eps file to be included in the same folder that my latex document is saved to. Then I included \usepackage{graphicx} in my preamble. I then tried to use \includegraphics{woodSaxon.eps} where woodSaxon is the name of the file I wanted to include. This gave me a Latex compiler error entitled "Unknown graphics extension: .eps". Does anyone know what my problem is? Thanks,
 
Physics news on Phys.org
what is your latex command?

is it pdflatex ...?
does latex ... work?
 
Thanks for the response. I'm not sure I know what you mean when you say latex command. If you’re referring to experience using latex, then this is the first time I have attempted to include graphics. I have created papers just containing equations and text that turned out fine. My output is pdf, if that specifies pdflatex. My whole document looks fine when I create a pdf, I just can't get it to compile when I try to include the image because of the error I described in the first post. If it helps I'm using Texnic Center with Miktex 2.7.
 
apparently, pdflatex doesn't work well with .eps files directly (e.g. http://golem.ph.utexas.edu/~distler/blog/archives/000425.html )

I don't use pdflatex myself.
What I do is (using MiKTeX)
latex myfile ; dvips myfile ; then I use ghostscript to convert the .ps to .pdf
(all of this in a little shell script)
 
Turns out TeXnicCenter has a Latex=>PS=>PDF option that did the trick. Thanks for the help.
 

Similar threads

  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
8K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 9 ·
Replies
9
Views
6K
Replies
3
Views
5K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K