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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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