tags:

views:

170

answers:

2

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?

+2  A: 

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

Juan
Thank you for your answer! - It solves the problem.
Masi
pdflatex likes .png's
dmckee
A: 

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

Mica
You can use pdf's in pdflatex, and pdf supports vector methods...
dmckee
@dmckee: Do you mean that you can vector manipulation in PDF in the fileformats .ps and .eps?
Masi
NO, I mean that PDF support vector images. You *can* translate various postscript files into pdf for inclusion in pdflatex documents. see pdftops, pdf2ps, convert, etc...
dmckee
sorry, i mean pdflatex does not natively support .ps or .eps. you can always convert file formats, but in my mind that is usually less than optimal.
Mica
There is no difference in quality between a vector (E)PS and a vector PDF. For bitmap data, they may use different compression but essentially EPS to PDF is or can be a lossless conversion.
Will Robertson
Actually, pdftex does support including some EPS files provided they respect some strict conventions.
Damien Pollet
@Damien can you elaborate?
Mica
The output of metapost is an example. It's eps, but pdftex should be able to include the figures after a simple renaming (as .mps instead of .1 .2 .3 etc IIRC).EPS is itself a "strict" version of postscript where some idioms must be respected so that the figure can be included in another file without funny results.
Damien Pollet
Back to the point, this answer is just wrong. Pdftex does support vector graphics, just not in the (general) PS or EPS format.
Damien Pollet