# [OS X TeX] Labeling of Figures

Jimi Alphapower at gmx.de
Thu Jan 28 11:36:24 EST 2010

>>> I just was wondering why the numbering of some Figures in my
>>> article are somewhat messed up when I change the position of
>>> \caption and \label in a Figure environment? For example:
>>>
>>> This
>>>
>>> \begin{figure}[htb]
>>> \begin{center}
>>>  \includegraphics{fig}
>>>  \label{fig:fig}
>>>  \caption{caption}
>>> \end{center}
>>> \end{figure}
>>>
>>> generates a number of the style section-n0+fig-no while this
>>>
>>> \begin{figure}[htb]
>>> \begin{center}
>>>  \includegraphics{fig}
>>>  \caption{caption}
>>>  \label{fig:fig}
>>> \end{center}
>>> \end{figure}
>>>
>>> generates only a single number (which I actually wanted to have).
>>> Is this an option or a bug? Is this MAC specific?
>>
>> Howdy,
>>
>> It's the \caption command that updates the value of the figure
>> number and the format for the figure number so the label should
>> always follow the \caption command.
>
> Herb is, of course, correct.
>
> Also, whether figures are numbered within sections or continuously
> is set by the documentclass. For example, article or amsart, number
> figures consecutively, book or report number them within chapters.
> You should make the numbering work as you prefer by using something
> like
>
> \renewcommand{\thefigure}{\arabic{figure}}

@Luis: this I was of course aware of. That was the first I tried, but
didn't work either. I forgot to wrote this in my first posting. Sorry
for that.

Jimi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20100128/7f130ebe/attachment.html>