Home > Research > LaTeX: Fixing Wrong Figure Numbers

## LaTeX: Fixing Wrong Figure Numbers

I can’t tell how much time I’ve lost dealing with this freaking (in lack of better term) problem in LaTeX. Stupid solution for a stupid problem, but hey… it has a solution 😉

Whenever you use figures, always (and I mean ALWAYS EVER FOREVER ALWAYS) put\caption first, and \label second like this:

\begin{figure}[htp]
\centering
\includegraphics{image.eps}
\caption{Some Image}
\label{fig:some-image}
\end{figure}

Just blogging about it for my future reference.