Graphics, Figures & Tables ⇒ Figure Does Not Show, Caption Does!
-
- Posts: 5
- Joined: Wed Jun 16, 2010 4:21 am
Figure Does Not Show, Caption Does!
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.
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.
NEW: TikZ book now 40% off at Amazon.com for a short time.

Re: Figure Does Not Show, Caption Does!
Are you compiling with latex or pdflatex? You need to use pdflatex to include jpeg files.
-
- Posts: 5
- Joined: Wed Jun 16, 2010 4:21 am
Figure Does Not Show, Caption Does!
Hi frabjous,frabjous wrote:Are you compiling with latex or pdflatex? You need to use pdflatex to include jpeg files.
Thanks for the reply!
I've tried both pdflatex and pdftexify, and it's not working.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Figure Does Not Show, Caption Does!
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
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 5
- Joined: Wed Jun 16, 2010 4:21 am
Figure Does Not Show, Caption Does!
Hi Thorsten,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
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?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Figure Does Not Show, Caption Does!
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 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?
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 5
- Joined: Wed Jun 16, 2010 4:21 am
Figure Does Not Show, Caption Does!
Thanks! I've attached the log file (I think). Thank you for taking the time to reply. This is really a great service.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 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?
- Attachments
-
- trialgraph.log
- (5.06 KiB) Downloaded 294 times
-
- Posts: 5
- Joined: Wed Jun 16, 2010 4:21 am
Re: Figure Does Not Show, Caption Does!
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.
Figure Does Not Show, Caption Does!
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...
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Figure Does Not Show, Caption Does!
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
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