0

I posting this question but once I posted in this topic ''LaTeX - Image not showing up'' I have bben told that to create new question that everyone can see. I have a problem with .eps format when I want to convert my text form TeXworks to pdf file. I always get the blank rectangle with name of the image! I removed draft, and I am using IEEEconfran template. Here is the results:enter image description here

Thanks a lot in advance!

Mike Renfro
  • 20,550
ymn
  • 1
  • 3
    .eps does not work with pdf directly. It seems that you have enabled the draft option either of your documentclass or of \usepackage{graphicx} or it is some setting with TeXWorks –  Jan 08 '17 at 15:28
  • 2
    Even if EPS isn't directly supported by pdflatex, the graphicx package should convert EPS graphics to PDF automatically. But a MWE will be helpful here (as Christian indicated, it's almost certainly a draft option somewhere). – Mike Renfro Jan 08 '17 at 15:36
  • 2
    You should convert your .eps file to .pdf format with Siep Koonenberg's excellent tool: epspdf, with option Compute tight bounding box. – Bernard Jan 08 '17 at 15:39
  • it looks to me like you are using [draft] option which suppresses the image inclusion and just prints the filename. – David Carlisle Jan 08 '17 at 17:07
  • I was wondering, how can I find out that I am using draft, I eliminated the draft name in my .tex file. here is my document class \documentclass[conference]{IEEEtran} and I am using the following packages: \usepackage[numbers]{natbib} % bibliography style \usepackage[final]{epstopdf} \usepackage{graphicx} \usepackage{float} \usepackage{amsmath} \usepackage{mathtools} \usepackage{subfig} \usepackage{environ} %\usepackage{lipsum} \usepackage{etoolbox} \usepackage[english]{babel} \epstopdfsetup{update} \usepackage{amssymb}. Please let me know if I have mistake! – ymn Jan 08 '17 at 17:49
  • Something other than what you've posted is causing the draft problem. I've built a simple document with an EPS figure with as little as \documentclass[conference]{IEEEtran} \usepackage{graphicx} \begin{document} \begin{figure} \includegraphics[width=\columnwidth]{somefigure} \caption{Figure} \end{figure} \end{document}, and also using all your other mentioned packages except for epstopdf, since it's not required in modern TeX installs. Start with a blank, minimized IEEEtran document with your figure. See if it builds correctly. If not, post that MWE as an edit to your question. – Mike Renfro Jan 08 '17 at 20:49
  • If it does build correctly (and it should), start adding back packages and setup commands a few at a time until the problem occurs. That will give you a clue to where the real problem lies. – Mike Renfro Jan 08 '17 at 20:50
  • Thanks Mike for the reply, I just run your code with pdfLaTex and I got the following error: Package pdftex.def Error: File `3DPCC-eps-converted-to.pdf' not found. See the pdftex.def package documentation for explanation. – ymn Jan 08 '17 at 21:31
  • Automatic conversion should have been the default for several years now. What version of TeX Live or MiKTeX do you have? – Mike Renfro Jan 08 '17 at 22:08
  • I have MiKTeX 2.9 – ymn Jan 09 '17 at 10:50
  • I suppose it's possible MiKTeX requires the epstopdf package as well, but I don't use it myself. If adding epstopdf makes my small document compile, then my previous advice still applies (start adding back a few commands at a time to see where the problem starts happening). – Mike Renfro Jan 10 '17 at 03:08

1 Answers1

1

Try adding something like this just after \documentclass. This of course assumes you have xetex installed.

\ifCLASSINFOpdf
    \usepackage[pdftex]{graphicx}
    \DeclareGraphicsExtensions{.pdf,.jpeg,.png}
\else
    \usepackage[dvips,xetex]{graphicx}
    \DeclareGraphicsExtensions{.eps}
\fi
Zarko
  • 296,517
Wes W.
  • 11
  • Thanks, I received the following error: ! LaTeX Error: Option clash for package graphicx.
    l.283 \DeclareGraphicsExtensions {.pdf,.jpeg,.png}
    – ymn Jan 09 '17 at 10:53
  • I just compiled the following code with a eps figure showing up with no bug using both latex and xelatex:\documentclass[conference]{IEEEtran} \ifCLASSINFOpdf \usepackage[pdftex]{graphicx} \DeclareGraphicsExtensions{.pdf,.jpeg,.png} \else \usepackage[dvips,xetex]{graphicx} \DeclareGraphicsExtensions{.eps} \fi \begin{document} \begin{figure} \includegraphics[width = 1\textwidth, clip = true, trim = 0in 0in 0in 0in]{test.eps} \end{figure} \end{document} – Wes W. Jan 10 '17 at 03:02
  • Thanks a lot! finally I could. I used both LaTex and XeLaTex and I could able to convert .eps to .pdf format, I do appreciate. – ymn Jan 10 '17 at 09:12