# RevTex4-1 figure reference wrong number? [duplicate]

I have included a graphic using \includegraphics into a \begin{figure} \end{figure} in revtex4-1. The figure appears in section II (i.e. 2) but the caption of the figure says Fig.1 (this is not a problem per se).

The problem is when I refer to the figure by saying e.g.

See Figure \ref{Figure: Fig1} then the output is See Figure II. I suspect because the figure occurs in section II. How to fix this? Or perhaps this is OK for journals (e.g. J math phys)? Below you can find a MWE

    \documentclass{revtex4-1}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{verbatim}
\usepackage{color}
\usepackage{subfigure}
\usepackage{hyperref}
\begin{document}
\section{First Section}
hey
\section{Second Section}
\begin{figure}
\includegraphics[width=.5\textwidth]{StupidPicture}\label{Figure: SimplyStupid}
\caption{This is a stupid picture}
\end{figure}
\end{document}


## marked as duplicate by David Carlisle floats StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jun 12 '15 at 15:01

• Since you love learning, you should learn how to provide an minimal working example (MWE) ... – user31729 Jun 12 '15 at 14:27
• Yeah that part me no love learning – Your Majesty Jun 12 '15 at 14:30
• Well, others will answer it anyway -- perhaps ;-) – user31729 Jun 12 '15 at 14:32
• haha OK, but I'll try with that ME thing from now on, I promise. – Your Majesty Jun 12 '15 at 14:33
• You provided a MWE and we were willing to help ;-) – user31729 Jun 12 '15 at 14:54

The \label must be written after \caption, not before. Labels need a \refstepcounter (here with figure counter) such that the latest stepped counter is known and the reference is correctly written.

If \label{Figure: SimplyStupid} is used before \caption, it will use the last counter being stepped, this is section, that's why the reference prints II (the 2nd section)

\documentclass{revtex4-1}
\usepackage{amsmath}
\usepackage[demo]{graphicx}
\usepackage{verbatim}
\usepackage{color}
\usepackage{subfigure}
\usepackage{hyperref}
\begin{document}
\section{First Section}
hey
\section{Second Section}
\begin{figure}
\includegraphics[width=.5\textwidth]{StupidPicture}
\caption{This is a stupid picture}\label{Figure: SimplyStupid}
\end{figure}