# Referring a series of figures [closed]

When I run the add file, I get:

Chapter 1 chap

1.1 sec

figures 1.1 - 1.1. Just a figure 1.1 Just b figure 1.1

Clearly this is wrong but does it happen?

\documentclass{report}

%\usepackage{amsmath}
%\usepackage{mathrsfs}
\usepackage{graphicx}
\begin{document}
\chapter{chap}
\section{sec}
figures \ref{a} - \ref{c}.

Just a figure \ref{a}
Just b figure \ref{b}

\begin{figure}
\includegraphics[width=0.8\textwidth]{mem0per.png}
\caption{A figure}
\label{a}
\end{figure}

\begin{figure}
\includegraphics[width=0.8\textwidth]{mem0per.png}
\caption{B figure}
\label{b}
\end{figure}

\begin{figure}
\includegraphics[width=0.8\textwidth]{mem0per.png}
\caption{C figure}
\label{c}
\end{figure}

\end{document}

-

## closed as too localized by egreg, lockstep, Andrey Vihrov, Seamus, Lev BishopNov 18 '11 at 2:42

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

This input does not produce the output you describe for me; the labels' values are as expected. – Andrey Vihrov Oct 29 '11 at 21:23
The output you show cannot be generated by the code; it would be if all \label commands precede the \caption. – egreg Oct 29 '11 at 21:36

Update: Indeed, as @egreg commented, if you have the \label before each \caption, you get the results that you are seeing:
Yes. What happened is the following: I placed the \label's before the \captions's got the wrong out put, rerun pdflatex once got the same result and post it here. Thanks – Yotam Oct 30 '11 at 8:14