Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

closed as too localized by egreg, lockstep, Andrey Vihrov, Seamus, Lev Bishop Nov 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
3  
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
add comment

1 Answer 1

up vote 3 down vote accepted

I ran you example as is and the results appear to be correct:

enter image description here

Update: Indeed, as @egreg commented, if you have the \label before each \caption, you get the results that you are seeing:

enter image description here

share|improve this answer
    
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
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.