To have names for figures in LaTeX

I need to have labels for figures. However, I am not sure where is the bug, since the following figure -command should be correct:

\begin{figure}\label{ERD figure}
        \includegraphics[width=13.0cm]{/Users/cs/pictures/user-cases.png}
\end{figure}

I removed already some commands from my main document. It solves the bug with the generation of table of contents. However, I have not managed to find the reason for the fact that there is no label for any figures although I use them when converting to PDF.

This is the main file.

\documentclass[12pt, a4paper, titlepage, onecolumn]{article} 
\usepackage[finnish]{babel}   
\usepackage[utf8]{inputenc}  

\usepackage{graphicx}
\usepackage{subfig}                
\usepackage{lastpage}

\usepackage{url}   %urls formatting
\usepackage{float}

\usepackage{hyperref}
\hypersetup{backref,  
pdfpagemode=FullScreen,  
colorlinks=false,
pdfborder=0 0 0}


\floatstyle{ruled}
\newfloat{program}{thp}{lop}

\floatname{program}{Program} %never use \newpage! Use \clearpage

\title{PC} 
\author{Masi}

\begin{document}

\maketitle
\pagenumbering{arabic}
\pagestyle{myheadings}

\pagestyle{plain}

----------- picture here-----------------

\end{document}

Do you know what is wrong in my .tex -document?

Upvotes: 0

Views: 1048

Answers (2)

Mica
Mica

Reputation: 19617

pdflatex does support .png, but not vector graphics {.ps, .eps}. If you have all raster graphics{jpg, png, etc} just use pdflatex.

Upvotes: 0

Juan
Juan

Reputation: 3776

I don't think latex supports png files. Are you using a different latex-like processor?

\label's should go in \caption's

This is "the book" on the subject: ftp://ftp.tex.ac.uk/tex-archive/info/epslatex.pdf

Upvotes: 2

Related Questions