Graphics, Figures & TablesFigure Does Not Show, Caption Does!

Information and discussion about graphics, figures & tables in LaTeX documents.
ian.renner
Posts: 5
Joined: Wed Jun 16, 2010 4:21 am

Figure Does Not Show, Caption Does!

Post by ian.renner »

Hi everyone,

I've tried searching the forum for similar problems with a solution that works, but unfortunately, everything I have tried has failed to correct the problem.

I am running WinEdt with MiXTeX and want to include a simple jpeg image. This image is included in the same directory as the tex file. Funnily enough, when I double click on the includegraphics code in the tex file, it opens the image I want to include! I have tried both the graphics and the graphicx packages, to no avail.

Perhaps the issue is that I am using the nature style file?

In any case, here is the code that I have:

\documentclass{nature}
\usepackage{graphics}

\begin{document}

\begin{figure}
\includegraphics[width=30mm]{CoryPPM800.jpeg}
\caption{Species Distribution Models at Different Resolutions}
\end{figure}

\end{document}

I would appreciate any help with this, and I apologize if this is an annoyance.

Recommended reading 2024:

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

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Figure Does Not Show, Caption Does!

Post by frabjous »

Are you compiling with latex or pdflatex? You need to use pdflatex to include jpeg files.
ian.renner
Posts: 5
Joined: Wed Jun 16, 2010 4:21 am

Figure Does Not Show, Caption Does!

Post by ian.renner »

frabjous wrote:Are you compiling with latex or pdflatex? You need to use pdflatex to include jpeg files.
Hi frabjous,

Thanks for the reply!

I've tried both pdflatex and pdftexify, and it's not working.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Figure Does Not Show, Caption Does!

Post by localghost »

The next logical step is to take a look at the log file and check it for warnings and error messages. It's very likely that it contains useful information.


Best regards and welcome to the board
Thorsten
ian.renner
Posts: 5
Joined: Wed Jun 16, 2010 4:21 am

Figure Does Not Show, Caption Does!

Post by ian.renner »

localghost wrote:The next logical step is to take a look at the log file and check it for warnings and error messages. It's very likely that it contains useful information.


Best regards and welcome to the board
Thorsten
Hi Thorsten,

Thanks for the reply! In any case, the log file doesn't seem to indicate any warnings or errors, as far as I can tell. I'll gladly post it here- does it need to be included in a code style as well?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Figure Does Not Show, Caption Does!

Post by localghost »

ian.renner wrote:[...] In any case, the log file doesn't seem to indicate any warnings or errors, as far as I can tell. I'll gladly post it here- does it need to be included in a code style as well?
Just attach it to your next post by uploading it to the forum server. If you really try to insert a JPEG (not JPG) image, you might get the message that this file format is not allowed.
ian.renner
Posts: 5
Joined: Wed Jun 16, 2010 4:21 am

Figure Does Not Show, Caption Does!

Post by ian.renner »

ian.renner wrote:[...] In any case, the log file doesn't seem to indicate any warnings or errors, as far as I can tell. I'll gladly post it here- does it need to be included in a code style as well?
Just attach it to your next post by uploading it to the forum server. If you really try to insert a JPEG (not JPG) image, you might get the message that this file format is not allowed.
Thanks! I've attached the log file (I think). Thank you for taking the time to reply. This is really a great service.
Attachments
trialgraph.log
(5.06 KiB) Downloaded 295 times
ian.renner
Posts: 5
Joined: Wed Jun 16, 2010 4:21 am

Re: Figure Does Not Show, Caption Does!

Post by ian.renner »

I found the problem! I am using the nature document class, and the class file has a line of code that ignores all includegraphics commands. I had tried changing the document class earlier, but it didn't work at the time. In any case, I've got it up and running. Thanks again to everyone who helped me.
farbetjan
Posts: 5
Joined: Tue Jun 29, 2010 4:19 pm

Figure Does Not Show, Caption Does!

Post by farbetjan »

ian.renner wrote: In any case, I've got it up and running.

I think I have the same problem. How did you solve the issue in detail then, Ian?

Thanks for your help...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Re: Figure Does Not Show, Caption Does!

Post by Stefan Kottwitz »

Hi farbetjan,

welcome to the board!
Do you use the nature document class like Ian does? Because it seemes that class caused the problem. If you're using another class Ians solution might not apply to you.

Stefan
LaTeX.org admin
Post Reply