Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

i have the following code which works and adds an image to my document

 \includegraphics[scale=0.71]{ed.jpg}

However when I try to turn it into a figure

 \begin{figure}[t]
 \caption{A nice picture.}
 \centering
 \includegraphics[scale=0.71]{ed.jpg}
 \end{figure}

The image disappears..

Im using the following packages

 \usepackage[pdftex]{graphicx}
 \usepackage{float}

Can anyone point out my mistake? Im sure its fairly obvious but its been winding me up for days. the Latex compiler isnt producing any error messages.

share|improve this question
    
Are there any warnings? –  Heiko Oberdiek Dec 24 '12 at 13:16
    
Nope, no warnings.. also it compiles fine when not wrapped in figure tags –  Chris Headleand Dec 24 '12 at 13:31
1  
Option draft enabled somewhere? The caption is displayed? MWE? –  Heiko Oberdiek Dec 24 '12 at 14:13
    
Are you sure that it disappears? It may go to the next page. –  egreg Dec 24 '12 at 14:16
    
Yes, deffinatly disapered. No, draft not enabled. Cheers for the help so far. –  Chris Headleand Dec 24 '12 at 15:21
show 1 more comment

1 Answer 1

pdftex option for graphicx package have to be omitted.

\documentclass{article}‎

\usepackage{graphicx}
\usepackage{float}

\begin{document}‎‎

\begin{figure}[t]
\caption{A nice picture.}
\centering‎
\includegraphics[scale=0.71]{ed.jpg}
\end{figure}‎

\end{document}
share|improve this answer
    
Just tried that... no difference I'm afraid :( –  Chris Headleand Dec 24 '12 at 13:12
    
I can run it without any problem. How do you compile your code? Is there any error or warning? Is there your image, in the current folder? –  smh Dec 24 '12 at 13:16
    
yeah, without the figure it compiles fine. I'm compiling my code with pdflatex and with latex. its just wrapping it in figure tags that causes the problem, no warnings. –  Chris Headleand Dec 24 '12 at 13:30
    
MWE and output, please –  smh Dec 24 '12 at 15:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.