2

Possible Duplicate:
Why does an environment's label have to appear after the caption?

In the following example, there are no reference numbers to the figures when I compile using pdflatex:

\documentclass[12pt]{article}

\usepackage{amsmath}
\usepackage[normalem]{ulem}
\usepackage{float}
\usepackage{graphicx}
\usepackage{sidecap}
\usepackage{wrapfig}
\usepackage{grffile}
\usepackage[cm]{fullpage}
\usepackage{fixltx2e}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{indentfirst}
\usepackage[hidelinks]{hyperref}
\usepackage{glossaries}

%debugging package for figuring out why my figure references keep disappearing
%\usepackage{refcheck}

\begin{document}

\begin{figure}
\label{bob}
\caption{Bob}
\end{figure}

\begin{figure}
\label{jane}
\caption{Jane}
\end{figure}

Bob is reference \ref{bob}. Jane is reference \ref{jane}.

\end{document}

Any idea why?

marked as duplicate by Jake, lockstep, Count Zero, Werner, egreg May 30 '12 at 6:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Welcome to TeX.SE. – Peter Grill May 29 '12 at 20:57
  • 2
    @Jake Indeed. And I'm eagerly awaiting the day stackexchange starts handing out reputation and/or badges for finding duplicates. – lockstep May 29 '12 at 21:06
7

You need to put \label after \caption.

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