[OS X TeX] Labeling of Figures

Luis Sequeira lfsequeira at gmail.com
Thu Jan 28 10:35:19 EST 2010


> 
> On Jan 27, 2010, at 9:16 AM, Jimi wrote:
> 
>> Hei,
>> 
>> 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?
>> 
>> Thanks,
>> 
>> Jimi
> 
> 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.
> 
> Good Luck,
> 
> Herb Schulz
> (herbs at wideopenwest dot com)
> 

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}}

HTH

Luis Sequeira








More information about the MacOSX-TeX mailing list