Graphics, Figures & TablesInclusion of PNG Image File fails

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
thesiswriter21
Posts: 1
Joined: Wed Aug 15, 2012 4:55 pm

Inclusion of PNG Image File fails

Post by thesiswriter21 »

Hello,

I've extracted only the relevant lines of the problem. First I will paste these lines and discuss after.

Code: Select all

\documentclass[12pt,dvips]{report}
\usepackage[english]{babel}
\usepackage[pdftex]{graphicx}

\begin{document}
  \begin{figure}[!ht]
    \centering
    \includegraphics{Images/Morph_Proc/strel.png}
    \caption{Original matrix and result of dilation}
  \end{figure}
\end{document}
Ok. So when I use \usepackage[pdftex]{graphicx} the figures are inserted properly. However, when I use this the page numbers disappear. When I use just \usepackage{graphicx} the page numbers are present, but there is a blank spot where the image should be. Also if I don't insert natwidth/natheight, when using just this, then it says it can't find the bounding box.

Any ideas?

Thanks.
Last edited by Stefan Kottwitz on Wed Aug 15, 2012 5:04 pm, edited 1 time in total.

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
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Inclusion of PNG Image File fails

Post by Stefan Kottwitz »

Hi,

welcome to the board!

Those two lines cause a conflict:
thesiswriter21 wrote:

Code: Select all

\documentclass[12pt,dvips]{report}
\usepackage[pdftex]{graphicx}
  • dvips is for LaTeX in dvi mode, i.e. compiling tex -> dvi -> ps -> pdf
  • pdftex is for pdfLaTeX, i.e. directly compiling tex -> pdf
Decide, which you would like to use. Even better: don't specify such driver options, the packages will automatically detect which engine you are using.

Stefan
LaTeX.org admin
Post Reply