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 am newbie to LaTeX and I have a simple problem including graphics to the text. When I run

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\begin{center}
\includegraphics[width=0.25cm,height=0.25cm]{Figure1}
\caption[Sèries temporals de vent i direccions]{Sèries temporals velocitat de vent       direccions. filtratge de pics i glaçades de velocitat.}
\label{Serie}
\end{center}

\end{figure}
\end{document}

I create a pdf file but there is no figure inserted. The picture is called Figure1.png but it seems that the program do not recognizes it and doesn't inserts it. I would appreciate some help.

share|improve this question

migrated from stackoverflow.com Apr 26 '12 at 9:37

This question came from our site for professional and enthusiast programmers.

    
which engine are you using? latex? pdflatex? or? And can you show the log file generated? And try add the extension .png to the filename in your source. –  fefe Apr 26 '12 at 9:40
    
What kind of error message are you getting? Note that for PNGs you need to use the modern pdflatex, not the classic latex. If you tell us which editor etc. you are using and state the error message (from e.g. the .log file) we may help you better. As a general node: Please use \centering instead of center in figures, see Should I use center or centering for figures?. –  Martin Scharrer Apr 26 '12 at 9:43
    
Your question was migrated here from another stackexchange site. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. –  Martin Scharrer Apr 26 '12 at 9:44
    
I use Text Maker and PDFLatex. I get no errors at all. –  user13962 Apr 26 '12 at 9:49
    
@jonel-r: Could you please register you account here, then it will be synced with the one on stackoverflow.com and you will get ownership of this post here again. Otherwise you won't be able to post comments and accept answers for it. –  Martin Scharrer Apr 26 '12 at 9:52
add comment

1 Answer 1

You are not getting any error at all!. Interesting. This naswer is based on a pure guess. Basically your problem is perhaps the dimensions of the figure you are using in \includegraphics[width=0.25cm,height=0.25cm]{Figure1}. The length 0.25cm itself is a small dimension and depending on your figure (like the white space it may have around etc.), your figure may not be visible at all. If you magnify say, 400 times you may be able to see something.

As such your figure dimensions are looking like this:

enter image description here

The black box is your figure.

Now try with these dimesions:

\includegraphics[width=10cm,height=10cm,keepaspectratio]{Figure1}

This is the dimension you should see:

enter image description here

The above assumes that your figure file is in the same folder as your tex file. Also, as mentioned in comments, put \centering instead of \begin{center}... to avoid extra (unnecessary) vertical space.

If your problem is still not solved, additional details may be necessary for diagnosis. (If you provide your figure file Figure1.png, it might have been better.)

share|improve this answer
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.