Generalinclude *.eps figure using texnicCenter

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
dccpurple
Posts: 3
Joined: Wed Sep 10, 2008 7:42 am

include *.eps figure using texnicCenter

Post by dccpurple »

Hi,

When I was trying to inculde a *.eps file using Latex=>PDF, the adobe acrobat produce a warning saying that

"there was an error opening the document. the file is damaged and could not be repaired." I could not see any output PDF file.

The attahed is the logfile. My code is as followed

\begin{figure}[ht]
\centering
\includegraphics[width=6.0in]{linear.eps}
\caption{Amplitude}
\label{fig:mass_same_amplitude}
\end{figure}

Could anyone please kindly help me?

Thanks a lot,

Jane
Attachments
transfer report.log
log
(13.84 KiB) Downloaded 207 times

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

include *.eps figure using texnicCenter

Post by localghost »

This fault is done very often, as a search in the forum would reveal. You cannot compile with pdflatex when trying to include EPS files. Convert them with the epstopdf or "on the fly" with epstopdf package. If the origin of the files is different from EPS (such as JPG or PNG), keep them in that format. Omit the suffix *.eps from the files. The compiler will search the right file format if provided.


Best regards and welcome to the board
Thorsten¹
dccpurple
Posts: 3
Joined: Wed Sep 10, 2008 7:42 am

Re: include *.eps figure using texnicCenter

Post by dccpurple »

Hi Thorsten

Thanks a lot for your reply.

I am so sorry that I am new to the Latex and TexnicCenter, and I also did see some solusion talking about "convert them with the epstopdf or 'on the fly' with epstopdf package". But I don't know how to do this, so could you kindly explain this in detail please?

Thanks again,
Jane
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

include *.eps figure using texnicCenter

Post by localghost »

As I noticed after a closer look at the log file you are already using the epstopdf package. But you have not enabled the shell escape option, which is set on MiKTeX with --enable-write18. Go to the dialogue window to define the build profiles (Alt+F7) in TeXnicCenter and adapt the profiles by adding this switch in the command line arguments for the compiler. You can see some explaining screenshots in another topic [1]. At the moment I'm not running Windows, but in case of further difficulties I will generate some additional screenshots later.

[1] LaTeX => PS => PDF
dccpurple
Posts: 3
Joined: Wed Sep 10, 2008 7:42 am

include *.eps figure using texnicCenter

Post by dccpurple »

localghost wrote:As I noticed after a closer look at the log file you are already using the epstopdf package. But you have not enabled the shell escape option, which is set on MiKTeX with --enable-write18. Go to the dialogue window to define the build profiles (Alt+F7) in TeXnicCenter and adapt the profiles by adding this switch in the command line arguments for the compiler. You can see some explaining screenshots in another topic [1]. At the moment I'm not running Windows, but in case of further difficulties I will generate some additional screenshots later.

[1] LaTeX => PS => PDF

It DOES work when I enabled the option, thanks a lot!!
Post Reply