Graphics, Figures & TablesInserting an eps file

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
tcadena411
Posts: 5
Joined: Sun Aug 09, 2009 12:41 am

Inserting an eps file

Post by tcadena411 »

I'm trying to get my LaTeX program to import an eps file and it is not reading it. I have LaTeX creating a PDF file. Here is my code:

\documentclass[letterpaper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{enumitem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{trig}
\usepackage{graphics}
\graphicspath{{e:\graphs}}

\item Two inequalities are graphed below: Which set of inequalities does this graph represent?

\begin{figure}[h]
\centerline{\includegraphics[height=2in]{inequalities.eps}}
\end{figure}

\begin{enumerate}

\item $y\leq-5x+1$, $y\geq3x-2$

\item $y\geq-5x+1$, $y\leq3x-2$

\item $y\geq-5x+1$, $y\geq3x-2$

\item $y\leq-5x+1$, $y\leq3x-2$

\\[2]
\end{enumerate}

\end{document}

Can anybody help me with this issue? Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: Inserting an eps file

Post by Stefan Kottwitz »

Hi,

use LaTeX instead of pdfLaTeX, or use for instance the epstopdf package.

Stefan
LaTeX.org admin
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Inserting an eps file

Post by frabjous »

Are you compiling with pdflatex? If so, try the latex > ps > pdf route instead, or else use epstopdf to convert the eps image to a pdf image. There are about a dozen or so other thread on this topic here... if you need for information, do a search for them.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Inserting an eps file

Post by localghost »

At first you should read Section 2.4 of the Board Rules. Afterwards please edit your post and modify it accordingly.

pdflatex doesn't accept the EPS format for graphics files. As Stefan already mentioned, you can convert it by using the epstopdf command line tool or the epstopdf package for conversion "on the fly". Note that the compiler will need shell escape for the latter one. The search function of the forum will yield more details as there are already solutions to this issue.

The \item command only works in list environments like description, enumerate or itemize. Thus there should be an error at it's first occurrence.


Best regards
Thorsten
Post Reply