Graphics, Figures & TablesImage not appearing

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mischuin
Posts: 6
Joined: Wed Oct 10, 2012 6:57 am

Image not appearing

Post by mischuin »

Hello everyone!
I'm trying to put a picture in my article, but the image just has not being shown. The compiler runs without errors or warnings, but the text is generated with the space of figure (even the legend is showed), but without the figure. What might be happening? Look below the packages that I'm using as well as an example of the code runned.

Code: Select all

\usepackage[dvips]{graphicx}

\begin{document}
\chapter{First}

\begin{figure}[htp]
%\captionstyle{center}
\centering
\includegraphics[scale=0.5]{test.eps}
\caption{Scattering two ports}
\label{fig:scattering_two_ports}
\end{figure}

\end{document}
Do I need some other package? I've looked for "epstopdf" package in the MikTeX Package Manager, but I didn't find it. If I need it, how can I get? I have the GSview for Windows (GSVIEW32.EXE Version:2.9) 2000-03-20. Does it have any problem with it?
Can anyone help me?

Thanks a lot in advance!
Michelle

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Image not appearing

Post by cgnieder »

How do you compile your document? Do you get any warning or info messages? And maybe you could extend your example into a Infominimal working example?

Regards
site moderator & package author
mischuin
Posts: 6
Joined: Wed Oct 10, 2012 6:57 am

Image not appearing

Post by mischuin »

Actually, one warning, that I didn't realize before is being shown:
epstopdf-base.sty
Package epstopdf Warning: Drivers other than `pdftex.def' are not supported.

Here's the full code executed:

Code: Select all

\documentclass[12pt,a4paper]{abnt}
\usepackage{amsmath,amsthm,amsfonts,amssymb} 

\usepackage{latexsym}
\usepackage{mathtext}
\usepackage[T1]{fontenc}
\usepackage{syntonly}
%\syntaxonly
\usepackage[brazil]{babel} 			
\usepackage{ucs}
\usepackage[utf8x,utf8]{inputenc}
\usepackage[dvips]{graphicx}
\usepackage{epstopdf}

\begin{document}
\chapter{First}

\begin{figure}[htp]
%\captionstyle{center}
\centering
\includegraphics[scale=0.5]{test.eps}
\caption{Scattering two ports}
\label{fig:scattering_two_ports}
\end{figure}

\end{document}
Any idea how can I deal with this? Seems to be a problem with the pdflatex compiler, but how can I work with images "eps" using it?
(Just to you know, this is my pdfTeX version - 3.1415926-2.4-1.40.13 (MiKTeX 2.9))
Regards,
Michelle
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Image not appearing

Post by cgnieder »

There you have a hint:
mischuin wrote:Actually, one warning, that I didn't realize before is being shown:
epstopdf-base.sty
Package epstopdf Warning: Drivers other than `pdftex.def' are not supported.
But the driver you're using is »dvips«
mischuin wrote: Here's the full code executed:

Code: Select all

\usepackage[dvips]{graphicx}
\usepackage{epstopdf}
I would suggest leaving the driver specification for graphicx out. Also if you're compiling with latex you won't need epstopdf.
Actually, on a modern system you don't need it at all. Modern pdfTeX converts EPS to PDF on the fly without the need to interfere.

Something like this should suffice:

Code: Select all

\documentclass{afnt}
...
\usepackage{graphicx}
...
\begin{document}
\chapter{First}

\begin{figure}[htp]
 ...
 \includegraphics{test.eps}
 ...
\end{figure}

\end{document}
Regards
site moderator & package author
mischuin
Posts: 6
Joined: Wed Oct 10, 2012 6:57 am

Image not appearing

Post by mischuin »

I got it!

I've used the following: \usepackage{graphicx,epstopdf}, as showed in the code below.
Executing like your suggestion, the following error comes out

Code: Select all

!LaTeX Error:Unknown graphics extension:.eps

See the LaTeX manual or LaTeX Companion for explanation.
Type H<return> for immediate help.
...
l.22\includegraphics[scale=0.5]{teste.epc}
?
Code executed (the one that worked):

Code: Select all

\documentclass[12pt,a4paper]{abnt}
\usepackage{amsmath,amsthm,amsfonts,amssymb} 
\usepackage{latexsym}
\usepackage{mathtext}
\usepackage[T1]{fontenc}
\usepackage{syntonly}
%\syntaxonly
\usepackage[brazil]{babel} 			
\usepackage{ucs}
\usepackage[utf8x,utf8]{inputenc}
\usepackage{graphicx,epstopdf}

\begin{document}
\chapter{First}

\begin{figure}[htp]
%\captionstyle{center}
\centering
\includegraphics[scale=1]{test.eps}
\caption{Scattering two ports}
\label{fig:scattering_two_ports}
\end{figure}

\end{document}
I think the problem was related with the driver...I'm not sure, but the important thing is that the problem is solved, by now..hehe...

Thanks a lot for helping!

Michelle
Post Reply