GeneralProblem in inserting figures

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
srikanth_dhondi
Posts: 2
Joined: Fri Jan 04, 2008 1:28 am

Problem in inserting figures

Post by srikanth_dhondi »

Hi,

I am quite new to latex. I am trying to insert few figures into my tex file but had no success.
Here is the file

\documentclass[12pt]{article}
\usepackage[pdftex]{graphicx}
\DeclareGraphicsExtensions{.pdf,.png,.gif,.jpg}
\begin{document}

\begin{figure}
\includegraphics{theory.png}
\end{figure}
\end{document}

when I latex this file, I get the following error message

This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./test.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur
kish, ukrainian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size12.clo))
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/keyval.sty)
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/latex/graphics/graphics.cfg)
(/usr/share/texmf/tex/latex/graphics/pdftex.def))) (./test.aux)
(/usr/share/texmf/tex/context/base/supp-pdf.tex
(/usr/share/texmf/tex/context/base/supp-mis.tex
loading : Context Support Macros / Miscellaneous (2004.10.26)
)
loading : Context Support Macros / PDF (2004.03.26)
)libpng error: Not a PNG file

Error: latex (file theory.png): libpng: internal error
==> Fatal error occurred, the output PDF file is not finished!

Thanks in advance :)

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Problem in inserting figures

Post by Juanjo »

Look at this in your log file:
loading : Context Support Macros / PDF (2004.03.26)
)libpng error: Not a PNG file

Error: latex (file theory.png): libpng: internal error
==> Fatal error occurred, the output PDF file is not finished!


Check the file theory.png. It is not recognized as a png file.

By the way, it seems you are using teTeX. If this were the case, you should move to the TeXLive distribution, since teTeX is not longer supported. For Macintosh, it can be downloaded from here.

Welcome on board.
Post Reply