Saturday, February 11, 2012

Fixing wrong labels

The command \label must appear after (or inside) \caption. Otherwise, it will pick up the current section or list number instead of what you intended.

\begin{figure}
\centering
\includegraphics[width=0.5\textwidth]{gull}
\caption{Close-up of a gull} \label{fig:gull}
\end{figure}

No comments:

Post a Comment