Graphics, Figures & TablesFigure not showing

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
dbarkai
Posts: 4
Joined: Thu Feb 26, 2009 2:18 am

Figure not showing

Post by dbarkai »

A beginner looking for help:
Using MikTeX on Wondows XP, with TeXnicCeneter interface. Trying to insert a figure into a .tex document.
\usepackage{graphicx} is there. Inside the 'figure' environment I \includegraphics{filename.eps}. There's also \caption .
Compiling to PDF there are no errors. The PDF output has assigned space for the figure, with the caption printed, but the graphics itself - the figure - isn't showing.
Can anyone suggest what I'm dong wrong and how to fix?
Thanks,
David Barkai

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

Figure not showing

Post by localghost »

You can't use EPS images when compiling directly with pdflatex. Use the "LaTeX => PS => PDF" build profile in this case. If you already did that, build a minimal working example (MWE) that reproduces the effect and attach the concerned file if necessary.


Best regards and welcome to the board
Thorsten¹
dbarkai
Posts: 4
Joined: Thu Feb 26, 2009 2:18 am

Re: Figure not showing

Post by dbarkai »

Thank you, Thorsten.
1. I tried my doc with LaTeX=>PS. Figure did not show.
2. Created a MWE, and the above does work. So, something was wrong with my complete document (the example is too minimal).
3. While I create a minimal example that fails on =>PS, please show me if there is a way to define the two-step build profile (LaTeX=>PS=>PDF). TeXnicCenter does not offer that as a fedualt. I can manage that by LaTeX=>PS followed by 'convert' of PS to PDF using GSview. Is there a more elegant way?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Figure not showing

Post by localghost »

dbarkai wrote:[...] While I create a minimal example that fails on =>PS, please show me if there is a way to define the two-step build profile (LaTeX=>PS=>PDF). TeXnicCenter does not offer that as a fedualt. [...]
Go to the build profiles dialogue window by pressing Alt+F7 and start the wizard in the lower left corner. With all necessary software (GSview/Ghostscript) installed the current version of TeXnicCenter (TXC 1.0 RC1) should restore the build profiles and add the new one.
dbarkai
Posts: 4
Joined: Thu Feb 26, 2009 2:18 am

Re: Figure not showing

Post by dbarkai »

Thank you. Problem solved. In fact, two..
First, I realized on I don't have TeXnicCenter ver 1.0 RC1, but an earlier beta. I fixed that.
Second, I created PS file, then tried to convert to EPS via GSview - this does not work well. I now set uo a printer-to-file that creates EPS. This seems to work much better.
RobertSS
Posts: 2
Joined: Mon Mar 02, 2009 7:00 pm

Figure not showing

Post by RobertSS »

Hello,

I have a similar problem, and I could not find the answer in the previous post. I am using TeXniccenter 1 Beta 7.50, MikTeX 2.70. Using output profile PDFLatex, I want to add a .pdf image (vector) to my file. It basically looks something like this:

Code: Select all

\documentclass[11pt,draft]{article}

\usepackage[english]{babel}
\usepackage{amssymb}	
\usepackage{graphicx}
\usepackage{float} 
\begin{document} 
Text
\begin{figure}[ht]
\centering
\includegraphics[scale=0.5]{image}
\caption{caption text}
\label{fig:image}
\end{figure}
\end{document}
When I compile, I see boxes with the filename (image.pdf) in it, but the image itself is not shown. I also tried image.pdf, that does not work either. What is going wrong here?

Thanks in advance. Greetings,

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

Figure not showing

Post by localghost »

RobertSS wrote:[…] I have a similar problem, and I could not find the answer in the previous post. […] When I compile, I see boxes with the filename (image.pdf) in it, but the image itself is not shown. I also tried image.pdf, that does not work either. What is going wrong here? […]
The cause in this case is very simple. Just omit draft in the option list for the document class.


Best regards and welcome to the board
Thorsten¹
RobertSS
Posts: 2
Joined: Mon Mar 02, 2009 7:00 pm

Re: Figure not showing

Post by RobertSS »

Thank you very much! This is the first time I included the draft option (I thought it would print something like "draft" in light grey in the back), and then I totally forgot about it... :oops:
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Figure not showing

Post by localghost »

RobertSS wrote:[…] (I thought it would print something like "draft" in light grey in the back) […]
If you need such an effect, you may take a look at the draftcopy package. But this only works with latex. For pdflatex there is the pdfdraftcopy package. But this package cannot be found on CTAN and is not part of any LaTeX distribution.
Post Reply